Skip to main content

how to output the decision variable values in gurobi?

Answered

Comments

2 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?.
  • Sonja Mars
    Gurobi Staff Gurobi Staff

    You can simply look at the X attribute of your variables. Here is an example of how to do this in Python. Before accessing the X attribute, please make sure to check if a solution is available. If you are trying to query the solution values, but there is no solution this will result in an error.

    Best,

    Sonja

    0

Post is closed for comments.