Search code examples
pythonoptimizationmathematical-optimizationlinear-programminggurobi

Why is the gurobi model infeasible?


Get quite confused by the infeasible model output.

It seems easy to solve the model by hand, and every variable can be determined. Where did I go wrong?

enter image description here


Solution

  • It's infeasible because of constraint R27:

    -qt[0] - It[0] + It[1] = -257
    

    qt[0] is 0 because of constraints GC1 and R56. It[0] is fixed to 72 and that leaves It[1] to be -185 but It[1] is a non-negative variable so it cannot take this value.

    Please consider that variables are non-negative by default.