Big M and Cplex

Hi
I’m currently trying to run a simple VRPTW (with 30 nodes) gams code. it has Big M in one the equations as u can see:
eq7 (arc1(i,f),k)… s1(f,k)=g=s1(i,k) + t1(i,f) ;

The value of big M extremely effects the solver performance, for example when I set M, 100000000(9 zeros), gams couldnt find a feasible solution withing 3000secs. but a big M with 10 zeros, worked and I could get a feasible solution. the point is it seems this big M,doesnt work with all data sets. so what should I do???

I found this: http://www.gams.com/solvers/cpxindic.htm
so I changed my code to this one:

eq7(arc1(i,f),k)… s1(f,k)=g=s1(i,k) + t1(i,f);

model vrpcd /cost,eq2,eq3,eq4,eq52,eq7,eq8,eq8a,eq91/;
vrpcd.reslim= 3000 ;

option mip= cplex;

file fcpx Cplex Option file / cplex.opt /;
putclose fcpx ‘indic eq7(arc1(i,f),k)$x1(i,f,k) 1’ ;


vrpcd.OptFile = 1;

solve vrpcd using mip minimizing z;



but then I get this error:

Row ‘eq7(1.7.a)’ infeasible, all entries at implied bounds.
No solution exists.
problem is integer infeasible




can anyone help me with this plz?


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/3wN8mruktu8J.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Hi
You should define big M like a parameter and it most be tight enough.
I suggest that you set the big M as sum((i,j),t(i,j)). It is the
summation of transportation time between all nodes.
Regards.
Hossein Karimi

On 10/18/12, Sarah shm wrote:

Hi
I’m currently trying to run a simple VRPTW (with 30 nodes) gams code. it
has Big M in one the equations as u can see:
eq7 (arc1(i,f),k)… s1(f,k)=g=s1(i,k) + t1(i,f) ;

The value of big M extremely effects the solver performance, for example
when I set M, 100000000(9 zeros), gams couldnt find a feasible solution
withing 3000secs. but a big M with 10 zeros, worked and I could get a
feasible solution. the point is it seems this big M,doesnt work with all
data sets. so what should I do???

I found this: http://www.gams.com/solvers/cpxindic.htm
so I changed my code to this one:

eq7(arc1(i,f),k)… s1(f,k)=g=s1(i,k) + t1(i,f);

model vrpcd /cost,eq2,eq3,eq4,eq52,eq7,eq8,eq8a,eq91/;
vrpcd.reslim= 3000 ;

option mip= cplex;

file fcpx Cplex Option file / cplex.opt /;
putclose fcpx ‘indic eq7(arc1(i,f),k)$x1(i,f,k) 1’ ;

vrpcd.OptFile = 1;

solve vrpcd using mip minimizing z;

but then I get this error:

Row ‘eq7(1.7.a)’ infeasible, all entries at implied bounds.
No solution exists.
problem is integer infeasible

can anyone help me with this plz?


“gamsworld” group.
To view this discussion on the web visit
https://groups.google.com/d/msg/gamsworld/-/3wN8mruktu8J.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to
gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gamsworld?hl=en.


\

Thank you so much Hossein.
also the equation is this one: (I had forgotten to type the Big M part :smiley: )
eq7 (arc1(i,f),k)… s1(f,k)=g=s1(i,k) + t1(i,f)-M*(1-x1(i,f,k))

I’m gonna try ur idea now.
Do u know if it’s ok for CPLEX/GAMS to run the VRPTW code with 30 nodes for about 2000 seconds and still doesnt guarantee that the solution is optimal?
Thanks

On Saturday, October 20, 2012 9:50:58 AM UTC-7, hossein karimi wrote:

Hi
You should define big M like a parameter and it most be tight enough.
I suggest that you set the big M as sum((i,j),t(i,j)). It is the
summation of transportation time between all nodes.
Regards.
Hossein Karimi

On 10/18/12, Sarah shm wrote:

Hi
I’m currently trying to run a simple VRPTW (with 30 nodes) gams code. it
has Big M in one the equations as u can see:
eq7 (arc1(i,f),k)… s1(f,k)=g=s1(i,k) + t1(i,f) ;

The value of big M extremely effects the solver performance, for example
when I set M, 100000000(9 zeros), gams couldnt find a feasible solution
withing 3000secs. but a big M with 10 zeros, worked and I could get a
feasible solution. the point is it seems this big M,doesnt work with all
data sets. so what should I do???

I found this: http://www.gams.com/solvers/cpxindic.htm
so I changed my code to this one:

eq7(arc1(i,f),k)… s1(f,k)=g=s1(i,k) + t1(i,f);

model vrpcd /cost,eq2,eq3,eq4,eq52,eq7,eq8,eq8a,eq91/;
vrpcd.reslim= 3000 ;

option mip= cplex;

file fcpx Cplex Option file / cplex.opt /;
putclose fcpx ‘indic eq7(arc1(i,f),k)$x1(i,f,k) 1’ ;

vrpcd.OptFile = 1;

solve vrpcd using mip minimizing z;

but then I get this error:

Row ‘eq7(1.7.a)’ infeasible, all entries at implied bounds.
No solution exists.
problem is integer infeasible

can anyone help me with this plz?


“gamsworld” group.
To view this discussion on the web visit
https://groups.google.com/d/msg/gamsworld/-/3wN8mruktu8J.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to
gamsworld+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gamsworld?hl=en.


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/jCzdn46honEJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

The answer depends on the data-set. Moreover, it relies on the model
complexity. I don’t know the precise answer of your question.

On 10/23/12, Sarah shm wrote:

Thank you so much Hossein.
also the equation is this one: (I had forgotten to type the Big M part :smiley: )
eq7 (arc1(i,f),k)… s1(f,k)=g=s1(i,k) + t1(i,f)-M*(1-x1(i,f,k))

I’m gonna try ur idea now.
Do u know if it’s ok for CPLEX/GAMS to run the VRPTW code with 30 nodes for

about 2000 seconds and still doesnt guarantee that the solution is optimal?
Thanks

On Saturday, October 20, 2012 9:50:58 AM UTC-7, hossein karimi wrote:

Hi
You should define big M like a parameter and it most be tight enough.
I suggest that you set the big M as sum((i,j),t(i,j)). It is the
summation of transportation time between all nodes.
Regards.
Hossein Karimi

On 10/18/12, Sarah shm > wrote:

Hi
I’m currently trying to run a simple VRPTW (with 30 nodes) gams code. it

has Big M in one the equations as u can see:
eq7 (arc1(i,f),k)… s1(f,k)=g=s1(i,k) + t1(i,f) ;

The value of big M extremely effects the solver performance, for example

when I set M, 100000000(9 zeros), gams couldnt find a feasible solution

withing 3000secs. but a big M with 10 zeros, worked and I could get a
feasible solution. the point is it seems this big M,doesnt work with all

data sets. so what should I do???

I found this: http://www.gams.com/solvers/cpxindic.htm
so I changed my code to this one:

eq7(arc1(i,f),k)… s1(f,k)=g=s1(i,k) + t1(i,f);

model vrpcd /cost,eq2,eq3,eq4,eq52,eq7,eq8,eq8a,eq91/;
vrpcd.reslim= 3000 ;

option mip= cplex;

file fcpx Cplex Option file / cplex.opt /;
putclose fcpx ‘indic eq7(arc1(i,f),k)$x1(i,f,k) 1’ ;

vrpcd.OptFile = 1;

solve vrpcd using mip minimizing z;

but then I get this error:

Row ‘eq7(1.7.a)’ infeasible, all entries at implied bounds.
No solution exists.
problem is integer infeasible

can anyone help me with this plz?


You received this message because you are subscribed to the Google
Groups
“gamsworld” group.
To view this discussion on the web visit
https://groups.google.com/d/msg/gamsworld/-/3wN8mruktu8J.
To post to this group, send email to
gams...@googlegroups.com.

To unsubscribe from this group, send email to
gamsworld+...@googlegroups.com .
For more options, visit this group at
http://groups.google.com/group/gamsworld?hl=en.


“gamsworld” group.
To view this discussion on the web visit
https://groups.google.com/d/msg/gamsworld/-/jCzdn46honEJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to
gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gamsworld?hl=en.


\