Skip to main content

gurobipy - How can I get the tupledict object using model.getVars()?

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff 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?.
  • Matthias Miltenberger
    • Gurobi Staff Gurobi Staff

    Hi Angus,

    One easy trick to access your variables inside the callback is to just add them as members to the model, as it is done in the callback example that comes with Gurobi:

        model._vars = x

    Cheers,
    Matthias

    0
  • Angus Kenny
    • Gurobi-versary
    • First Comment
    • First Question

    awesome, thanks a lot! that worked perfectly

    0

Post is closed for comments.