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

Questions about conditional statements in gurobi

回答済み

コメント

3件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Ronald van der Velden
    • Gurobi Staff
    • Indeed the ** operator can't be used with Gurobi variables. Consider using addGenConstrPow to define a helper variable holding YSAL_t[t]**0.624 and then use that helper variable in your indicator constraint.
    • The other error message is shown because the fourth (unnamed) argument to addGenConstrIndicator, is normally the "sense" of the constraint (e.g. <=, >=, ==). Since you include that already in the third argument, you should explicitly mention the argument name by stating name=f"RD_t_{t}_constraint". See also this question.
    0
  • Kewei Fan
    • Gurobi-versary
    • First Question
    • Conversationalist

    Thank you very much for your answer!

    0

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