Vehicle Routing:

advertisement
Vehicle Routing:

Coincident Origin and Destination
Points

Travelling Salesman problem



Heuristics
Little et al. Algorithm
Vehicle Scheduling

Clark and Wright Saving Approach
Prof.Dr. Füsun Ülengin
Heuristics

Some of the well-known heuristics
 Nearest- neighbor Heuristics (NNH)
 Cheapest insertion Heuristics (CIH)
 Neural networks (meta heuristics)
 Lets analyse the first two through an
example (see the next slide)
Prof.Dr. Füsun Ülengin
Distance
Between the
cities(km)
City 1
City 2
City 3
City 4
City 5
City 1
0
132
217
164
58
City 2
132
0
290
201
79
City 3
217
290
0
113
303
City 4
164
201
113
0
196
City 5
58
79
303
196
0
Prof.Dr. Füsun Ülengin
Nearest- Neighbor Heuristics (NNH)




We begin at any city and then “visit” the
nearest city.
Then we go to the unvisited city closest to
the city we have most recently visited
We continue in this fashion until a tour is
obtained
A popular heuristic is to apply the NNH
beginning at each city and then take the best
tour obtained.
Prof.Dr. Füsun Ülengin
Cheapest Insertion Heuristics
(CIH)






We begin at any city and find its closest neigbor
The we create a subtour joining those two cities
Next, we replace an arc in the subtour (say, arc (i,j)) by the
combination of two arcs- (i,k) and (k,j), where k is not in the
current subtour-that will increase the length of the subtour by
the smallest (or cheapest amount).
Let cij be the lenght of arc (i,j).
Note that if arc (i,j) is replaced by arc (i,k) and (k,j), a length cik
+ ckj –cij is added to the subtour.
Then we continue with this procedure until a tour is obtained.
Prof.Dr. Füsun Ülengin
1.DETERM INING WHICH ARC OF (1,5)-(5,1) IS REPLACED
Arc Replaced
(1,5)*
(1,5)
(1,5)
(5,1)*
(5,1)
(5,1)
Arc Added to subtour
(1,2)-(2,5)
(1,3)-(3,5)
(1,4)-(4,5)
(5,2)-(2,1)
(5,3)-(3,1)
(5,4)-(4,1)
Added length
c12+c25-c15=153
c13+c35-c15=462
c14+c45-c15=302
c52+c21-c51=153
c53+c31-c51=462
c54+c41-c51=302
2.DETERM INING WHICH ARC OF (1,2)-(2,5)-(5,1) IS REPLACED
Arc Replaced
(1,2)
(1,2)*
(2,5)
(2,5)
(5,1)
(5,1)
Arc Added to subtour
(1,3)-(3,2)
(1,4)-(4,2)
(2,3)-(3,5)
(2,4)-(4,5)
(5,3)-(3,1)
(5,4)-(4,1)
Added length
c13+c32-c12=375
c14+c42-c12=233
c23+c35-c25=514
c24+c45-c25=318
c53+c31-c51=462
c54+c41-c51=302
3. DETERM INING WHICH ARC OF (1,4)-(4,2)-(2,5)-(5,1) IS REPLACED
Arc Replaced
(1,4)*
(4,2)
(2,5)
(5,1)
Arc Added to subtour
(1,3)-(3,4)
(4,3)-(3,2)
(2,3)-(3,5)
(5,3)-(3,1)
Added length
C13+C34-C14=166
C43+C32-C42=202
C23+C35-C25=514
C53+C31-C51=462
Prof.Dr. Füsun Ülengin
TSP Model Formulation


cij xij

Minimize 
i I j J
Subject to:
x
 1, i  I
x
 1, j  J
ij
j J
ij
i I
x
ij
( i , j ) E (U )
 U  1, U  N
xij {0,1}, i  I , j  J
Prof.Dr. Füsun Ülengin
Little et al. Algorithm







1. Begin by transforming the T matrix into a reduced form in such a
way that the matrix will have at least one zero in each row and in each
column
The sum of the subtracted elements will constitute an upper bound for
the objective function
2. For each pair of nodes (i, j) calculate the regret of not going from i
to j
For example the regret of (B,A) =
rBA = minj≠ A tBj 0 + min j ≠ B tiA 0
3. Among the elements having zero balue, select the one having the
highest regret; i.e the one that will make the highest increase in the
objective function if it is not included in the Hamiltonian cycle
4. At each iteration, make the necessary arrangements to avoid
subtours and be sure take the resulting matrix is in the reduced form.
matrix
Prof.Dr. Füsun Ülengin
Example
A
B
C
D
E
A
1
4
5
2
B
2
3
7
3
C
1
6
4
5
D
3
5
8
2
E
4
7
2
1
-
1.Each value in the matrix is given in “half- day”.
2.It takes a half-day to visit a customer
3.Assuming that the traveling salesman does not work on Sunday
and that his first day of travel is a Wednesday , which is the first day
of the month, what is his earliest possible return date to home (A)
4.HOMEWORK :Suppose that the customer D can accept the
salesman only on Friday morning. What delay this will cause in the
current solution?
Prof.Dr. Füsun Ülengin
THE REDUCED MATRIX ( T0 )
A
B
C
D
E
A
-
0
0
2
3
B
0
-
5
4
6
C
2
3
-
6
0
D
4
5
3
-
0
E
0
0
3
0
-
Prof.Dr. Füsun Ülengin
EXAMPLE OF LITTLE ET AL. ALGORITHM:
MATRIX T
A
B
C
D
E
A
11
7
13
B
5
13
15
C
13
15
23
D
9
13
5
E
3
7
7
7
Prof.Dr. Füsun Ülengin
11
15
11
3
-
REDUCED MATRIX T0
A
B
A
0
B
0
C
2
0
D
6
6
E
0
0
C
D
0
8
2
4
Prof.Dr. Füsun Ülengin
E
2
6
8
0
4
10
0
0
-
Vehicle Scheduling :Clarke-Wright
savings approach
1.Initially, assume that enough vehicles are available
and allocate one to a customer. For our example we
will assume that we have 3 tucks of 5,000- gallon
capacity, 4 trucks of 6,000-gallon capacity and an
unlimited supply of 4,000- gallon capacity. One truck
of the smallest capacity is initially allocated to each
customer and provides an initial feasible solution of
the problem
2. For hand computation, set up a matrix
(see the distributed sheet)
Prof.Dr. Füsun Ülengin
Clarke-Wright Savings
Approach(cnt.)






The load to be delivered to each customer Pi is listed in
column q. The right-hand value in each cell is the distance
dy,z between Py and Pz, where y and z are specific
customers. The left-hand value represents the savings Sy,z
in distance associated with Py and Pz when Py enters the
tour.
The value in the middle of the cell ty,z indicates whether the
customer combinations Py and Pz are in the tour. The
dsignatorhas the following values:
t y,z = 1 is two customers are linked on a truck route
t y,z = 0 if the customers are not linked on a truck route
t y,z = 2 if the customer is served exclusively by a single
truck
For ease of computation, the matrix is ordered from left to
right on the basis of increasing savings S y,z
Prof.Dr. Füsun Ülengin
Clarke-Wright Savings
approach(cnt.)
3. Search the matrix for the largest savings subject to
the following conditions for any cell (y,z,)
A) t y,0 and t z,o are >0
B) Py and Pz are not already on the same truck run
C) By this allocation you do not exceed the capacity
of the trucks available
4. Make the necessary changes in the t values of the
combined tours
See the distributed sheet
Prof.Dr. Füsun Ülengin
Download