1
votes

How can I make strict constraint in Julia JuMP?(https://github.com/JuliaOpt/JuMP.jl).

For example:

2x-3y>15
1
Have you been through the Quick Start Guide? If so then please show some sample code of what you tried :)Alexander Morley
Dear Mr.Morley I checked Quick Start Guide but I couldn't find strict constraint there for example if I want to use a strict constraint in a OR model. How can I make it?Soma

1 Answers

3
votes

It seems that none of the solvers accept strict constraints because of the way they solve the problem and to avoid some issues!

Here is what Gurobi says: Gurobi supports a limited set of comparators. Specifically, you can constrain an expression to be less-than-or-equal, greater-than-or-equal, or equal another. We do not support strict less-than, strict greater-than, or not-equal comparators. While these other comparators may seem appropriate for mathematical programming, we exclude them to avoid potential confusion related to numerical tolerances. Consider a simple example of a strict inequality constraint on a pair of continuous variables: $x > y$. How large would $x-y$ need to be in order to satisfy the constraint? Rather than trying to embed a subtle and potentially confusing strategy for handling such constraints into the solver, we've chosen not to support them instead.

http://www.gurobi.com/documentation/7.5/refman/constraints.html

Solution if you really need Try to implement a non-strict constraint and put a slack variable to manage this issue Example: 2x-3y>15 Turns to 2x-3y+slackvar >=15