Description
To minimize differences when refactoring, we kept the same parsing behavior as JuMP. That means, constraints like x^2 <= 1
get parsed into x^2 - 1 <= 0.0
:
MathOptInterface.jl/src/Nonlinear/parse.jl
Lines 242 to 259 in 1af7064
Changing this behavior would lead to more informative RHSs being passed to the solvers, and remove an additional operation. However, doing so would break JuMP's tests and printing, which have things like this:
MathOptInterface.jl/test/Nonlinear/Nonlinear.jl
Lines 296 to 303 in 1af7064
As suggested by @blegat #1804 (comment), one option is to remove the ability to specify constraints as a <= b
, and instead force add_constraint(model, f, set)
, and then make JuMP keep the existing behavior.