メインコンテンツへスキップ

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

回答済み

コメント

1件のコメント

  • 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

サインインしてコメントを残してください。