GRB.OPTIMAL =2 when model is infeasible?

252 views
Skip to first unread message

Bryce Stansfield

unread,
Mar 24, 2019, 11:31:59 AM3/24/19
to Gurobi Optimization
Basically, I'm running a model atm that's infeasible, as confirmed by the print out:
Capture.PNG
















But immediately after that I printed out the GRB.OPTIMAL code (as seen on the bottom of the screenshot), and it was 2???

Does anyone have any idea why this is happening?

Ed Rothberg

unread,
Mar 24, 2019, 12:50:52 PM3/24/19
to Gurobi Optimization

GRB.OPTIMAL is a constant; it is always equal to 2.  You should be looking the Status attribute.  Consult any of the examples to see how to do this.

Reply all
Reply to author
Forward
0 new messages