-
Notifications
You must be signed in to change notification settings - Fork 92
modified the test to have a unique answer #156
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
Conversation
How does this relate to #127? |
#127 and #130 suggest that cd could be scaled by any positive value. Depending on how you define the infeasibility certificate , one may argue that it can be scaled by any value (not only positive one): Since this one constraint But in the following, we need a linear combination of 2 constraints to certify infeasibility
the vector |
Could you also check the dual solution on the bounds so that we can close #127? |
@IssamT I don't agree. The ratio does not have to be 3.
is
Therefore, an infeasibility ray of the primal/unbounded ray of the dual is a vector such that
The dual of Moreover, it can only be scaled by any positive constant since a, b should be nonpositive. |
Maybe we are just not using the same convention, or maybe I am wrong. From my understanding when I use |
@IssamT, it doesn't matter whether the constraint is treated as a bound or a linear constraint, it has a dual multiplier either way. Dual multipliers on bounds are usually called reduced costs. |
Isn't that already a transformation when you consider that reduced costs are the dual multipliers of the bound "constraints" ? When I ask the solver for infeasibility ray, It only returns a vector of 2 elements So maybe what you are saying is that MOI should always get the answer as if those were constraints and not bounds (since we call them |
No that is right. From the MOI viewpoint, these 2 constraints should behave the same way. The wrapper needs to do the necessary transformation to make it so. |
I can't find references agreeing on a "standard" definition of infeasibility certificate. So let's just agree on some definition and use it. First off we agree that whatever definition we use it should be a clear proof that the problem is infeasible. We also probably agree that an infeasibility certificate may not be unique. One way to obtain it is to use the algorithm based on Farkas lemma in which case the obtained infeasibility certificate is sometimes called Farkas certificate. Definition 1) A set of multipliers for each constraint (excluding bounds) such that the linear combination of all constraints using those multipliers is not feasible with respect to variable bounds. with this definition, using the primal I posted in this PR
gives an infeasibility certificate if and only if such infeasibility certificate can be obtained by requesting the infeasibility ray from the solver. Definition 2) A set of multipliers for each constraint (including bounds) such that the linear combination of all constraints using those multipliers has the form
gives an infeasibility certificate if and only if such infeasibility certificate can be obtained through the infeasibility ray when bounds are passed as constraints. It can be also obtrained from the infeasibility ray without bounds passed as constraints through the following transformation:
Example using the same primal. Step 1: with
Step 2:
Definition 3): The same as Definition 2) but forces arbitrarily the sense of the resulting constraint. From remarks of @mlubin and @blegat, I guess that Definitions 2 and 3 are probably more suited to MOI which does not make a difference between bounds and constraints. |
I would vote for Definition 3. Note that it matches the definition of an unbounded ray of the dual with the dual defined here. Therefore the sense is not arbitrary, it follows from the convention we have taken for defining the dual program. |
Note that the reason we call it infeasibility certificate while it really is an unbounded ray of the dual is discussed here, here and here. In summary, most solver actually find an unbounded ray of the primal/dual and stop without checking for the existence of a feasible point. Therefore they only certify the infeasibility of the dual/primal and not really the unboundedness of the primal/dual. This why we talk about infeasibility certificate and not about unbounded ray in MOI. An unbounded ray should be composed of two elements, a feasible point and a feasible ray that makes the objective grow unbounded. Most solver only find the second element and call it an unbounded ray which is misleading. |
@IssamT It might still be good to add your test as a new test if you modify it to take the dual variables of the bounds into account. |
OK. I'll wait until we merge #127, to avoid conflicts. |
You can add it as a separate test i.e. |
Yes, definition 3 seems appropriate. The rays must be consistent with the discussion at http://www.juliaopt.org/MathOptInterface.jl/latest/apimanual.html#Duals-1. |
cc @odow