How do I model conditional statements with equal in Gurobi?
AnsweredI have two CONTINUOUS variables X and Y, which represent the x and y coor.
And one binary Service which means (X,Y) is serviced (reached).
So the relationship is like:
if X==0.5 and Y==1.3, then binary Service==1
how to write it down in gurobi python code? thank u
0
-
Official comment
This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Carol!
It's not clear to me what the relationship is between the binary Service variable and the X and Y variables. Is there just a single Service variable?
Maybe this article can help you model your problem: How do I model conditional statements in Gurobi? – Gurobi Help Center
Cheers,
Matthias0
Post is closed for comments.
Comments
2 comments