Originally posted by: snpny
Hi,
Im new in CPLEX and I am tyring to run a vehicle routing problem on CPLEX, but feasible solution cant be found, probably because of mistakes in writing subtour elemination constraints and so I have unfeasible solution. I will be really appreciate if you can help me!
Here is one troubled constrain;
forall (i in busstops, j in busstops: j!=i)
c06:
u[i]-u[j]+ Q*x[<i,j>] +
(x[<j,i>]*(Q-q[i]-q[j])) <= Q-q[j];
CPLEX solve this constraint for node {2,3} and {2,4} as follows;
u[2]+u[3]*(-1)+x[<2,3>]*30+0 <= (-6)+30
u[2]+u[4]*(-1)+x[<2,4>]*30+0 <= (-7)+30
As it is seen the bold part always calculated as zero. I have same results with other similar constraints.
Im also attaching paramteres and objective function.
int n=...;
range routingpoints= 1..n+1;
range busstops= 2..n;
tuple node {
int i;
int j;
}
setof (node) nodes= {<i,j> | i,j in routingpoints : i!=j};
float p=...;
float f=...;
float Q=...;
float D=...;
float q[routingpoints]=...;
float d[nodes]=...;
dvar boolean x[nodes];
dvar int+ m;
dvar int+ u[busstops];
dvar int+ v[busstops];
minimize sum(<i,j> in nodes) d[<i,j>]*x[<i,j>]*p + f*m;
#CPLEXOptimizers#DecisionOptimization