Skip to main content

Infeasibility of model due to new constraints

Answered

Comments

2 comments

  • Official comment
    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.
  • Jaromił Najman
    • Gurobi Staff

    Your issue is not reproducible because variable \(\texttt{y[plant]}\) is not defined.

    After computing the IIS, you can write it to a file

    model.write(iis.ilp)

    and open the IIS file \(\texttt{iis.ilp}\) in any standard text editor. You can then analyze the constraints in the IIS and try to find out why they together are infeasible.

    You are saying that the 2 constraint found by the IIS algorithm are demand and singleflag

    model.addConstr(gp.quicksum(x[plant, warehouse] for plant in plants) >= warehouse_demands[warehouse])
    model.addConstr(gp.quicksum(x[plant, warehouse] for plant in plants) == 1

    These 2 constraint are incompatible because \(\texttt{warehouse_demands[warehouse] > 1}\).

    I guess your \(\texttt{y}\) variable is a binary assignment constraint which you wanted to use in the singleflag constraint instead of \(\texttt{x}\).

    0

Post is closed for comments.