Skip to main content

Warning: At least one constraint uses '==' instead of '=' as sense

Answered

Comments

1 comment

  • Alison Cozad
    Gurobi Staff Gurobi Staff

    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
    End 

    However, 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
    End 

    and 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

Please sign in to leave a comment.