Generating IIS with GUROBI

154 views
Skip to first unread message

Tora Husar

unread,
Oct 15, 2021, 1:35:56 PM10/15/21
to AMPL Modeling Language
Hello,

I have an infeasible model, and I have seen that previous posts in this forum recommend generating an IIS in order to identify the constraints causing the infeasibility. I have tried to use commands such as 

display {i in 1.._ncons: _con[i].iis != "non"} _conname[i]

but when I do, I get a "Bad suffix .iis for _con" error message. I am using Gurobi 9.1.2. Is there any other way I can generate an IIS?

Thank you!

AMPL Google Group

unread,
Oct 15, 2021, 6:14:24 PM10/15/21
to AMPL Modeling Language
Normally Gurobi defines the suffix .iis when you include iisfind=1 in your gurobi_options string. (If you don't yet have a gurobi_options string, add the AMPL command

option gurobi_options 'iisfind=1':

before solving.) However, if your display statement


display {i in 1.._ncons: _con[i].iis != "non"} _conname[i]

is inside a for or repeat loop that includes your solve statement, then AMPL will see the .iis suffix before Gurobi has a chance to define it. In this situation, give the command

suffix iis OUT;

before the beginning of the loop.

If you need more help, copy your AMPL session -- what you typed and what AMPL displayed -- and paste it into a reply; also attach your run file, if any.


--
Robert Fourer
am...@googlegroups.com
{#HS:1663356904-106717#}

Tora Husar

unread,
Oct 15, 2021, 11:23:47 PM10/15/21
to AMPL Modeling Language
Thank you, that worked!
Reply all
Reply to author
Forward
0 new messages