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

ABS Function may not work

回答済み

コメント

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.
  • Silke Horn
    • Gurobi Staff

    Hi,

    The issue is the lower bound of diff1. By default, variables have a lower bound of 0. Your solution x=-1 and y=0 is infeasible since it would require diff1=-1. If allow negative values for for diff1, you get the solution you expect.

    Silke

    0
  • Koji Nakano
    • Gurobi-versary
    • First Comment
    • First Question

    Thank you.
    I understand.
    I can achieve the expected result by adding '-Inf <= diff1 <= Inf'.

    0

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