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

Model became infeasible after adding "difference to mean" variables and constraints

回答済み

コメント

2件のコメント

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

    Variables added with Model.addVar() or Model.addVars() are nonnegative by default. Thus, the \( \texttt{diff_to_mean} \) variables are all nonnegative. There almost certainly exists \( \texttt{i} \) for which \( \texttt{utilization_rate[i] - mean_utilization} \) is negative, which would result in an infeasible model. To resolve this, you can try setting the \( \texttt{lb} \) keyword argument when defining the \( \texttt{diff_to_mean} \) variables:

    diff_to_mean = m.addVars(facility_list, lb=-gp.GRB.INFINITY, name='diff_to_mean')
    0

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