The asymmetric travelling salesman problem

Một phần của tài liệu Introduction to logistics systems planning and control (Trang 277 - 282)

7.3 The Travelling Salesman Problem

7.3.1 The asymmetric travelling salesman problem

The ATSP can be formulated as follows. Letxij,(i, j )A, be a binary decision variable equal to 1 if arc(i, j )is part of the solution, 0 otherwise.

Minimize

(i,j )A

cijxij

SHORT-HAUL FREIGHT TRANSPORTATION 253 subject to

iV\{j}

xij =1, jV, (7.1)

jV\{i}

xij =1, iV, (7.2)

xijX, (i, j )A, (7.3)

xij ∈ {0,1}, (i, j )A.

Equations (7.1) and (7.2) are referred to asdegreeconstraints. Constraints (7.1) mean that a unique arc enters each vertexjV. Similarly, constraints (7.2) state that a single arc exits each vertexiV. Constraints (7.3) specify that thexijvalues must lie in a setXthat will yield a feasible solution consisting of a single directed tour (circuit). They can be formulated in two alternative ways, which are algebraically equivalent (see Problem 7.10):

iS

j /S

xij ⩾1, SV, |S|⩾2, (7.4)

iS

jS

xij ⩽|S| −1, SV, |S|⩾2. (7.5) Inequalities (7.4) guarantee that the circuit has at least one arc coming out from each proper and nonempty subsetSof vertices inV(connectivity constraints). Inequalities (7.5) prevent the formation of subcircuits containing less than|S|vertices (subcircuit elimination constraints). It is worth noting that the number of constraints (7.4) (or, equivalently, (7.5)) is 2|V|− |V| −2. Constraints (7.4) and (7.5) are redundant for

|S| =1 because of constraints (7.2).

A lower bound. The ATSP has been shown to be NP-hard. A good lower bound on the ATSP optimal solution costzATSP∗ can be obtained by removing constraints (7.3) from ATSP formulation. The relaxed problem is the following linearassignment problem(AP).

Minimize

iV

jV

cijxij

subject to

iV

xij =1, jV,

jV

xij =1, iV, xij ∈ {0,1}, i, jV,

wherecii= ∞, iV, in order to forcexii=0, for alliV.

254 SHORT-HAUL FREIGHT TRANSPORTATION The optimal AP solutionxAP∗ corresponds to a collection ofpdirected subcircuits C1, . . . , Cp, spanning all vertices of the directed graphG. Ifp=1, the AP solution is feasible (and hence optimal) for the ATSP.

As a rule,zAP∗ is a good lower bound onzATSP∗ if the cost matrix is strongly asym- metric (in this case, it has been empirically demonstrated that the deviation from the optimal solution cost(zATSP∗ −zAP∗ )/zAP∗ is often less than 1%). On the contrary, in the case of symmetric costs, the deviation is typically 30% or more. The reason of this behaviour can be explained by the fact that for symmetric costs, if the AP solution contains arc(i, j )A, then the AP optimal solution is likely to include arc(j, i)Atoo. As a result, the optimal AP solution usually shows several small subcircuits and is quite different from the ATSP optimal solution.

Bontur is a pastry producer founded in Prague (Czech Republic) in the 19th cen- tury. The firm currently operates, in addition to four modern plants, a workshop in Gorazdova street, where the founder began the business. The workshop serves Prague and its surroundings. Every day at 6:30 a.m. a fleet of vans carries the pastries from the workshop to several retail outlets (small shops, supermarkets and hotels). In par- ticular, all outlets of the Vltava river district are usually served by a single vehicle.

For the sake of simplicity, arc transportation costs are assumed to be proportional to arc lengths. In Figure 7.5 the road network is modelled as a mixed graphG(V , A), where a length is associated with each arc/edge(i, j ). The workshop and the vehicle depot are located in vertex 0. Last 23 March, seven shops (located at vertices 1, 3, 9, 18, 20 and 22) needed to be supplied. The problem can be formulated as an ATSP on a complete directed graphG =(V, A), whereVis formed by the seven vertices associated with the customers and by vertex 0. With each arc(i, j )Ais associ- ated a costcijcorresponding to the length of the shortest path fromitojonG(see Table 7.1). The optimal AP solutionxAP∗ is made up of the following three subcircuits (see Figure 7.6):

C1= {(1,4), (4,3), (3,9), (9,1)}, of cost equal to 11.0 km;

C2= {(0,18), (18,0)}, of cost equal to 5.2 km;

C3= {(20,22), (22,20)},

of cost equal to 4.6 km. Therefore, the AP lower boundzAP∗ on the objective function value of ATSP is equal to

zAP∗ =11.0+5.2+4.6=20.8 km.

Patching heuristic. The patching heuristic works as follows. First, theAP relaxation is solved. If a single circuit is obtained, the procedure stops (the AP solution is

SHORT-HAUL FREIGHT TRANSPORTATION 255

13

14 15

19 20

21 16

17

18 22 23

0

i j

1 2

3 7

8

9

4 5 6

10

11 12 dij

1.1 2.1

1.8 1.9

1.6

1.0 1.0

1.0 1.0

1.0

1.0

2.0 0.7

0.6 0.5

0.9

0.9 0.6

0.5 0.7

1.6 0.4

0.5 0.5

0.5

0.9 1.3 0.5

0.5

1.4 0.7

0.2 0.2

0.5

0.9

Figure 7.5 A graph representation of Bontur distribution problem (one-way street segments are represented by arcs, while two-way street segments are modelled through edges).

20

18 22

0

i j

1 3

9

4 2.1

1.6

1.3 3.2

4.1

2.3 2.3

3.9 cij

Figure 7.6 Optimal solution of the AP relaxation in the Bontur problem.

the optimal ATSP solution). Otherwise, a feasible ATSP solution is constructed by merging the subcircuits of the AP solution. When merging two subcircuits, one arc is removed from each subcircuit and two new arcs are added in such a way a single connected subcircuit is obtained.

Step 0 (Initialization). LetC= {C1, . . . , Cp}be the set of thepsubcircuits in the AP optimal solution. Ifp=1,STOP. The AP solution is feasible (and hence optimal) for the ATSP.

Step 1. Identify the two subcircuitsCh, CkCwith the largest number of vertices.

256 SHORT-HAUL FREIGHT TRANSPORTATION Table 7.1 Shortest-path length (in kilometres) fromitoj,i, jVin the Bontur problem.

0 1 3 4 9 18 20 22

0 0.0 5.5 4.2 2.6 2.4 1.3 2.5 4.3 1 4.7 0.0 3.7 2.1 5.1 6.0 7.2 9.0 3 4.2 4.5 0.0 1.6 3.2 5.5 6.7 8.5 4 2.6 2.9 1.6 0.0 3.0 3.9 5.1 6.9 9 3.8 4.1 2.8 1.2 0.0 5.1 6.3 8.1 18 3.9 7.4 6.1 4.5 3.3 0.0 1.2 3.0 20 3.5 7.0 5.7 4.1 2.9 1.2 0.0 2.3 22 5.8 9.3 8.0 6.4 5.2 3.0 2.3 0.0

20

18 22

0

i j

1 3

9

4 2.1

1.6

1.3 4.2

4.1

2.3 2.3

3.3 cij

Figure 7.7 Partial solution at the end of the first iteration of the patching algorithm in the Bontur problem.

Step 2. MergeChandCkin such a way that the cost increase is kept at minimum.

UpdateCand letp=p−1. Ifp=1,STOP, a feasible solution ATSP has been determined, otherwise go back to Step 1.

In order to find a feasible solutionx¯ATSPto the Bontur distribution problem, the patching algorithm is applied to the AP solution shown in Figure 7.6. At the first iteration,C1andC2are selected to be merged (alternatively,C3could have been used instead ofC2). By mergingC1andC2at minimum cost (through the removal of arcs (3,9) and (18,0) and the insertion of arcs (3,0) and (18,9)), the following subcircuit (having length equal to 16.6 km) is obtained (see Figure 7.7):

C4= {(0,18), (18,9), ((9,1), (1,4), (4,3), (3,0))}.

SHORT-HAUL FREIGHT TRANSPORTATION 257

20

18 22

0

i j

1 3

9

4 2.1

1.6

1.3 4.2

4.1

3.0 2.3 2.9

cij

Figure 7.8 ATSP feasible solution generated by the patching algorithm in the Bontur problem.

The partial solution, formed by the two subcircuitsC3 and C4, is depicted in Figure 7.7. The total length increases by 0.4 km with respect to the initial solution.

At the end of the second iteration, the two subcircuits in Figure 7.7 are merged at the minimum cost increase of 0.3 km through the removal of arcs (18,9) and (20,22) and the insertion of arcs (18,22) and (20,9). This way, a feasible ATSP solution of cost

¯

zATSP=21.5 km is obtained (see Figure 7.8). In order to evaluate the quality of the heuristic solution, the following deviation from the AP lower bound can be computed,

¯

zATSP−zAP∗

z∗AP =21.5−20.8

20.8 =0.0337, which corresponds to a percentage deviation of 3.37%.

Một phần của tài liệu Introduction to logistics systems planning and control (Trang 277 - 282)

Tải bản đầy đủ (PDF)

(377 trang)