I would like to know which commands I need to have in my pyomo code to access the gurobi IIS and detect which constraint are making my model infeasible.
# Create an IMPORT Suffix to store the iis information that will
# be returned by gurobi_ampl
model.iis = Suffix(direction=Suffix.IMPORT)
instance = model.create('../DT8.dat')
instance.pprint()
opt = SolverFactory('gurobi')
opt.options['outlev'] = 1 # tell gurobi to be verbose with output
opt.options['iisfind'] = 1 # tell gurobi to find an iis table for the infeasible model
instance.preprocess()
results = opt.solve(instance,options="mipgap=0.20",tee=True,warmstart=True) #,options='logfile=gurobi.log' opt.solve(model, tee=True, warmstart=True)
instance.load(results)
***The GUROBI solver plugin cannot extract solution suffix=iis
Traceback (most recent call last):
File "C:\Users\Erik\Documents\workspace\InjPipeJul2015\src\App4ExactOffTake\__init__.py", line 382, in <module>
solve(instance)
File "C:\Users\Erik\Documents\workspace\InjPipeJul2015\src\App4ExactOffTake\__init__.py", line 348, in solve
results = opt.solve(instance,options="mipgap=0.20",tee=True,warmstart=True) #,options='logfile=gurobi.log' opt.solve(model, tee=True, warmstart=True)
File "c:\program files (x86)\python27\packages\coopr\src\coopr.opt\coopr\opt\base\solvers.py", line 325, in solve
result = self._postsolve()
File "c:\program files (x86)\python27\packages\coopr\src\coopr.plugins\coopr\plugins\solvers\GUROBI.py", line 464, in _postsolve
results = ILMLicensedSystemCallSolver._postsolve(self)
File "c:\program files (x86)\python27\packages\coopr\src\coopr.opt\coopr\opt\solver\shellcmd.py", line 165, in _postsolve
results = self.process_output(self._rc)
File "c:\program files (x86)\python27\packages\coopr\src\coopr.opt\coopr\opt\solver\shellcmd.py", line 215, in process_output
self.process_soln_file(results)
File "c:\program files (x86)\python27\packages\coopr\src\coopr.plugins\coopr\plugins\solvers\GUROBI.py", line 323, in process_soln_file
raise RuntimeError("***The GUROBI solver plugin cannot extract solution suffix="+suffix)
RuntimeError: ***The GUROBI solver plugin cannot extract solution suffix=iis
Thanks in advance for help and guidance.