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

Priority Model: Penalty for non-consideration of job priority -> Indicator if difference is positive or negativ

ユーザーの入力を待っています。

コメント

2件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff 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?.
  • Mario Ruthmair
    • Gurobi Staff Gurobi Staff

    Hi Armin,

    The reason why the script above leads to an infeasible model is that continuous variables have a default lower bound of 0, i.e., your diff variables are not allowed to have negative values. You can just add

    ..., lb=-GRB.INFINITY, ...

    to your addVar() call for the diff variables. Then, a solution of 1 is found for the model.
    Is that correct?

    Best regards,
    Mario

    0

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