Skip to main content

Getting the value of a GRBVar in C++ before optimization

Answered

Comments

1 comment

  • Jaromił Najman
    • Gurobi Staff

    The X attribute is the value of a previously found feasible solution point. This attribute won't be available and will result in an error as long as no feasible solution has been found. To find a feasible solution, you have to run the optimization for at least some time to find at least one feasible solution point. Thus, accessing this attribute before calling model.optimize() will not work.

    0

Please sign in to leave a comment.