1

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

For example:

2x-3y>15
2
  • 3
    Have you been through the Quick Start Guide? If so then please show some sample code of what you tried :) Commented Feb 13, 2018 at 9:42
  • 1
    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? Commented Feb 21, 2018 at 7:10

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.