Skip to main content

How to Code a parameter in Gurobi/python interface

Answered

Comments

2 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 why not try our AI Gurobot?.
  • Richard Oberdieck
    • Gurobi Staff

    I have not looked at the last line in detail, however note the following:

    • The first for loop does not use the variable r, therefore it just creates the same 2D-array of variables over and over again.
    • You do not need to call m.update() at each step of the second for loop (in fact, you don't need to call it at all)
    • The last line needs to be indented, otherwise it is not valid Python syntax.
    • In your minimum working example, you do not describe C nor f, so it is not possible to make sure that the implementation of eq. (6) is correct.
    0

Post is closed for comments.