> Problem. I have some difficulties to modelling this subtour
> elimination constraint (n = number of nodes):
> sum(i in S, sum(j in S, x(i,j))) <= |S|-1
> for every nonempty subset S of {2,3,..,n}
This is the Ford, Fulkerson, Johnson (1954) formulation, based on the power of {2,3,..,n}. This generates a lot of constraints (2^(n-1)), with many not active in the optimal solution. So this approach only works for small problems.
$ontext |
Note: the construct system.powerSetRight is a new GAMS feature (24.0, 2013).
This solves quite fast:
--- Starting compilation IBM ILOG CPLEX 24.7.3 r58181 Released Jul 11, 2016 WEI x86 64bit/MS Windows Reading data... Iteration log . . . Nodes Cuts/ * 0 0 integral 0 3323.0000 3323.0000 45 0.00% Root node processing (before b&c): Proven optimal solution. MIP Solution: 3323.000000 (45 iterations, 0 nodes) Best possible: 3323.000000 --- Restarting execution |
References
- burma14.gms: above model
- burma14-3.gms: generation of powerset written in GAMS (not using system.PowerSetRight).
- burma14-2.gms: formulation from Svestka (J.A. Svestka, A continuous variable representation of the TSP, Math Prog, v15, 1978, pp211-213)
- burma14-4.gms: a cutting plane technique
Dear Erwin,
ReplyDeleteI'm a PhD student working on a Vehicle Routing Problem with Time Windows. I was trying to implement it on GAMS and have difficulties. Then I found the TSP example and would like to ask for help:
(1)
http://www.gams.com/modlib/libhtml/tsp4.htm
Why is the cuts added after the
"solve assign using mip minimizing z;"
line, yet it's still effective in adding cuts into the current model?
(2)
Can you recommend some website / papers where I can finds ways to implement VRP with GAMS? The constraints are really difficult to work with.
Best,
Jim