Skip to main content

Converting equations into constraints

Answered

Comments

2 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.
  • Marika Karbstein
    • Gurobi Staff

    Your constraints look ok. But you also need to define your decision variables as Gurobi variables, for example

    Q_ug = m.addVars(u, g, vtype=gp.GRB.INTEGER, name="Q_ug")

    You can also write a model file in the end with m.write("Test.lp") and check if the formulation looks like you expected.


    0

Post is closed for comments.