Repository navigation
Document constraint primal better - #358
Conversation
Codecov Report
@@ Coverage Diff @@
## master #358 +/- ##
==========================================
- Coverage 96.27% 96.21% -0.06%
==========================================
Files 36 36
Lines 4723 4731 +8
==========================================
+ Hits 4547 4552 +5
- Misses 176 179 +3
Continue to review full report at Codecov.
|
|
|
||
| Given a constraint `function-in-set`, the `ConstraintPrimal` is the value of the | ||
| function evaluated at the primal solution of the variables. For example, given | ||
| the constraint `2x + y <= 1`, and a primal solution of `(x,y) = (1,2)`, the |
There was a problem hiding this comment.
There are multiple ways to encode this constraint in MOI, could help to be more precise (ScalarAffineFunction).
|
|
||
| Given a constraint `function-in-set`, the `ConstraintPrimal` is the value of the | ||
| function evaluated at the primal solution of the variables. For example, given | ||
| the constraint `ScalarAffineFunction([x,y], [1, 2], 3)`-in-`LessThan(0)` and |
There was a problem hiding this comment.
Maybe an example with LessThan(4) would be better to show that this value is not used in the constraint primal.
|
|
||
| Given a constraint `function-in-set`, the `ConstraintPrimal` is the value of the | ||
| function evaluated at the primal solution of the variables. For example, given | ||
| the constraint `ScalarAffineFunction([x,y], [1, 2], 3)`-in-`LessThan(4)` and |
There was a problem hiding this comment.
Mmm. Now this is a bit weird because ScalarAffineFunction([x,y], [1, 2], 3)-in-LessThan(4) is not idomatic MOI. We expect these constraints to be normalized so the left-hand side has zero in the constant (i.e., solvers aren't expected to support otherwise).
There was a problem hiding this comment.
There was a problem hiding this comment.
http://www.juliaopt.org/MathOptInterface.jl/stable/apimanual.html#JuMP-mapping-1
That said, from the perspective of JuMP, solvers can safely choose to not support the following constraints:
- ScalarAffineFunction in GreaterThan, LessThan, or EqualTo with a nonzero constant in the function. Constants in the affine function should instead be moved into the parameters of the corresponding sets.
There was a problem hiding this comment.
Using zero in the function instead of 3 seems to be the way to go
There was a problem hiding this comment.
I changed it to the Interval set instead.
Closes #220