Skip to main content

ABS Function may not work

Answered

Comments

2 comments

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

Please sign in to leave a comment.