Hi There,
Am trying to solve an MILP using proc opt, which I know is infeasible. To know the source of this structural infeasibility, am calling out IIS=ON option and then print "constraint.status". However, this lists one IIS at a time. I fix it and run IIS again; it comes up with another IIS. My problem has multiple IIS and I want to list all of them at one go, so I can make changes accordingly How can I list all the IIS at once? Any idea / experience anyone?
-Thanks,
-Mike
There are two things you can try:
First, if the constraints all come from the same declaration, i.e.
con DontDoIt{i in SETI}: ...
then you can try relaxing all of the DontDoIt constraints.
Second, a little bit more work, but probably closer to what you want, you could put the solve statement in a loop and keep track of the constraints removed at each step until the problem is feasible.
Combining this IIS example with the information about problem symbols:
proc optmodel presolver=none;
/* declare variables */
var x{1..3} >=0;
/* upper bound on variable x[3] */
x[3].ub = 3;
/* objective function */
min obj = x[1] + x[2] + x[3];
/* constraints */
con c1: x[1] + x[2] >= 10;
con c2: x[1] + x[3] <= 4;
con c3: 4 <= x[2] + x[3] <= 5;
num iteration init 1;
set IIS{1 .. iteration} init {};
do while (1);
solve with lp / iis = on;
IIS[iteration] = {ci in 1 .. _NCON_: _CON_[ci].status ~= ''};
if card(IIS[iteration]) = 0 then leave;
for {ci in IIS[iteration]: _CON_[ci].status = 'I_L'}
_CON_[ci].lb = -constant('big');
for {ci in IIS[iteration]: _CON_[ci].status = 'I_U'}
_CON_[ci].ub = constant('big');
iteration = iteration + 1;
end;
iteration = iteration - 1;
for {ii in 1 .. iteration}
put IIS[ii]=;
quit;
There are two things you can try:
First, if the constraints all come from the same declaration, i.e.
con DontDoIt{i in SETI}: ...
then you can try relaxing all of the DontDoIt constraints.
Second, a little bit more work, but probably closer to what you want, you could put the solve statement in a loop and keep track of the constraints removed at each step until the problem is feasible.
Combining this IIS example with the information about problem symbols:
proc optmodel presolver=none;
/* declare variables */
var x{1..3} >=0;
/* upper bound on variable x[3] */
x[3].ub = 3;
/* objective function */
min obj = x[1] + x[2] + x[3];
/* constraints */
con c1: x[1] + x[2] >= 10;
con c2: x[1] + x[3] <= 4;
con c3: 4 <= x[2] + x[3] <= 5;
num iteration init 1;
set IIS{1 .. iteration} init {};
do while (1);
solve with lp / iis = on;
IIS[iteration] = {ci in 1 .. _NCON_: _CON_[ci].status ~= ''};
if card(IIS[iteration]) = 0 then leave;
for {ci in IIS[iteration]: _CON_[ci].status = 'I_L'}
_CON_[ci].lb = -constant('big');
for {ci in IIS[iteration]: _CON_[ci].status = 'I_U'}
_CON_[ci].ub = constant('big');
iteration = iteration + 1;
end;
iteration = iteration - 1;
for {ii in 1 .. iteration}
put IIS[ii]=;
quit;
Thanks Leo. This gives me some direction to think.
Thank you very much. Shall try the second approach.
You're welcome!