CPLEX 12.7.0.0: integer infeasible problem i don't find any error, help

1,648 views
Skip to first unread message

Ale B

unread,
Feb 25, 2017, 9:59:50 AM2/25/17
to AMPL Modeling Language
Hi, for a university small - project i install a AMPLIDE trial versione attend my licese student.
When i try to run my model and data this error show:
CPLEX 12.7.0.0: integer infeasible.
0 MIP simplex iterations
0 branch-and-bound nodes
No basis.

but i cant unerstand why... someone can help me?
 
File .mod
set J; #indice prodotti
set D ordered; #indice dimensione
set R ordered; # indice rotazione 

param s{J,D,R} integer; #la dimensione dell'oggetto J, nella dimensione D nella rotazione R
param pesi{J} integer; #profitto ricavato dalla scelta dell'oggetto J
param S{D}integer ; #dimensione dello zaino nella dimensione D
#param X{J,D}; #le coordinate dell'angolo in basso a sinistra  e in profondita' dell'oggetto
param BigM;


var t{i in J} binary; #binaria che assume valore 1 se  si prende l'oggetto j
var b{i in J, j in J, d in D} binary;#binaria che assume valore 1 se l'oggetto i precede l'oggetto j nella dimensione d 
var p{i in J, k in R} binary; #binaria che assume valore 1 se l'oggetto j e' usato nella rotazione R
var X{j in J, d in D} integer >=0;


maximize profitto: sum{j in J} pesi[j]*t[j];


subject to capienza: sum {j in J} s[j,first(D),first(R)]*s[j,member(2,D),first(R)]*s[j,last(D),first(R)]*t[j]<=S[first(D)]*S[member(2,D)]*S[last(D)];

subject to overlap {j in J ,i in J: i<j}: sum {d in D} ( b[i,j,d]+b[j,i,d] ) <=t[i]+t[j]-1;

subject to knapsack_limit{d in D ,i in J}: X[i,d]+ sum {r in R} s[i,d,r]*p[i,r] <= S[d];

subject to limit_position_i{d in D ,i in J, j in J: i<j}: X[i,d]+ sum {r in R} s[i,d,r]*p[i,r] <= X[i,d] + BigM *( 1-b[i,j,d] ) ; #9

subject to limit_position_j{d in D ,i in J, j in J: i<j}: X[j,d]+ sum {r in R} s[j,d,r]*p[i,r] <= X[j,d] +BigM * (1-b[j,i,d]); #10

subject to coordinate_control {d in D ,i in J}: X[i,d]<= BigM*t[i];

subject to controllo_adiacente_i{d in D ,i in J, j in J}: b[i,j,d]<=t[i];#12

subject to controllo_adiacente_j{d in D ,i in J, j in J}: b[j,i,d]<=t[j];#13

file .dat
#insiemi
set J := 1 2 3 4 5;
set D := x y z;
set R= uno due tre quattro cinque sei;

#parametri
param s :=
[1, *, *]: uno due tre quattro cinque sei:=
x 5 5 2 2 5 5
y 5 2 5 5 5 2
z   2 5 5 5 2 5
[2, *, *]: uno due tre quattro cinque sei:=
x 3 3 2 2 2 2
y 2 2 3 3 2 2
z 2 2 2 2 3 3

[3, *, *]: uno due tre quattro cinque sei:=
x 4 4 2 2 3 3
y 2 3 3 4 4 2
z 3 2 4 3 2 4

[4, *, *]: uno due tre quattro cinque sei:=
x 3 3 2 2 1 1
y 2 1 3 1 3 2
z 1 2 1 3 2 3

[5, *, *]: uno due tre quattro cinque sei:=
x 4 4 4 4 4 4
y 4 4 4 4 4 4
z 4 4 4 4 4 4

;

param pesi :=
1 3
2 4
3 6
4 1
5 1
;

param S :=
x 5
y 5
z 3
;


param BigM:= 10000000000;

Robert Fourer

unread,
Feb 27, 2017, 12:29:18 PM2/27/17
to am...@googlegroups.com
CPLEX reports "infeasible" when there does not exist any solution that satisfies all of the bounds and constraints on your variables. CPLEX reports "integer infeasible" when there does not exist any solution that satisfies all of the bounds and constraints using only integer values for the variables defined as "binary" or "integer". When you receive one of these messages, you need to study your model and data to figure out why no feasible solution is possible.

It may help to ask CPLEX for an "irreducible infeasible subset" (IIS) of constraints and variable bounds. The IIS is a small collection of constraints and bounds that cannot be satisfied, even if all the other constraints and bounds are dropped. To request and view an IIS, set

option cplex_options 'iisfind=1';

(or add iisfind=1 to your existing cplex_options string). Then execute "solve" again, and after solving, display the members of the IIS with these statements:

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);

In your example this gives

ampl: display {i in 1.._ncons: _con[i].iis <> 'non'} (_conname[i],_con[i].iis);
: _conname[i] _con[i].iis :=
1 capienza mem
3 'overlap[3,1]' mem
6 'overlap[4,2]' mem
8 'overlap[5,1]' mem
10 'overlap[5,3]' mem
;

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

:_varname[j] _var[j].iis :=
;

so there are 5 constraints and no bounds in the IIS. You can now focus on figuring out why these 5 constraints cannot all be satisfied with the given data. To see what AMPL generated for these constraints, you can use

for {i in 1.._ncons: _con[i].iis <> 'non'} expand _con[i];

Bob Fourer
am...@googlegroups.com

=======

ana marisol el pro

unread,
Mar 20, 2021, 6:00:47 PM3/20/21
to AMPL Modeling Language
Hello, I have similar problem, gams shows me **** MODEL STATUS      10 Integer Infeasible.

this is my model:

SET
I     clientes/0*5/
N0(i)   deposito /0/
Nd(i)   N demanda(TT)conjunto de nodos de demanda no atendidos en el momento TT /1*5/
Ns(i)   N serviced(TT) conjunto de nodos que se sirven en el TT 
Nar(i)   N artificial(TT)conjunto de nodos intermedios artificiales para vehiculos que se dirigen en el momento TT
N0d(i)   N0+Nd
Nds(i)   Nd+Ns
N0sar(i)  N0+Ns+Nar
Ndsar(i)  Nd+Ns+Nar
N0dsar(i) N0+Nd+Ns+Nar
k  vehiculos /1*3/
t  tiempos /0*660/
Alias(i,j) 
;
Ns(i)=no;
Nar(i)=no;
N0d(i)=N0(i)+Nd(i);
Nds(i)=Nd(i)+Ns(i);
N0sar(i)=N0(i)+Ns(i)+Nar(i);
Ndsar(i)=Nd(i)+Ns(i)+Nar(i);
N0dsar(i)=N0(i)+Nd(i)+Ns(i)+Nar(i);

PARAMETERS
q(i)  demanda del nodo i(articulos)
/1   115
 2   165
 3   150
 4   63
 5   30/

QQ(k) capacidad del vehiculo (articulos)
/1  300
 2  300
 3  300/
  
QQTT(k) carga del vehiculo K en el momento TT(articulos)
/1  300
 2  300
 3  300/
 
e(i)    ventana de tiempo de inicio en el nodo i
/0   0
 1   60
 2   60
 3   120
 4   0
 5   180/

l(i)    finalizacion de la ventana de tiempo en el nodo i
/0   660
 1   600
 2   540
 3   600
 4   300  
 5   600/

s(i)  tiempo de servicio en el nodo i 
/0   45
 1   20 
 2   35
 3   90
 4   20
 5   40/
;

TABLE
tTT(i,j)   estimacion del tiempo de viaje del enlace entre los nodos i y j en el momento TT (minutos)

      0           1         2        3        4      5
0     0           34        40       28       32     24    
1     34          0         36       28       12     25   
2     40          32        0        51       30     24   
3     25          30        48       0        32     33  
4     32          9         32       32       0      17   
5     23          20        27       32       17     0
;

SCALAR
TT  hora de la ultima determinación o actualización de rutas /0/

*k(i)    vehiculo que en el momento TT se encuentra en el nodo i+Ns+Nar/1/

M     un numero positivo muy grande/660/
;

POSITIVE VARIABLE 
a(i,k)  inicio del servicio en el nodo i por el vehiculo k ;

free variable
z   variable de la funcion objetivo;
binary variable
x(i,j,k,t) es igual a 1 si el vehiculo k se aleja del nodo i al nodo j en el momento t de lo contrario es igual a cero;

Equations
FO,eq2,eq3,eq4,eq5,eq8,eq9,eq10,eq11a,eq11b,eq12;

FO..    z=e= SUM((i,j,k,t)${N0dsar(i) and N0d(j)},tTT(i,j)*x(i,j,k,t));

eq2(i)$Ndsar(i).. sum((j,k,t)$N0d(j),x(i,j,k,t)) =e= 1;

eq3(j,k)$Nd(j).. sum((i,t)$N0dsar(i),x(i,j,k,t))-sum((i,t)$N0d(i),x(j,i,k,t)) =e= 0;

eq4(k).. sum((j,t)$Nd(j),x('0',j,k,t)) =l= 1;

eq5(k).. sum((i,j,t)${N0sar(i) and N0d(j)},x(i,j,k,t))-sum((i,t)$Ndsar(i),x(i,'0',k,t)) =e= 0;

*eq6(i)$Nar(i).. sum((j)$N0d(j),x(i,j,k,'0'))=e=1;

*eq7(i)$Ns(i).. sum((j)$N0d(j),x(i,j,ks(i)))=e=1;

eq8(i,j,k,t)${N0dsar(i) and N0d(j)}..  a(i,k)+s(i)+tTT(i,j)-a(j,k)=l=(1-x(i,j,k,t))*M;

eq9(i,k,t)$Nds(i)..  e(i)* sum((j)$N0d(j),x(i,j,k,t))=l=a(i,k);

eq10(i,k,t)$Nds(i).. a(i,k)=l=(l(i)-s(i))*sum((j)$N0d(j),(x(i,j,k,t)));

eq11a(k).. e('0')=l=a('0',k);

eq11b(k).. a('0',k)=l=l('0');

eq12(k)..  QQTT(k)+sum((i,j,t)${Nds(i) and N0d(j)},(q(i)*x(i,j,k,t)))=l=QQ(k);


MODEL MODELO MATEMATICO VRP DINAMICO /all/;

SOLVE MODELO using MIP minimizing z;


the error shows:

EMAINING 71385 ENTRIES SKIPPED
GAMS Rev 237  WEX-VS8 23.7.3 x86/MS Windows             03/05/21 18:41:47 Page 4
G e n e r a l   A l g e b r a i c   M o d e l i n g   S y s t e m
Model Statistics    SOLVE MODELO Using MIP From line 127


MODEL STATISTICS

BLOCKS OF EQUATIONS          11     SINGLE EQUATIONS       91,254
BLOCKS OF VARIABLES           3     SINGLE VARIABLES       71,407
NON ZERO ELEMENTS       626,635     DISCRETE VARIABLES     71,388


GENERATION TIME      =        2.980 SECONDS     37 Mb  WIN237-237 Aug 23, 2011


EXECUTION TIME       =        2.980 SECONDS     37 Mb  WIN237-237 Aug 23, 2011
GAMS Rev 237  WEX-VS8 23.7.3 x86/MS Windows             03/05/21 18:41:47 Page 5
G e n e r a l   A l g e b r a i c   M o d e l i n g   S y s t e m
Solution Report     SOLVE MODELO Using MIP From line 127


               S O L V E      S U M M A R Y

     MODEL   MODELO              OBJECTIVE  z
     TYPE    MIP                 DIRECTION  MINIMIZE
     SOLVER  CPLEX               FROM LINE  127

**** SOLVER STATUS     1 Normal Completion         
**** MODEL STATUS      10 Integer Infeasible       
**** OBJECTIVE VALUE                0.0000

 RESOURCE USAGE, LIMIT          0.562      1000.000
 ITERATION COUNT, LIMIT         0    2000000000

IBM ILOG CPLEX   Jul 14, 2011 23.7.3 WIN 27723.27726 VS8 x86/MS Windows
--- GAMS/Cplex licensed for continuous and discrete problems.
Cplex 12.3.0.0

MIP status(119): integer infeasible or unbounded
Problem is integer infeasible.

Unexpected solution discarded


¿Can I help me?

AMPL Google Group

unread,
Mar 22, 2021, 9:43:36 AM3/22/21
to AMPL Modeling Language
This group focuses on questions about the AMPL modeling language. For help with the GAMS language, you can send questions to https://forum.gamsworld.org/.


--
Robert Fourer
am...@googlegroups.com
{#HS:1459809755-102938#}
Reply all
Reply to author
Forward
0 new messages