Solving the HVRP - DPCS@IN3-UOC

advertisement
2012 IN3-HAROSA
Workshop
Barcelona, June 13-15,
2012
Description of a Multi-Stage Procedure to Solve
the Heterogeneous Vehicle Routing Problem
Javier Faulin
Angel Juan
Alba Agustín
http://ajuanp.wordpress.com
javier.faulin@unavarra.es
Department of Computer Science
Department of Statistics and
Operations Research
Open University of Catalonia, Barcelona,
SPAIN
Public University of Navarre,
Pamplona, SPAIN
1
0. Contents
1. Introduction
2. Description of the Heterogeneous VRP
3. Main References
4. Solving the HVRP: the SAM method
5. SAM: Our approach for solving the HVRP
6. Solving CVRP: SR-GCWS
7. Designing the instances for SAM
8. Computational results
9. Sensitivity analysis
10. Conclusions & Future Work
2
1. Introduction
 The VRP models needs new paradigms and
assumptions to fit their structures to the changing road
transportation.
 Some of the aforementioned new assumptions are
based on new costs based on congestion,
environmental impact or security-related and safetyrelated costs.
 Nevertheless, others are connected to new hypothesis
in the VRP model like the consideration of
heterogeneous fleets, which is a much more realistic
assumption.
 The Heterogeneous Vehicle Routing Problem (HVRP)
is a VRP with different capacities in their vehicles,
usually due to the diversity of delivery needs in the
companies.
 We are not going to consider here the Fleet
Dimensioning and Composition problem in its general
formulation, but a routing analysis considering the
option of using vehicles of different capacities.
3
2.a Description of the HVRP
 The Heterogeneous Vehicle Routing Problem
(HVRP) is a well-known NP-hard problem:
 A set of customers’ demands must be supplied
by a fleet of vehicles.
 Resources are available from a depot.
 Moving a vehicle from one node i to another j
has associated costs cij .
 Several constraints related to limited capacity
in each vehicle must be considered: there are
vk vehicles of capacity Qk (k types of vehicles)
 Goal: Minimization of the total distance-cost
servicing all the customers
 The Heterogeneous Vehicle Routing Problem
with Stochastic Demands (HVRP) is a VRP
which involves many real-life applications
(Golden at al., 2002): urban waste collection,
residential pickups and delivery of beverages,
food and newspapers.
4
2.b Description of the HVRP
 Consider a complete and undirected graph G = (N, E),
where:
 N ={0, 1, . . . , n} is a set of given nodes representing the
central depot (node 0) and the n customers to be supplied
(nodes 1 to n).
 E = {(i, j) | i, j in N with i ≠ j}
connecting each pair of nodes.
are the edges or roads
A-n80-k10 BKS
homogeneous
(above,inputs:
10 routes) vs. heterogeneous 150-125 OBS
 Moreover,
consider
also the 100
following
(below, 9 routes)
 The natural number m of different types of vehicles (m ≥ 2).
 Vk = {1, 2, …, vk} is the set of vk vehicles of type k (1 ≤ k ≤
m), each of them having a loading capacity Qk > 0.
 For all i in N, di ≥ 0 is the demand associated with node i. It
is assumed that the depot has no demand, i.e. d0 = 0.
 For all i, j in N with i ≠ j, and for all k (1 ≤ k ≤ m), cijk = cjik = cij
≥ 0 are the traveling costs associated with moving any
vehicle from node i to node j (symmetric costs and no
dependence of type of vehicle).
5
2.c Description of the HVRP
6
 The HVRP problem can be modeled using mathematical programming notation as follows,
where: (a) xijk is a binary variable which takes the value 1 if a vehicle of type k is used to
cover the road from i to j, while it takes the value 0 otherwise; and (b) yij represents the load
in the truck arriving at customer j after visiting customer i in terms of the units of commodity
C0. That is to say:
2.d Description of the HVRP
 Some important comments about the fleet composition:
 We know beforehand the maximum number vk of each type k of vehicles we have,
i.e. we have a limit number in the use of every type of vehicle.
 We want obtain solutions minimizing distance-cost in the way is shown in the
associated charts:
Original problem and typical solution having heterogeneous fleet
7
3.a Main References

8
First references:
Gheysens F G, Golden B L and Assad A A (1984). A comparison of techniques for
solving the fleet size and mix vehicle routing problem. OR Spectrum 6(4): 207-216.
Golden B, Assad A A, Levy L and Gheysens F G (1984). The fleet size and mix vehicle
routing problem. Computers & Operations Research 11(1): 49-66.
Saksena J P and Ramachandran A (1986). An optimal fleet utilisation problem.
European Journal of Operational Research 25: 406-20.
Salhi S and Rand G K (1993). Incorporating vehicle routing into the vehicle fleet
composition problem. European Journal of Operational Research 66(3): 313-330.
Couillard J (1993). A decision support system for vehicle fleet planning. Decision
Support Systems 9:149-159.

Second group of references:
Taillard E D (1999). A heuristic column generation method for the heterogeneous fleet
VRP. RAIRO 33:1-14.
Ochi L S, Vianna D S, Drummond M A and Victor A O (1998a). An evolutionary hybrid
metaheuristic for solving the vehicle routing problem with heterogeneous fleet.
Lecture Notes in Computer Science 1391: 187-95.
3.b Main References

9
Second group of references:
Ochi L S, Vianna D S, Drummond M A and Victor A O (1998b). A parallel
evolutionary algorithm for the vehicle routing problem with heterogeneous fleet.
Future Generation Computer Systems 14: 285-92.
Tarantilis C D, Kiranoudis C T and Vassiliadis V S (2004). A threshold accepting
metaheuristic for the heterogenous fixed fleet vehicle routing problem. European
Journal of Operational Research 152: 148-58.
Tarantilis C D and Kiranoudis C T (2007). A flexible adaptive memory-based
algorithm for real-life transportation operations: two case studies from dairy and
construction sector. European Journal of Operational Research 179: 806-22.
 Third group of references:
Yaman H (2006). Formulations and valid inequalities for the heterogeneous vehicle
routing problem. Mathematical Programming 106: 365-90.
Yepes V and Medina J (2006). Economic heuristic optimization for heterogeneous
fleet VRPHESTW. Journal of Transportation Engineering 132: 303-11.
Subramanian, A., Vaz Penna, P.H., Uchoa, E. and Ochi, L.S. (2012). A hybrid
algorithm for the Heterogeneous Fleet Vehicle Routing Problem. European Journal
of Operations Research 221: 285-295.
4.a Solving the HVRP: the SAM method
 Considering the original problem with
the fleet (100,50,50):
 We obtain three different solutions
considering the homogeneous CVRP
with vehicles of capacity 100
generated by the an efficient
algorithm, such as the SR-GCWS
(Juan et al., 2009).
 It is clear than Solution 3 overcomes
Solutions 1 and 2.
 We save Solution 3 as a partial
solution.
10
4.b Solving the HVRP: the SAM method
 We keep the previously saved
solution and use the vehicle of
the next type in capacity:
 We keep the route with a
capacity of 100,
 We use the vehicles of
capacity 50 to re-schedule the
route of capacity 95, using
again the SR-GCWS algorithm
(Juan et al. 2009).
 We generated always more
than one potential solution.
11
4.c Solving the HVRP: the SAM method
 Finally, we add the partial solutions obtained with the vehicle of
capacity 50 to the partial solution saved with vehicles of
capacity 100 and we have a potential heuristic solution for the
HVRP.
 Knowing that that solution has been built by a multi-stage
procedure, we have called it: Successive Approximation
Method- SAM.
12
5.a SAM: Our approach for solving the HVRP
13
Selection of a new type of
vehicle (greater available
procedure SAM (nodes, vehicles)
capacity) while there are nonserved
// Perform a multi-round solving process until all customers are
servedcustomers
01 while list of non-served customers is not empty do
// Select a new type of vehicle an define a new homogeneous CVRP
02 newVehType <- selectNextType(vehicles) // the largest one available
03 vehCap <- getCapacity(newVehType)
04 newCVRP <- defineCVRP(nodes, vehCap)
// Solve the new CVRP using any efficient algorithm (e.g. SR-GCWS)
05 sol <- solveHomogeneousCVRP(newCVRP)
// Sort routes by total demand required and vehicles by capacity
06 routes <- sortRoutes(sol)
07 vehicles <- sortVehicles(sol)
Solve the homogeneous problem associated to that type of vehicle
using any efficient algorithm, such as SR-GCWS, for instance
5.b SAM: Our approach for solving the HVRP
14
procedure SAM (nodes, vehicles) (cont.)
// While feasible assign most demanding routes to largest vehicles
08 i <- 0
Assign most demanding routes
09 while i < size(routes) and
to largest vehicles when
demand(routes[i]) <= getCapacity(vehicles[i]) do feasible until finishing all the
10 newRoute <- assignVehicleToRoute(routes[i], vehicles[i])
vehicles of one specific type
11 routes[i] <- markAsUsed(routes[i])
12 vehicles[i] <- markAsUsed(vehicles[i])
13 globalSol <- addRouteToSol(newRoute, globalSol)
14 i = i + 1
15 end while
// Disolve (reset) the unused routes and vehicles
16 vehicles <- deleteUsedVehicles(vehicles)
17 routes <- deleteUsedRoutes(routes)
18 nodes <- extractNodes(routes)
Repeat the process until all nodes have
19 end while
been assigned to any route having
// Return the global solution
vehicles of the corresponding type
20 return globalSol
end procedure
6.a Solving CVRP: SR-GCWS
15
Start



Our approach will be based on the Clarke and Wright’s
savings (CWS) algorithm (Clarke & Wright 1964).
This parallel version of the CWS heuristic usually
provides ‘acceptable solutions’ (average gap between
5% and 10%), especially for small and medium-size
problems.
Reference: Juan, A., Faulin, J., Ruiz, R., Barrios, B.,
Caballe, S., 2009. The SR-GCWS hybrid algorithm for
solving the capacitated vehicle routing problem.
Applied Soft Computing, 10, 215-224.
savings(i, j)
Savings list
Initial solution
Select first edge
& Merge
List empty?
End
6.b Solving CVRP: SR-GCWS
16

CWS  the first edge (the one with the most savings) is the one selected.

SR-GCWS introduces randomness in this process by using a quasi-geometric
statistical distribution  edges with more savings will be more likely to be
selected at each step, but all edges in the list are potentially eligible.

Notice: Each time SR-GCWS is run, a random feasible solution is obtained. By
construction, chances are that this solution outperforms the CWS one 
hundreds of ‘good’ solutions can be obtained after some seconds/minutes.
Good results with
0.10 < α < 0.20
k 1,2,...,s
1
k
P
(
X

k
)


1













1


1



1




k

s

1
k

1
s
k

1
k

1
6.c Solving CVRP: SR-GCWS
1.
17
Adding ‘memory’ to our algorithm with a hash table:
Improvement #1:
Hash Table

A hash table is used to save, for each generated route, the best-known
sequence of nodes (this will be used to improve new solutions)

‘Fast’ method that provides small improvements on the average
2. Splitting (divide-and-conquer) method:

Given a global solution, the instance is sub-divided in smaller instances and
then the algorithm is applied on each of these smaller instances

‘Slow’ method that can provide significant improvements
Improvement #2: Splitting
1. Select routes on the SE area
(area below the diagonal)
2. Consider the new CVRP
subproblem
3. Solve the subproblem and reconstruct the solution
7. Designing the instances for SAM
 Because of this lack of well-defined
HVRP benchmarks using the
objective function presented in this
work, we decided to perform a
natural adaptation of some of the
classical
CVRP
instances
(www.branchandcut.org),
(SYMPHONY, 2011)
 We then consider an heterogeneous
fleet composed of ‘standard’ vehicles
with capacity Q0 and ‘non-standard’
vehicles with modified capacities
according to the next table:
18
Fleet 150-125: two ‘standard’ trucks are
substituted by a ‘large’ truck (with
capacity Ql = 150% ∙ Q0) and by a
‘large-medium’ truck (with capacity
Qlm = 125% ∙ Q0), respectively.
Fleet 125-125: two ‘standard’ trucks are
substituted by two ‘large-medium’
tracks.
Fleet 125-80: two ‘standard’ trucks are
substituted by a ‘large-medium’ track
and by a ‘small’ truck (with capacity
Qs = 80% ∙ Q0), respectively.
Fleet 100-100: the homogeneous case
where all trucks are ‘standard’.
Fleet 90-90: two ‘standard’ trucks are
substituted by two ‘small-medium’
trucks (with capacity Qsm = 90% ∙ Q0).
Fleet 90-80: two ‘standard’ trucks are
substituted by a ‘small-medium’ truck
and by a ‘small’ truck, respectively.
8.a Computational results
19
 The next table show the computational results for small-size instances with
different fleet configurations.
8.b Computational results
20
 The next table show the computational results for medium-size instances with
different fleet configurations.
8.c Computational results
21
 The next table show the computational results for large-size instances with
different fleet configurations.
9. Sensitivity analysis
22
 As it can be derived from the figure on the left, average gaps associated with fleet
rules 90-90 and 90-80 are positive but quite moderated, i.e. changing two ‘standard’
vehicles by two other vehicles with a somewhat smaller capacity does not seem to affect
the expected routing costs in a noticeable way.
 Similarly, the figure on the right shows a multiple boxplot of gaps. Notice also how the
variability in the gaps is much higher for the 150-125 and 125-125 fleet configurations, i.e.
increasing the capacity of two vehicles in the homogeneous fleet will induce negative
gaps, but the size of these gaps can vary in a sensible manner depending upon the
specific instance being considered. al
10. Conclusions & future work
23

We have presented the Successive Approximations Method (SAM) for
solving the HVRP by decomposing it into a series of ‘nested’ (smaller
and disjoint) homogeneous VRPs.

One of the main advantages of this approach is that it benefits from
extremely efficient algorithms already developed for solving the
homogeneous VRP.

The computational results show how it is possible to obtain pronounced
differences in average and individual routing costs by varying the
loading capacity of just two vehicles in an initially homogeneous fleet.

According to the experiments developed so far, the SAM strategies
seem to provide better solutions than selecting the smallest available
vehicle at each new round or assigning the smallest-capacity vehicles
to the less demanding routes.

We consider, however, that more complex strategies –like introducing
some biased randomization strategy or parallel optimization– should be
explored in the future, since they could contribute to improve the
algorithm performance.
2012 IN3-HAROSA
Workshop
Barcelona, June 13-15,
2012
Description of a Multi-Stage Procedure to Solve
the Heterogeneous Vehicle Routing Problem
Thank you for your attention!
Javier Faulin
Angel Juan
Alba Agustín
http://ajuanp.wordpress.com
javier.faulin@unavarra.es
Department of Computer Science
Department of Statistics and
Operations Research
Open University of Catalonia, Barcelona,
SPAIN
Public University of Navarre,
Pamplona, SPAIN
24
Download