How to get the base matrix of m * m in c++
Awaiting user inputI have an LP problem. The model size is about 4500rows and 17000cols. I call vbasis and cbasis to get the base matrix of the model, and find that the number of rows and columns of the base matrix are inconsistent
In line 760, x represents variables, c1 represents all added constraints.
Finally, the values of validVar and validCol are 376 and 1718 respectively.I have the following questions
1. In my opinion, validVar and validCol represent the number of rows and columns of the base matrix, right？
2. I checked the user manual to see if there are some relaxation variables that are also base variables, which leads to the above phenomenon. Is this correct?
3. If 2 is correct, is it possible to obtain the base matrix containing only the variables I added.
4. Is there any interface in c++that can directly obtain the base matrix of the model?

Your validVar represent the basic variables, i.e., variables with VBasis=0 at the solution point, and validCol represent basic constraints, i.e., constraints with CBasis=0 at the solution point.
Usually the size of validVar and validCol should add up to the number of rows in your case. What kind of model are you solving? Are you possibly solving a QP? Could you share the model you are solving? You can generate a model file by using the write method. Note that uploading files in the Community Forum is not possible but we discuss an alternative in Posting to the Community Forum.
Please note that using cl or Col as name for the basic status of constraint might be confusing because columns usually refer to variables and not constraints.
Best regards,
Jaromił0
Please sign in to leave a comment.
Comments
1 comment