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

L1 distance

回答済み

コメント

3件のコメント

  • 正式なコメント
    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?.
  • Jaromił Najman
    • Gurobi Staff

    Hi Lorenzo,

    The default lower bound of variables is 0. However, you want that your \(\texttt{z}\) variables also attain negative values. Thus, you have to write

    z = m.addVar(lb=-GRB.INFINITY)

    in both \(\texttt{abs_diff}\) functions.

    Best regards,
    Jaromił

    1
  • Lorenzo Steccanella
    • Gurobi-versary
    • First Question
    • First Comment

    Amazing!... thanks a lot Jaromił!

    0

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