Solomon
Solomon
ij hj
2
Example 2 4
3 5
4
6 3
6
7
3
8 2
12
1
3 5 Opt = 33
4
4
6 3
6 (1, 3)
7 (1, 2, 3)
3
9 (1, 6, 3, 2)
6
(1, 6, 4, 3, 2)
8 2
12
1 (1, 6, 4, 5, 3, 2)
2
1
Algorithm Cheapest Insertion 9
3 4 3 4
3
7 5 6
3
3
4 5
5 (1, 2)
1
9
2
(1, 4, 2)
(1, 4, 2, 3)
3 4 3 4
(1, 5, 4, 2, 3)
5 6
(1, 5, 4, 6, 2, 3)
Solution cost: 24
4
GREEDY ALGORITHM “MULTI-PATH” (Bentley, 1990)
Version for STSP
2. If the insertion of the next arc (i, j) into the current solution (given by a
family of paths) is feasible, i.e. the current degrees of vertices i and j
are ≤ 1 and arc (i, j) forms no subtour (i. e. there is no path from j to i
whose number of arcs is less than n - 1), then “select” arc (i, j).
3. If the number of the selected arcs is less than n then return to STEP 2.
Else STOP.
v “RANDOMIZED”
v Time complexity:VARIANT
O(n2 log n ) (the algorithm is similar to the Kruskal
At STEP 2,for
algorithm consider the next
the Shortest 2 “feasible”
Spanning Tree) arcs:
– select the next arc with probability 2/3,
– select the following arc with probability 1/3.
5
Example 2 Opt = 33 4
3 5
4
6 3
6
7
3
Algorithm Multi-Path 9 5 6
8 2
12
1
3 5
4 Ordered arcs:
4 (4, 5) OK
3 OK
6 (3, 5)
(4, 6) OK
3 (2, 4) NO
9 6 (2, 3) OK
(3, 4) NO
8 2
(3, 6) NO
1
(1, 2) OK
(1, 6) OK STOP
Solution cost: 33 (optimal) (1, 3)
6
3
Example 3 Opt = 21
7
2
3
3
5 4 5
2
1
9
Algorithm Multi-Path 3 4 3 4
5 6
3 3
2 Ordered arcs:
(3, 5) OK
3 (1, 3) OK
4 5
(1, 5) NO
2 (3, 4) NO
1
9 (4, 6) OK
(5, 6) OK
3 (2, 6) NO
(4, 5) NO
5 6 (1, 4) NO
3 (2, 4) OK
(2, 3) NO
Solution cost: 25
(1, 2) OK STOP
7
ALGORITHM “SAVINGS” (Clark-Wright, 1964; VRP)
(version for STSP, good results if the triangle inequality holds)
v For each arc (i, j) ∈ A such that i ∈ V’ and j ∈ V’ compute the score
(“saving”):
sij := cik + ckj - cij
i j i j
k k
2. If the insertion of the next arc (i, j) into the current solution (given by a
family of subtours passing through k) is feasible, i.e. the current
degrees (w.r.t. vertices belonging to V’) of vertices i and j are ≤ 1
and arc (i, j) forms no subtour containing only vertices belonging to V’,
then remove arcs (i, k) and (k, j) and insert arc (i, j).
1
4 Opt = 27
6 3
8 5
7 9
4 6
4 4 3
Algorithm “Savings”
3
9
8
3 2
7
2
2 2 7
3 5
1
4 Opt = 27
6 3
8 5
7 9
4 6
4 4 3
3 5
1 k = 4. Ordered arcs:
(2, 5) OK
5
(5, 8) OK
7
6 (1, 2) OK
4 3
depot (5, 6) NO
3
(6, 8) OK
8
2 (7, 8) NO
(2, 6) NO
7 (1, 3) OK
(6, 7) OK STOP
(3, 7)
11
2
Example 1
2
3 5
1
4 Opt = 27
6 3
8 5
7 9
4 6
4 4 3
3 5
1 k = 4. Selected arcs:
(2, 5)
5
(5, 8)
7
6 (1, 2)
4 4 3
depot (6, 8)
3
(1, 3)
8
3 2 (6, 7)
Solution cost: 29
7
Complete the tour with arcs
(4, 3) and (7, 4)
12
LOCAL SEARCH ALGORITHMS
13
STSP
v r = 2 (2-optimal exchange)
i k i k
l j l j
9 5 6
8 2
v r = 2 (2-optimal exchange)
i k b i k b
… …
l j a l j a
v Cost variation:
(cij + cja + … + cbk + ckl) - (cik + ckb + … + caj + cjl)
v Both directions can be considered: clockwise, anti clockwise.
16
STSP
v r = 3 (3-optimal exchange)
k k
i i
j j
m n m
n
l l
3
7
3
3
4 5
Initial cost = 24
2
1 Final cost = 21
3 4 3 4
5 6
3
u2 z2 u2 z2 u2 z2 u2 z2
u1 u1 u1 u1
(a) (b) (c) (d)
v2 v2 v2 v2
v1 v1 v1 v1
z1 z1 z1 z1
u2 z2 u2 z2 u2 z2 u2 z2
u1 u1 u1 u1
(e) (f) (g) (h)
19
ATSP
v r = 3 (3-optimal exchange) : 7 different feasible tours
(both directions can be considered)
v2 v2 v2 v2
v1 v1 v1 v1
z1 z1 z1 z1
u2 z2 u2 z2 u2 z2 u2 z2
u1 u1 u1 u1
(a) (b) (c) (d)
v2 v2 v2 v2
v1 v1 v1 v1
z1 z1 z1 z1
u2 z2 u2 z2 u2 z2 u2 z2
u1 u1 u1 u1
21
COMPUTATIONAL RESULTS FOR STSP
23
STSP – RANDOM DISTANCE INSTANCES
34 70 125
2-Opt (0.04) (1.71) (215)
10 33 63
3-Opt (0.07) (2.52) (334)
24
HEURISTIC ALGORITHMS FOR THE ATSP
(in addition to the modifications of the previously described algorithms)
25
Example:
i l
S S’
j k
exchange arcs (i, j) and (k, l) with arcs (i, l) and (k, j)
so as to minimize: (cil + ckj) - (cij + ckl) with respect to all
the possible 2 arc exchanges between subtours S and S’
26
1
Example A Opt = 16
3 7
2 5
1
6 7 2
3
4
1
7 1
3
1 9
5
9
8
5
3
3
3 6
1 2
6 2
33
4
11
3 11
j
h
chj
R r
k
cik i
– solve the AP corresponding to the current graph, and return to STEP 2a.
29
ALGORITHM “TRUNCATED BRANCH-AND-BOUND” (2)
AP solution
1 2
level 1 arc (8, 3) “imposed” X8,3 = 1
...
8
V(AP(k))=23 k
X4,1 = 0, X1,2 = 1
level 2 X1,2 = 0 X2,8 = 0 X3,4 = 0
X2,8 = 1
4 3
...
X3,4 = 1
X1,2 = 1 X1,2 = 1
X2,8 = 1
k1 k2
k2 k3 k4
27 29 35 30
...
30
COMPUTATIONAL RESULTS FOR ATSP
• 9 classes of randomly generated instances.
• 4 different values of n: 100, 316, 1000, 3162
• 10 instances for n = 100, 316 (3 for n = 1000, 1 for n = 3162)
• HK = Held-Karp lower bound corresponding to the 1-Shortest Spanning
Arborescence Relaxation with Subgradient Optimization procedure.
• 3-OPT with starting solution found by the Nearest Neighbour Algorithm
• CPU times in seconds of a 150 MHz SGI Challenge
MULTI - PATH
Percent above HK Time in Seconds
Class 100 316 1000 3162 100 316 1000 3162
tmat 31.23 29.04 26.53 26.25 .03 .26 1.7 20
amat 243.09 362.86 418.56 695.29 .04 .27 1.9 21
shop 49.34 56.07 61.55 66.29 .03 .26 2.1 40
disk 188.82 307.14 625.76 1171.62 .03 .28 2.7 23
super 6.03 5.40 5.16 5.79 .03 .22 1.5 18
crane 41.86 44.09 39.70 41.60 .03 .27 1.9 21
coin 48.73 46.76 42.33 35.94 .04 .24 1.7 20
stilt 106.25 143.89 178.34 215.84 .04 .28 1.9 23
rtilt 350.12 705.56 1290.63 2350.38 .03 .28 2.0 23
31
NEAREST NEIGHBOUR
Percent above HK Time in Seconds
Class 100 316 1000 3162 100 316 1000 3162
tmat 38.20 37.10 37.55 36.66 .03 .24 1.7 20
amat 195.23 253.97 318.79 384.90 .03 .26 1.9 21
shop 16.97 14.65 13.29 11.87 .03 .23 2.5 20
disk 96.24 102.54 115.51 161.99 .04 .27 1.9 23
super 8.57 8.98 9.75 10.62 .03 .21 1.5 18
crane 40.72 41.66 43.88 43.18 .03 .26 1.9 21
coin 26.08 26.71 26.80 25.60 .03 .23 1.7 20
stilt 30.31 30.56 27.62 24.79 .03 .30 1.9 22
rtilt 28.47 28.28 27.52 24.60 .04 .26 1.9 22
3 - OPT
Percent above HK Time in Seconds
Class 100 316 1000 3162 100 316 1000 3162
tmat 6.44 9.59 12.66 16.20 .19 1.71 5.5 20
amat 39.23 58.57 83.77 112.08 .19 1.75 5.8 21
shop 3.02 7.25 10.22 10.88 .23 1.78 5.6 21
disk 12.11 16.96 20.85 25.64 .19 1.82 6.1 23
super 3.12 4.30 5.90 7.94 .15 1.43 4.8 18
crane 9.48 9.41 10.65 10.64 .19 1.76 7.3 22
coin 8.06 9.39 9.86 9.92 .18 1.62 5.3 20
stilt 11.39 12.65 12.62 12.27 .19 1.80 8.2 22
rtilt 10.04 13.09 18.00 19.83 .19 2.05 6.6 23 32
PATCH
Percent above HK Time in Seconds
Class 100 316 1000 3162 100 316 1000 3162
tmat .84 .64 .17 .00 .03 .22 1.8 29
amat 10.95 6.50 2.66 1.88 .03 .22 1.9 18
shop 1.15 .59 .39 .24 .04 .48 8.4 260
disk 9.40 2.35 .88 .30 .03 .26 2.9 75
super 1.86 2.84 3.99 6.22 .02 .19 1.7 29
crane 9.40 10.18 9.45 8.24 .03 .21 1.5 23
coin 16.48 16.97 17.45 18.20 .02 .18 1.4 17
stilt 23.33 22.79 23.18 24.41 .03 .24 2.2 29
rtilt 17.03 18.91 18.38 19.39 .03 .28 2.9 54
CONTRACT OR PATCH
33
TRUNCATED BRANCH–AND–BOUND
Percent above HK Time in Seconds
Class 100 316 1000 3162 100 316 1000 3162
tmat .06 .01 .00 .00 .03 .27 2.5 30
amat .97 .16 .04 .04 .04 .47 7.6 296
shop .20 .08 .03 .01 .06 1.02 19.6 460
disk 1.51 .27 .02 .01 .05 .56 6.4 105
super .27 .17 .21 .43 .04 .61 20.4 995
crane 4.36 4.29 4.05 4.10 .07 1.96 66.7 3176
coin 8.20 11.03 11.14 11.42 .10 3.82 168.4 9610
stilt 10.75 13.99 12.66 12.86 .11 4.11 163.7 4184
rtilt 9.82 12.20 11.81 11.45 .13 4.37 178.0 9594
34