Modeling of conditional constraints
AnsweredHi,
Is there any way to modeling a conditional constraint like follows:
if x > X0, then y = 1
if x = X0, then y = 0
where x and y are decision variables, and X0 is a predefined constant number.
Thanks.
0
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi,
This stackexchange post should answer your question How to write if else statement in linear programming?
Note that strict inequalities are not allowed in (mixed-integer) linear programming due to compactness assumptions.
Best regards,
Jaromił0 -
Hi Jaromił,
Many thanks for your answer.
Kind regards,
Yongning
0
Post is closed for comments.
Comments
3 comments