Operations Research topics: SAS/OR,
SAS Optimization, and SAS Simulation Studio

IIS Option

Accepted Solution Solved
Reply
Contributor
Posts: 22
Accepted Solution

IIS Option

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


Accepted Solutions
Solution
‎06-04-2013 11:22 PM
SAS Employee
Posts: 37

Re: IIS Option

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;

View solution in original post


All Replies
Solution
‎06-04-2013 11:22 PM
SAS Employee
Posts: 37

Re: IIS Option

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;

Contributor
Posts: 22

Re: IIS Option

Thanks Leo. This gives me some direction to think.

Thank you very much. Shall try the second approach.

SAS Employee
Posts: 37

Re: IIS Option

You're welcome!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 414 views
  • 0 likes
  • 2 in conversation