Skip to main content

Equipment assigned twice despite constraint

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    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.
  • Alexandre Touzet
    • Gurobi-versary
    • First Comment
    • First Question

    Hello, if my post isn't in the proper section please tell me, or transfer it if possible...

    I really don't know what is wrong with my code as one piece of equipment shouldn't be able two times at the same time right?

    Please I really need someone's help, I am fairly new to optimization and gurobi

    0
  • Mario Ruthmair
    • Gurobi Staff

    Hi Alexandre,

    It is quite some effort to debug such a code. We usually recommend to do the following:

    • Create a tiny artificial instance of your problem where you can already observe that the obtained solution violates some constraints.
    • Write out the model in readable form as LP file (which you are already doing).
    • If the solver terminates with status OPTIMAL, all included constraints should be respected (subject to some very small violations -- by default around 1e-6 -- resulting from limited precision computation).
    • In nearly all cases, some constraints are missing in the model, they have been wrongly implemented, or they are mathematically wrong.
    • These cases can usually be found by analyzing the LP model file together with the found solution values.

    Best regards,
    Mario

    0

Post is closed for comments.