Warning: At least one constraint uses '==' instead of '=' as sense
AnsweredHi,
I'm receiving the following warning:
Warning: At least one constraint uses '==' instead of '=' as sense
Can someone help me with this?
Thank you,
Millend.
-
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 Millend,
Based on your error, I suspect you are using an LP file for your model. For LP files, equality constraints are defined using \(\texttt{=}\) rather than \(\texttt{==}\) .
For example, this LP will run fine:\ LP format - for model browsing. Use MPS format to capture full model detail.
Minimize
Subject To
R0: x = 1
Bounds
EndHowever, this LP file has the wrong sense:
\ LP format - for model browsing. Use MPS format to capture full model detail.
Minimize
Subject To
R0: x == 1
Bounds
Endand will give the following error:
Warning: At least one constraint uses '==' instead of '=' as sense.
As an aside, a lot of our customers prefer writing the model using one of our APIs (python, Java, C++, C, etc.) --- I certainly do. It helps is avoid a lot of these types of issues. Would you be interested in learning one of our other interfaces? If so, let me know your language preference, and I can send you some examples and our getting started guides.
Also, I see that you are one of our commercial customers. If you would like to have more comprehensive one-on-one support, you can always create a request at support.gurobi.com.0
Post is closed for comments.
Comments
2 comments