Forum Discussion
FICO
5 years agoCommunity Manager
How to fix the basis after removing non-basic rows.
I am working on an algorithm in which I need to remove some redundant constraints.
I know they are redundant because each one is dominated by one other constraint that I have generated. The problem is that some of these redundant constraints are non-basic, so removing them directly will invalidate my basis.
The Xpress manual says "You can avoid losing the basis by only deleting basic rows (see XPRSgetbasis), bringing a non-basic row into the basis first if necessary (see XPRSgetpivots and XPRSpivot)". I understand that we want to make non-basic constraints basic before removing them so that number of constraints = number of basic variables. My question is: how do I select which basic variable must leave basis when I bring my nonbasic redundant constraint into the basis?
1 Reply
- FICOCommunity Manager
Hi,
Assuming you have a valid factorisation at this point, you can ask the optimizer what variable is basic in the row you are removing using XPRSgetpivotorder: https://www.fico.com/fico-xpress-optimization/docs/latest/solver/optimizer/HTML/XPRSgetpivotorder.html
If you do not have a valid factorization (changing the problem after postsolve), to make sure you have a valid factorization may need to call XPRSinvert ('int XPRS_CC XPRSinvert(XPRSprob prob);') before asking for the pivot order. This can be relatively expensive, so please make sure to remove all redundant rows in a single call.
Please le us know if this does not work,
Zsolt Csizmadia
Related Content
Related Content
Removing O(rows) in XPRSbtran and XPRSftran
XPRSbtran and XPRSftran takes a dense array as input, hence there will be at least one scan over the basis dimension. If you solve multiple times the the extra complexity becomes a bottleneck, since ...3 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread0Views0likes2Comments