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

Unbound Local Error

回答済み

コメント

4件のコメント

  • 正式なコメント
    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?.
  • Jose Vindel
    • Gurobi-versary
    • Thought Leader
    • Investigator

    I tried to declare vis as global but still can't get it to work, any ideas?

    0
  • Eli Towle
    • Gurobi Staff

    It looks like you are missing a call to i.optimize(). As a result, the model's status is not \( \texttt{GRB.OPTIMAL} \), so \( \texttt{vis} \) is never assigned a value.

    0
  • Jose Vindel
    • Gurobi-versary
    • Thought Leader
    • Investigator

    Such a rookie mistake! I can't believe I missed this, thanks for your reply!

    0

投稿コメントは受け付けていません。