-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interpreting infeasibility/unboundedness ray in CLP #286
Comments
The resolve issue is easy to fix. For some reason OsiClp thinks its default is in branch and bound. Resolve takes a simpler route than initialSolve which does create the ray. Standard dual thinks it is in branch and bound and so does not. However there is an option to say create a ray even in branch and bound. To activate this add int options = si.getModelPtr()->specialOptions(); You may wish to do si.getModelPtr()->setSpecialOptions(options); later to restore default. For the scaling and presolve issues, I may need examples where it is wrong. |
Thank for your answer John. Regarding the ray, here's the issue I'm encountering. At some point during the B&B in SYMPHONY, CLP solves the following infeasible LP:
By calling
Here, Then, at some point in my code I want to check if the Farkas proof applies to the following LP (spoiler: it is feasible):
The Farkas proof I'm testing goes as In this case, we have: |
Of course, I assume the ray from CLP is correct and I'm more likely to think that my way of testing Farkas proof is wrong (probably just a matter of signs). This is why I asked to which form of LP the ray from CLP corresponds to or what form of Farkas proof I should apply. That proof test came from GUROBI's reference manual https://www.gurobi.com/documentation/current/refman/farkasproof.html which seems to be exactly what I'm looking for this LP general form. The proof works correctly for most cases in my code:
|
Hi,
I'm developing functionalities in another COIN-OR project, namely the SYMPHONY MILP branch-and-cut solver, which is using CLP (via OSI) for solving LP relaxations.
I need to collect a ray proving primal infeasibility/dual unboundedness, whenever a LP is primal infeasible. As of now, I achieve that by calling the method
OsiClpSolverInterface.getDualRays()
. The issue is that, apparently, this function returns a non-nullvector<double>
only when the methodOsiClpSolverInterface.initialSolve()
is invoked for solving the LP, while for subsequent calls ofOsiClpSolverInterface.resolve()
getDualRays()
will return an empty vector even ifisProvenDualInfeasible() == true
. It is important in my context that a ray is always returned for infeasible primal LPs. As of now, when this happens I'm resolving from scratch an additional LP by callinginitialSolve()
, but of course I'd like not to undertake this additional computational burden. Would it be possible to achieve that?Given an LP in general form (i.e. with any combination of$A$ , right-hand side $b$ and objective func $c$ , with general bounds $l \leq x \leq u$ given as input to CLP and suppose this LP is primal infeasible. Given the ray $\lambda$ returned by CLP, I need to verify the Farkas proof apply for a different set of $b^\prime, l^\prime, u^\prime$ .$\lambda$ returned by CLP correspond to a ray for the LP in general form as given in input? Or does it correspond to a ray to the LP CLP is internally creating (e.g. after preprocessing/scaling...)? Clearly, I would need the ray to correspond to the LP as given in input.
<=, >=, =
constraints), defined by matrixMy question is the following: Does the ray
P.S. these are the option being set:
setupForRepeatedUse()
setHintParam(OsiDoScale,false,OsiHintDo)
setHintParam(OsiDoPresolveInInitial, false, OsiHintDo)
setHintParam(OsiDoPresolveInResolve, false, OsiHintDo)
(only whenresolve()
is called)setCleanupScaling(1)
int sp = si->specialOptions(); if ((sp & 2) != 0) sp ^= 2; si->setSpecialOptions(sp);
to set special options.Thanks for you time in advance,
Federico
The text was updated successfully, but these errors were encountered: