Detecting infeasibility in Gurobi-Matlab Interface

515 views
Skip to first unread message

Assad Rafeal

unread,
Feb 10, 2014, 4:59:16 AM2/10/14
to gur...@googlegroups.com
Hi all,

Can someone tell me how can i know the constraint that is causing infeasibility in Gurobi-Matlab Interface? 

When I solve my optimization problem, i get the status "INFEASIBLE", objbound "Inf" and other information. I need to know which constraint is causing the infeasiblity so that i can apply some remedies.

Thanks

Jakob Sch.

unread,
Feb 10, 2014, 6:22:05 AM2/10/14
to gur...@googlegroups.com
Hi Assad,

See the manual:
If the model is an unbounded linear program and the infunbdinfo parameter is set to 1, the field unbdray will be present. Finally, if the model is an infeasible linear program and the infunbdinfo parameter is set to 1, the fields farkasdual and farkasproof will be set.  
from http://www.gurobi.com/documentation/5.6/reference-manual/matlab_gurobi

If this is not the case for your problem, I would advise you to write out the model to a LP/MPS file (LP file is better readable but beware of less accuracy in the coefficients) and then load it in the python interactive shell. There you have the computeIIS() command (see http://www.gurobi.com/documentation/5.6/reference-manual/py_model_computeiis) that gives you more info on the infeasibility of your problem. You can also try the feasRelax function (see http://www.gurobi.com/documentation/5.6/reference-manual/py_model_feasrelax) for a feasibility relaxation.

Best regards,
Jakob

Assad Rafeal

unread,
Feb 10, 2014, 7:22:30 AM2/10/14
to gur...@googlegroups.com
Thanks Jakob,

My model MIP. I have only the following fields: status, versioninfo, objbound, itercound, baritercount and nodecount.

Jakob Sch.

unread,
Feb 10, 2014, 8:22:36 AM2/10/14
to gur...@googlegroups.com
Hi Assad,

As already mentioned you will have to write your model to a LP/MPS file and do some infeasibility analysis via the python shell. To do so follow http://www.gurobi.com/documentation/5.6/reference-manual/matlab_gurobi_write and then use the above mentioned methods for further investigation on your problem.

Best regards,
Jakob

Assad Rafeal

unread,
Feb 10, 2014, 9:21:59 AM2/10/14
to gur...@googlegroups.com
Unfortunately, i am not familiar with Python. 

Anyway, thanks Jakob

Stuart Mitchell

unread,
Feb 10, 2014, 8:21:47 PM2/10/14
to gur...@googlegroups.com
take the following file,

>gurobi.bat find_infeasibility.py your_lp_filename_goes_here.lp

then look at the file infeasible.ilp that it produces.

Stu


--
 
---
You received this message because you are subscribed to the Google Groups "Gurobi Optimization" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gurobi+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Stuart Mitchell
PhD Engineering Science
Extraordinary Freelance Programmer and Optimisation Guru
find_infeasiblity.py

Assad Rafeal

unread,
Feb 16, 2014, 5:22:03 AM2/16/14
to gur...@googlegroups.com
Thanks Stu, but i do not use python, i only use the gurobi matlab interface

Carlos Vergara

unread,
May 15, 2016, 9:33:58 AM5/15/16
to Gurobi Optimization
thank you very much ;)
best regards,

Carlos
Reply all
Reply to author
Forward
0 new messages