Skip to content
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

What to do with constants for results of InfeasibilityCertificate #433

Closed
3 tasks
Tracked by #1345
blegat opened this issue Jul 27, 2018 · 4 comments · Fixed by #1660
Closed
3 tasks
Tracked by #1345

What to do with constants for results of InfeasibilityCertificate #433

blegat opened this issue Jul 27, 2018 · 4 comments · Fixed by #1660
Labels
Type: Documentation This issue requires changes to the documentation
Milestone

Comments

@blegat
Copy link
Member

blegat commented Jul 27, 2018

When the status is InfeasibilityCertificate, the results should be the result of the homogenized version.
For instance, for the problem

min x
x <= -1
x >= 0

with dual

max -y
1 - y >= 0
y <= 0

or equivalently

max -y
1 - y - z = 0
y <= 0
z >= 0

The dual has an infeasibility ray y = -1 (with z = 1). When asking for the constraint dual of x >= 0, this the value of the constraint 1 - y >= 0 in the first case or to the value of z in the second case.
In the first case, one could think it should be 1 - (-1) = 2 but it should be z = 1 in the second case.
The reason is that since it is a ray, it is a feasible solution to the problem with the constant terms removed (which is equivalent to setting the objective of the primal to zero).

By consistency, the when asking for ConstraintPrimal when the primal status is InfeasibilityRay, it should also not take the constant of the function into account.

Moreover, if the objective function has a constant, then it should not be included in the value of the objective value / objective bound for InfeasibilityRay.
Indeed, the objective can be moved to a constrant by adding a new variable and then by consistency, it should not be included since it is in a constraint.

Currently, in MOI.Test, we have tests with infeasibility rays in the dual and the values expected by the tests are the correct ones. The reason is that the MOI definition of the dual is the second case of the introduction example above.
However, we have not test with the objective of the dual nor with infeasibility ray in the primal and for these it is might be much more confusing.

What do you think ? Do you agree that the constants should be removed from the results of rays in ConstraintPrimal and objective value/bound ?
If yes, we should:

  • Add a section about this in the doc
  • Thoroughly test it
  • Test ConstraintPrimal of VectorizeBridge with a DUAL_INFEASIBLE example with nonzero constant for a scalar constraint
@mlubin
Copy link
Member

mlubin commented Jul 30, 2018

I think this isn't tested because it's a pretty uncommon question to ask. How do solvers like Mosek behave? Will the wrappers get homogenized values back from the solvers or will they have to compute them?

@blegat
Copy link
Member Author

blegat commented Jul 30, 2018

The solvers seem to return the homogenized values for dual certificates as the MOI tests requires the homogenized values and currently, there has been no complaint.
For the objective, most of the solvers do not support constants in the objective so it's the wrapper's job to not put the constant. For primal certificates I guess solvers also give the homogenized version but we'll have to check. What's tricky for primal is that some wrappers might play with the constant in the function and then add it manually when the user ask for ConstraintPrimal. In that case, that might introduce a but when asking for the constraint primal. Also when the dual bounds of the variables are built manually (e.g. JuliaOpt/LinQuadOptInterface.jl#41), when the status of the dual is InfeasibilityCertificate, the objective of the primal should not be added.

@odow odow added the Type: Documentation This issue requires changes to the documentation label Nov 10, 2018
@odow
Copy link
Member

odow commented Aug 23, 2021

Related TODOs:

@odow odow mentioned this issue Aug 23, 2021
10 tasks
@odow odow added this to the v1.0 milestone Nov 11, 2021
@odow
Copy link
Member

odow commented Nov 15, 2021

Indeed, the objective can be moved to a constraint by adding a new variable and then by consistency, it should not be included since it is in a constraint.

Yes, I think this is the right way to think about it. I'll add a background section on this in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation This issue requires changes to the documentation
Development

Successfully merging a pull request may close this issue.

3 participants