[AMPL 15275] Where is the error? Vehicle Routing Problem with Time Window (VRPTW) CPLEX 12.7.1.0: integer infeasible. 0 MIP simplex iterations 0 branch-and-bound nodes No basis.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[AMPL 15275] Where is the error? Vehicle Routing Problem with Time Window (VRPTW) CPLEX 12.7.1.0: integer infeasible. 0 MIP simplex iterations 0 branch-and-bound nodes No basis.

alexandrepsv10
CPLEX 12.7.1.0: integer infeasible.
0 MIP simplex iterations
0 branch-and-bound nodes
No basis.

Where is the error?

#conjunto de veículos
param m := 2;
set V:= {1..m};

#clientes
param n;
let n:=5;
 
 
#conjunto de consumidores sendo 0 e n+1 o depósito central
set C:= {1..n+1};
 
#capacidade de cada veículo, considerando a frota homogênea 3000kg
param Q:= 3000 ;

#contante de valor grande
param K:= 9999;


#distancia de i para j
param c {i in C, j in C};
let {i in C, j in C:  i<>j} c[i,j] := 10 + Uniform01()*10;

#tempo de i para j
param t {i in C, j in C: i<>j};
let {i in C, j in C:  i<>j} t[i,j] := 10 + Uniform01()*10;

#demanda de cada cliente i
param q {i in C};
let {i in C} q[i] := 10 + Uniform01()*10;;

#tempo de serviço de cada cliente i
param ts {i in C};
let {i in C} ts[i] := 10 + Uniform01()*10;;

#inicio janela de tempo
param a {i in C};
param b {i in C};
let {i in C} a[i] := 480;
let {i in C} b[i] := 1080;

#variaveis

#intante de chegada deum veiculo v a um consumidor i
var s {i in C, v in V} >=0;

var x {i in C, j in C, v in V: i<>j}, binary;



#função objetiva 2.6
minimize dist_total: sum {i in C, j in C, v in V: i<>j} c[i,j] * x[i,j,v];


#somente 1 veículo chegue a cada cliente 2.7
subject to c1 {i in C}: sum {v in V, j in C: i<>j} x[i,j,v] = 1;

#a demanda atendida nao pode superar a capacidade co veículo
subject to c2 {v in V}: sum {i in C} q[i] *  sum {j in C: i<>j} x[i,j,v] <= Q;

#garantir a saida do depósito
subject to c3 {v in V}: sum {j in C: j<>1} x[1,j,v] = 1;

#garantir a volta do depósito
subject to c4 {v in V}: sum {i in C: i <> 1} x[i,1,v] = 1;


#continuidade das rotas
subject to c5 {v in V}: sum {i in C, j in C: i<>j} x[i,j,v] - sum {j in C, i in C: j<>i} x[j,i,v]  = 0;

#janela de tempo
subject to c6 {i in C, j in C, v in V: i<>j}: s[i,v] + ts[i] + t[i,j] - K*(1 - x[i,j,v]) <= s[j,v];

#chegada dentro da janela de tempo
subject to c7 {i in C, v in V}: a[i]<= s[i,v] <= b[i];

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.