Skip to main content

Error reading LP format file.. Unrecognized constraint RHS or sense

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Jaromił Najman
    • Gurobi Staff

    Hi Michael,

    From the LP format documentation:

    Each constraint starts with an optional label (constraint name, followed by a colon, followed by a space), continues with a linear expression, followed by an optional quadratic expression (enclosed in square brackets), and ends with a comparison operator, followed by a numerical value, followed by a line break.

    So a constraint in the form

    y_1 >= x_12 \select node if connected

    is not accepted and has to be written as

    y_1 - x_12 >= 0 \select node if connected

    Moreover, please note that \(\texttt{1/2}\) will not be interpreted as \(\texttt{0.5}\) but as \(\texttt{1}\) by the LP format. Thus, you should always use floating point numbers when working with optimization file formats.

    Best regards, 
    Jaromił

     

    0
  • Michael Plank

    Thank you!

    0

Post is closed for comments.