Forum Discussion
FICO
4 years agoCommunity Manager
Question about GetBasis method?
Hi,
I have a question about the GetBasis method.problem.getbasis (fico.com)
I made a console application with c#(as below) to test it.
sol = 10, rowStatus = 2 and colStatus = 1.
Why rowStatus is 2? It's at the lower bound, so it should be 0.
Thanks.
c# code:
XPRS.Init("");
var prob = new XPRSprob();
prob.ReadProb("model", "");
int nCol, nRow;
prob.GetIntAttrib((int)XPRSattribute.Cols, out nCol);
prob.GetIntAttrib((int)XPRSattribute.Rows, out nRow);
int[] rowStatus = new int[nRow];
int[] colStatus = new int[nCol];
double[] sol = new double[nCol];
prob.LpOptimize();
prob.GetSol(sol, null, null, null);
prob.GetBasis(rowStatus, colStatus);
model.lp
\ Using Xpress-MP extensions
Minimize
x
Subject To
Min: x >= 10
Bounds
End
4 Replies
- FICOCommunity Manager
The test version is 40.1.1
- FICOCommunity Manager
Also, why colStatus is 1?
- FICOCommunity Manager
Hi,
the basis status for rows is about the status of the artificial slack or surplus variable that we add to the row, so in essence it is the opposite of the row sense. A status of 2 is expected for a nonbasic row with a lower bound:
https://www.fico.com/fico-xpress-optimization/docs/latest/solver/optimizer/python/HTML/problem.getbasis.html
As for the column: it is basic. It can still be at its bound if the problem is degenerate.
I hope this helps,
Imre Polik
- FICOCommunity Manager
LP standard form
X – S = 10
S > = 0
Why S = 0 is not the lower bound?
Related Content
Related Content
Question about the benders example
Hello, I am an ordinary student studying optimization with Xpress. First, I downloaded and ran the Python file from the xpress example to reference while implementing benders decomposition using ...1 year agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum3 unread comments3 unread0Views0likes3CommentsMapping methods between XPRBctr and new class Inequality
I'm porting a Java application to c++ (I'm using latest Xpress Version). From guide I understood that XPRBctr old BCL class has been mapped to Inequality, but I cannot find some methods (i.e. addTerm...1 year agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum1 unread comment1 unread0Views0likes1Commenthow to use getcpcuts() and delcpcuts() method in python library?
Hello, I’m currently implementing a Benders decomposition algorithm using the Xpress Python library. I'm working on a model that exhibits basic characteristics of the Traveling Salesman Problem (TSP...1 year agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum1 unread comment1 unread0Views0likes1Comment