Soma
Soma

Reputation: 743

How can I make strict constraint in the Julia JuMP software?

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

For example:

2x-3y>15

Upvotes: 1

Views: 1251

Answers (1)

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

Upvotes: 3

Related Questions