Ranking with ILP

40 views
Skip to first unread message

MD NOOR E ALAM .

unread,
Apr 20, 2015, 11:10:31 PM4/20/15
to am...@googlegroups.com
Dear All:

I am trying to develop a AMPL ILP model to select some objects from a set of objects to maximize sum of rank of the value for each object: 

maximize obj: sum {l in 1..T3} h[l]*(1-t[l]);

subject to rank1 {l in 1..T3,k in 1..T3}: g[l,k]+u[l]+u[k]-2<=z[l,k];
subject to rank2 {l in 1..T3,k in 1..T3}: u[l]>=z[l,k];
subject to rank3 {l in 1..T3,k in 1..T3}: u[k]>=z[l,k];
subject to rank4 {l in 1..T3,k in 1..T3}: g[l,k]>=z[k,l];
subject to rank5 {l in 1..T3}: h[l]=sum{k in 1..T3}z[l,k]+u[l];

Here t,g are binary parameters. g[l,k] is 1 if value for l is greater than k. t is also a binary parameter.

u,z are binary variables. z is 1 if u and g are 1. h is also variables represents the value of ranks. When I try to solve with CPLEX, it is showing integer infeasibility.

Any help would be highly appreciated.

Best Regards

Noor

Robert Fourer

unread,
Apr 21, 2015, 6:37:45 PM4/21/15
to am...@googlegroups.com
CPLEX reports "integer infeasibility" for a MIP when there is no possible assignment of values to the variables that respects integrality of the integer variables and that also satisfies all of the constraints.

To get some help from CPLEX -- if you can't find the cause of the infeasibility by reading your model carefully -- try adding 'iisfind=1' to your cplex_options string, and running "solve;" again. Then CPLEX will report an irreducible infeasible subset (an "IIS") of constraints and variable bounds. This subset alone is infeasible, and it is minimal, in the sense that removing any one bound or constraint will make it feasible. Use these commands to get a listing of what is in the IIS:

display {i in 1.._ncons: _con[i].iis <> 'non'} (_conname[i],_con[i].iis);
display {j in 1.._nvars: _var[j].iis <> 'non'} (_varname[j],_var[j].iis);

Also the following command will show you all of the constraints in the IIS, and the bounds on all the variables in the IIS:

expand {i in 1.._ncons: _con[i].iis <> 'non'} _con[i];
display {j in 1.._nvars: _var[j].iis <> 'non'} (_var[j].lb,_varname[j],_var[j].ub);

Bob Fourer
am...@googlegroups.com

=======
Reply all
Reply to author
Forward
0 new messages