Evolutionary Algorithms for Vehicle Routing Problems

Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #1
Evolutionary Algorithms
for Vehicle Routing Problems
Christian PRINS
Institute Charles Delaunay, FRE CNRS 2848
University of Technology of Troyes (UTT), France
[email protected]
Spring School on Vehicle Routing
Avignon, 27-28/03/2008
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #2
Outline
1.
2.
3.
4.
Genetic and memetic algorithms
Application to the Vehicle Routing Problem (VRP)
MA|PM and the Heterogeneous Fleet VRP (HFVRP)
The Periodic VRP (PVRP).
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #3
PART 1
Genetic and Memetic
Algorithms (GA and MA)
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #4
Classical GA – Incremental version
1: initialize population Pop
2: repeat
3:
select two parents P1, P2 from Pop
4:
crossover P1 ⊗ P2 → C1, C2
5:
for each child C do
6:
mutate C (small probability)
7:
replace one solution B in Pop by C
8:
endfor
9: until stopping criterion satisfied.
Not aggressive enough for combinatorial optimization,
Cannot compete with tabu search for instance.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #5
A simple example: the TSP 1/3
Travelling Salesman Problem
Data: n nodes, distance matrix D n×n
Goal: compute one cycle of minimum total length,
visiting each node once.
1. Chromosome and evaluation
One solution can be coded as a node permutation C.
Example: C = (5, 1, 4, 6, 3, 2)
The fitness (solution cost) is:
F (C ) =
n −1
∑ D (C , C
i
i =1
i +1 ) +
D(Cn , C1 )
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #6
A simple example: the TSP 2/3
2. Initial population Pop of nc chromosomes
Generate nc random permutations, compute their costs.
3. Selection of two parents P1, P2 in Pop
Binary tournament: randomly draw two chromosomes,
keep the best as P1. Repeat to get P2.
4. Simple one-point crossover
Parent
Parent
Child
Child
1:
2:
1:
2:
1
8
1
8
3
3
3
3
9
4
9
4
2|7
7|6
2|8
7|1
4
1
4
9
5
9
7
2
8
5
6
5
6
2
5
6
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #7
A simple example: the TSP 3/3
5. Simple mutation: swap two nodes
↓
↓
Child : 1 3 9 2 7 4 1 8 6
Mutated: 1 7 9 2 3 4 1 8 6
6. Replacement rule
Child C replaces the worst chromosome in Pop.
7. Stopping criteria
ƒ max number of crossovers
ƒ max number of crossovers without improvement etc.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #8
Memetic Algorithm (Moscato, 1989)
Also called: Hybrid GA, Genetic Local Search.
Very effective. Requires a local search procedure LS.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
initialize population Pop
improve each s in Pop: s ← LS(s)
repeat
select two parents P1, P2 from Pop
crossover P1 ⊗ P2 → C1, C2
for each child C do
improve: C ← LS(C)
mutate C (small probability)
replace one solution B in Pop by C
endfor
until stopping criterion satisfied
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #9
PART 2
The VRP case
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #10
The Vehicle Routing Problem
Data:
ƒ
ƒ
ƒ
ƒ
ƒ
network with n + 1 nodes
node 0: depot with identical vehicles of capacity W
nodes 1 to n: clients with known demands qi
matrix D of minimal traveling times (shortest paths)
service costs and maximum trip duration (optional)
Goal: compute a set of trips of minimum total cost.
Notes:
ƒ no split delivery
ƒ the number of trips or vehicles is a decision variable
ƒ NP-hard (TSP if total demand ≤ W)
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #11
The Vehicle Routing Problem
Problem 6 of Christofides, 50 clients.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #12
Entry points for VRP literature
T.A. Crainic, G. Laporte, Fleet management and logistics, Kluwer,
1998.
G. Laporte, M. Gendreau, J.Y. Potvin, F. Semet, Classical and
modern heuristics for the VRP, Int. Trans. Oper. Res. 7, 285-300,
2000.
P. Toth, D. Vigo, The vehicle routing problem, SIAM, 2002.
J.F. Cordeau, M. Gendreau, A. Hertz, G. Laporte, J.S. Sormany, New
heuristics for the Vehicle Routing Problem. In: A. Langevin and D.
Riopel (Eds.), Logistics systems: design and optimization, pp. 279298, Kluwer, 2005.
J.F. Cordeau, G. Laporte, M.W.P. Savelsbergh, D. Vigo. Vehicle
routing. In: C. Barnhart and G. Laporte (Eds.), Transportation,
Handbooks in OR-MS, vol. 14, 367-428, Elsevier, 2007.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #13
Starting point
In the 90's: efficient GAs for the TSP and the VRP with
time windows, but none for the VRP.
Gendreau et al. (1998): "Published GAs for the VRP
cannot compete with the best tabu search methods."
Chromosomes with trip delimiters:
1
5
4
2
7
3
6
8
Repair procedures in case of vehicle capacity violations.
Perturbing the genetic transmission of good patterns.
Key-idea: use chromosomes without trip delimiters.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #14
Chromosome and crossover
A chromosome is a permutation of the n clients.
Implicit shortest paths between adjacent clients.
No trip delimiters: giant tour for a vehicle with W=∞.
Two TSP crossovers that can be reused (we took OX):
OX
P1
P2
random cut-points
↓
↓
: 1 3 2|6 4 5|9 7 8
: 3 7 8|1 4 9|2 5 6
P1
P2
random cut-points
↓
↓
: 1 3 2|6 4 5|9 7 8
: 3 7 8|1 4 9|2 5 6
C
: 3 7 8 6 4 5 1 9 2
C
: 8 1 9 6 4 5 2 3 7
LOX
But how to get a VRP solution and its cost?
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #15
Evaluation: procedure SPLIT
b(4)
10
a(5)
c(4)
30
25
d (2)
25
30
20
c
15
40
35
e(7)
a:40
b:50
T3:90
e
Optimal splitting, cost 205
ab:55
40
T2
60
T1:55
a
Chromosome S = (a,b,c,d,e)
0
d
b
cd :95
55
c:60
115
bc:85
bcd:120
d:80
150
e:70
205
de:90
Auxiliary graph of possible trips for W=10 and shortest path in boldface
(Bellman's algorithm for directed acyclic graphs)
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #16
Comments 1/2
Practical advantages:
ƒ repair procedures with trip delimiters are avoided
ƒ classical crossovers for the TSP can be reused
No loss of information:
ƒ there exists one optimal chromosome (permutation)
ƒ the MA explores a smaller space (permutations)
ƒ SPLIT evaluates each permutation optimally
Small price to pay:
ƒ SPLIT runs in O(n2).
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #17
Comments 2/2
Flexibility of SPLIT:
ƒ Constraints on trips do not affect the shortest path
computation (e.g., maximum working time per driver).
ƒ Hierarchic optimization of total cost (F1) and number of
trips (F2): min M.F1+F2. The contrary is also possible.
ƒ Limited fleet of K vehicles. The general Bellman's
algorithm gives at iteration k the shortest paths with at
most k arcs. Use it and stop at iteration K.
ƒ Vehicle Fleet Mix Problem or several vehicle types with
different capacities and fixed costs: add to each arc
cost the cost of the cheapest compatible vehicle type.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #18
Population structure
Table Pop of nc distinct chromosomes:
ƒ to avoid premature convergence (clones)
ƒ better dispersal of solutions (better exploration)
A simple cost-spacing rule for a stronger dispersal:
ƒ ∀ P1, P2 ∈ Pop : |cost(P1) – cost(P2)| ≥ ∆
ƒ a child violating this rule is rejected
ƒ acceptable rejection rate if nc small, e.g. nc = 30
Initial composition of Pop:
ƒ 3 good solutions obtained by classical VRP heuristics
ƒ nc-3 random permutations, evaluated by SPLIT
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #19
Local search 1/2
a
b
u
Depot
x
a
b
v
u
y
x
2-OPT (change 2 edges)
Or-OPT (move 1 or 2 nodes)
v
y
u
v
x
Node exchanges are also considered.
y
u
v
x
y
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #20
Local search 2/2
u
T1
y
x
u
v
T2
x
v
Moves are also applied
to 2 trips, e.g. 2-OPT.
y
All these moves can
be scanned in O(n2).
u
T1
x
u
v
y
T2
x
v
y
First improvement
instead of best
improvement.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #21
MA overview for the VRP
1: build Pop to get nc cost-spaced chromosomes
2: for phase := 1 to phase_max do
3:
sort Pop in ascending cost order (best soln Pop(1))
4:
repeat
5:
select P1, P2 by binary tournament
6:
apply crossover OX to get one child C
7:
if random < PLS then C ← LS(C) endif
8:
select B at random in the worst half of Pop
9:
if Pop\{B} ∪ C is cost-spaced then B ← C endif
10:
until stopping criterion
11:
partial_renewal (Pop)
12: endfor
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #22
MA vs. classical VRP metaheuristics
14 Christofides instances, n=50-199
Results obtained with various settings of parameters
Kind
TS
MA
TS
TS
TS
TS
TS
TS
TS
SA
Authors
Taillard
Prins
Gendreau et al.
Taillard
Rego and Roucairol
Gendreau et al.
Rego and Roucairol
Gendreau et al.
Osman
Osman
Year
1993
2001
1994
1992
1996
1991
1996
1994
1993
1993
Dev. to best solns
0.05 %
0.08 %
0.20 %
0.39 %
0.55 %
0.68 %
0.77 %
0.86 %
1.01 %
2.09 %
Source: Crainic & Laporte, Fleet Management and Logistics, Kluwer, 1998.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #23
Current best VRP metaheuristics 1/2
14 Christofides instances, n=50-199
Results obtained with one setting of parameters
Times in minutes scaled for a 1 GHz PC
Kind
GLS+ES
GLS+ES fast
Adaptive memory
MA
RTR
MA
TS
Granular TS
Authors
Mester, Bräysy
Mester, Bräysy
Tarantilis, Kiranoudis
Prins
Li et al.
Berger, Barkaoui
Cordeau et al.
Toth, Vigo
Year Gap% Time
2004 0.03
7.72
2004 0.07
0.27
2002 0.23
1.04
2001 0.24
2.60
2004 0.41
?
2004 0.49
4.25
2001 0.56 24.62
2003 0.64
0.38
Source: Cordeau et al., New heuristics for the VRP, 2005.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #24
Current best VRP metaheuristics 2/2
20 large-scale instances from Golden et al., n=200-483
Results obtained with one setting of parameters
Times in minutes scaled for a 1 GHz PC
Kind
GLS+ES
GLS+ES fast
Adaptive memory
MA
RTR
TS
Granular TS
Authors
Mester, Bräysy
Mester, Bräysy
Tarantilis, Kiranoudis
Prins
Li et al.
Cordeau et al.
Toth, Vigo
Year Gap% Time
2004 0.00
72.9
2004 0.93
0.6
2002 0.74
8.4
2001 0.91
33.4
2004 1.05
?
2001 1.45
56.1
2003 2.87
1.8
Source: Cordeau et al., New heuristics for the VRP, Kluwer, 2005.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #25
Reference
C. Prins, A simple and effective evolutionary algorithm for the
Vehicle Routing Problem, Computers & Operations Research,
31(12), pp. 1985-2002, 2004. Presented first at MIC 2001.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #26
PART 3
Memetic Algorithms with
Population Management
The HVRP case
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #27
MA|PM (Sörensen, 2003)
General principles
ƒ small population of high-quality solutions
ƒ local improvement
ƒ diversity controlled via population management
Population management
ƒ
ƒ
ƒ
ƒ
distance d(x,y) between solutions, in solution space
distance to a population P: dP(s) = min {d(s,x): x∈P}
a new solution s is added to P if dP(s) ≥ ∆
the diversity parameter ∆ can be dynamically adjusted
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #28
MA|PM model for routing problems
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
initialize population P and diversity parameter ∆
repeat
select parents P1, P2 from P
apply crossover OX to get one child C
if random < PLS then C ← LS(C) endif
select B at random in the worst half of P
or
| if dP(C) ≥ ∆ then
while dP(C) < ∆ do
mutate C
| replace B by C
end while
| end if
replace a solution B by C
| //else discard C
update diversity parameter ∆
until stopping criterion satisfied
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #29
Some advantages of MA|PM
Bridge the gap between MA and Scatter Search (SS).
Can be viewed as a "light" form of SS.
Active control of diversity thru population management.
MA-like structure: easier to implement than SS.
Easy upgrade of an existing MA.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #30
The HVRP
VRP with heterogeneous fleet (HFVRP or HVRP):
ƒ
ƒ
ƒ
ƒ
t vehicle types
type k : availability a(k), capacity Q(k)
fixed cost f(k), cost per unit distance v(k)
trip T of length L with vehicle k: cost(T) = f(k)+v(k).L
Goal: minimize total cost of trips,
each trip being assigned to one compatible vehicle.
VRP: case t = 1
Vehicle Fleet Mix Problem (VFMP): all a(k) = ∞ (or = n)
True HVRP: limited a(k).
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #31
SPLIT for the VRP and VFMP
Consider one chromosome and a possible trip T of length L.
Classical VRP, splitting graph with O(m) arcs (one per trip):
ƒ cost(T) = L
ƒ splitting in O(m) using Bellman algorithm.
ab:55
0
a:40
40
b:50
cd :95
55
c:60
115
bc:85
bcd:120
d:80
150
e:70
205
de:90
VFMP:
ƒ cost(T) = f(k)+v(k).L, k cheapest compatible vehicle type.
ƒ The shortest path computation does not change, O(m).
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #32
Example for the VFMP
Fleet with t = 3 vehicle types:
i
Type k
1
2
3
Trip load : 25
Trip length: 300
j
Qk
20
40
50
Fk
100
200
250
Vk
10
20
30
Assignment of k to (i,j)
Capacity violated
Cij=200+20x300=6200
Cij=250+30x300=9250
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #33
SPLIT for the HVRP 1/3
True HVRP (limited a(k)):
ƒ the cost of a trip depends on the vehicle assigned to it
ƒ this can be modelled by parallel arcs
Arc cost 6200 (vehicle type 2)
i
j
Arc cost 9250 (vehicle type 3)
ƒ feasible path: no more than a(k) vehicles of type k
ƒ shortest path problem with resource constraints !
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #34
SPLIT for the HVRP 2/3
The splitting problem can be infeasible:
t=2, a1=1 et Q1=10, a2=1 et Q2=14
S :
q :
1 2 3 4
7 2 9 4
→ feasible
S' :
q :
1 4 2 3
7 4 2 9
→ infeasible
Resource-constrained shortest path problem!
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #35
SPLIT for the HVRP 3/3
Dynamic programming method
Let F ( j,x1,x2,…,xt) be:
ƒ the cost of an optimal splitting of (S1, S2, …, Sj)
ƒ with 0 ≤ xk ≤ ak vehicles of each type k.
Our goal is to compute F (n,a1,a2,…,at) and we have:
ƒ F(0,x1,x2,…,xt)=0, for each type k and all 0 ≤ xk ≤ ak
ƒ ∀ j > 0, F(j,x1,x2,…,xt)=
min {F(i,x1,x2,…,xk-1,…,xt): i ≤ j, load(i,j) ≤ Qk, xk>0)
Can be implemented in O(m.t.nt) if t ≤ n.
Pseudo-polynomial. Polynomial for a fixed t.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #36
Distance measures 1/3
X,Y two chromosomes with n tasks (required nodes).
No trip delimiters: distances for permutations.
Hamming distance:
ƒ DH(X,Y) = number of indices with ≠ values in X, Y.
DH ( X , Y ) =
∑ ( X (i ) ≠ Y (i ))
i =1, n
ƒ X = (1,2,3,4,5)
Y = (1,3,4,2,5)
DH(X,Y) = 3
ƒ Values in [0,n]. Can be computed in O(n).
ƒ Drawback: DH(X,Y) = n if Y is a circular shift of X.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #37
Distance measures 2/3
"Broken pairs" distance:
ƒ DR(X,Y)=nb of pairs {X(i),X(i+1)} not adjacent in Y.
ƒ X = (1,2,3,4,5)
Y = (3,4,1,2,5)
(2,3) and (4,5) are broken
DR(X,Y) = 2
ƒ Values in [0,n-1]. Can be computed in O(n).
This distance is the best for vehicle routing problems …
if our encoding without trip delimiters is used!
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #38
Distances measures 3/3
Levenshtein (or edit) distance DL:
ƒ
ƒ
ƒ
ƒ
ƒ
X and Y viewed as strings of symbols
DL(X,Y) minimum nb of operations to change X into Y.
Allowed operations; delete, insert, replace one symbol.
Values in [0,n].
Can be computed in O(n2) using a DP method.
Example. DL("fruits","baits") = 3:
fruits → bruits → buits → baits
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #39
Diversity control policy
In MA|PM, child C is accepted in P if dP(C) ≥ ∆. Policies:
ƒ ∆=constant, e.g. ∆ = 1 ⇔ no clones
ƒ growth from 1 to a maximum value
ƒ growth with reset when best-known solution improved.
New best soln found
Stop
max value:
0.7 x dmax
min value: 1
Crossovers
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #40
Results for VFMP 1/2
12 instances from Golden, n=20-100
Fixed costs but no variable costs
Best-known solutions (BKS) as listed in Choi and Tcha (2007)
Best of 5 runs, times scaled for a 2.4 GHz PC
Authors
Choi, Tcha
Prins
Taillard
Prins
Wassan, Osman
Gendreau et al.
Year
2007
To appear
1999
To appear
2002
1999
Method
CG+BB
MA|PM
HCG
MA
TS
TS
Dev BKS
0.004%
0.04%
0.14%
0.15%
0.23%
0.24%
Time (s)
150
27
32
12
18
18
Note: the MA|PM improves one best-known solution.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #41
Results for VFMP 2/2
12 instances from Golden, n=20-100
Fixed costs and variable costs
Best-known solutions (BKS) as listed in Choi and Tcha (2007)
Best of 5 runs, times scaled for a 2.4 GHz PC
Authors
Prins
Choi,Tcha
Prins
Year
To appear
2007
To appear
Method
MA|PM
CG+BB
MA
Dev BKS
-0.06%
0.00%
0.01%
Note: the MA|PM improves 2 best-known solutions.
Time(s)
14
93
11
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #42
Results for the true HVRP
8 larger Golden instances, n=50-100
Best-known solutions (BKS) as listed in Tarantilis
One single run, times scaled for a 2.4 GHz PC
Authors
Li,Golden,Wasil
Prins
Prins
Tarantilis et al.
Taillard
Year
2007
To appear
To appear
2004
1999
Method
RTR
MA|PM
MA
TA
HCG
Dev BKS
-0.49%
-0.45%
-0.04%
0.09%
0.40%
Time(s)
286
75
50
86
52
The MA improves 4 best-known solutions.
The RTR and MA|PM improve 6 best-known solutions.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #43
References
N. Labadi, P. Lacomme, C. Prins, A memetic algorithm for the
heterogeneous fleet VRP, Proceedings of Odysseus 2006, E.
Benavent et al. (Eds.), pp. 209-213, Univ. of Valencia, 2006.
C. Prins, Two memetic algorithms for vehicle routing problems
with heterogeneous fleets, Engineering Applications of Artificial
Intelligence, forthcoming.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #44
PART 4
Periodic problems
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #45
The Periodic VRP - Basic version
PVRP data:
ƒ undirected graph G, depot + n required nodes (tasks)
ƒ planning horizon H of np periods or "days"
ƒ for each task i, frequency f(i) (number of visits in H)
ƒ demands q(i), service times s(i), travel times C(i,j).
Goal (hierarchical bi-objective function):
ƒ select f(i) days per task i and solve one VRP per day
ƒ main objective: minimize fleet size
ƒ secondary objective: total duration of trips over H
Applications:
ƒ industrial waste collection, drinks dispensers,
ƒ delivery of propane to glass houses etc.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #46
Varying demands & service times
Published models: q(i), s(i) do not depend on period p.
But demands often result from daily "productions"
ƒ constant production : prod(i,p) = prod(i)
ƒ global variation α(p) : prod(i,p) = α(p)⋅prod(i)
ƒ general case
: distinct prod(i,p), p=1…np
If last visit in period q, the amount in period p is:
q (i , p ) =
p
∑ prod (i, k )
k = q +1
Service time: s(i,p) linear in q(i,p) + fixed cost.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #47
Spacing constraints
Two types (convertible into each other):
ƒ min & max time lag between two visits
ƒ set of allowed day combinations comb(i)
We use day combinations:
ƒ not too many for small horizons (1 week → 1 month)
ƒ spacing is implicitly satisfied
ƒ demands can be computed in advance for each day
Example:
ƒ cyclic horizon, np=7, no work on week-end, f(i)=1,2,5
ƒ 8 combinations: {1,2,3,4,5},{1,4},{2,5},{1}…{5}
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #48
Chromosomes
Each task i has a set of day combinations.
Chromosome S:
ƒ np sublists S(1)…S(np): one VRP chromosome per day
ƒ node i occurs f(i) times, using one day combination
ƒ node i occurs at most once in each sublist S(k)
Chromosome length:
L=
∑ f (i )
i =1,n
No trip delimiter: S kind of priority order for one vehicle
doing the tasks day by day and one by one in each day.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #49
Extended LOX crossover (ELOX)
i
f(i)
comb(i)
i
f(i)
comb(i)
1
3
{1,3,4},{2,3,4}
5
1
{1},{2}
2
2
{1,3},{2,4}
6
3
{2,3,4},{1,2,4},{1,2,3}
3
1
{1},{4}
7
2
{2,4},{1,3}
4
1
{1}
8
1
{2},{4}
Mon
P1
1
2
Tue
3
4
5
6
Mon
P2
7
6
6
4
7
1
Tue
5
4
8
Mon
C1
Wed
6
6
7
6
1
6
Wed
2
1
Tue
5
2
Thu
7
2
1
1
1
8
1
2
Thu
3
6
Wed
8
7
6
Thu
7
3
1
2
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #50
Chromosome evaluation
Hierarchical bi-objective function Z=M.nvu+tcost, where:
ƒ nvu, number of vehicles used (fleet size required)
ƒ tcost, total duration of trips over horizon H
Optimal chromosome evaluation:
1. SPLIT in each day p, with arc costs = 1 in auxiliary
graph → minimum nb of vehicles per day nv(p).
2. Minimum fleet size nvu = maximum of the nv(p).
3. SPLIT on each day p using actual trip costs and at
most nvu arcs → minimum cost per day cost(p)
4. Return Z = M.nvu + sum of the cost(p).
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #51
Role of the local search
We have to kinds of decisions in the MA:
ƒ tactical level: change the days for some tasks
ƒ operational level: change the trips in one given day
The MA is NOT a two-phase method, it can modify a
solution at the two levels.
But, to limit running time, the local search is applied to
each day separately (operational level, VRP local search).
The crossover deals with the tactical level.
In general, this kind of separation is fruitful in MAs.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #52
References
The method was developed in fact for the periodic
capacitated arc routing problem (PCARP) but the
algorithm is easily transposed to the PVRP:
P. Lacomme, C. Prins, W. Ramdane-Chérif: Evolutionary
algorithms for periodic arc routing problems, EJOR,
165(2), pp. 535-553, 2005.
F. Chu, N. Labadi, C. Prins: Heuristics for the periodic
capacitated arc routing problem, Journal of Intelligent
Manufacturing, 16(2), pp. 243-251, 2005.
Evolutionary Algorithms for Vehicle Routing Problems – Christian Prins - Slide #53
Concluding remarks
Memetic algorithms are effective tools to solve vehicle
routing problems.
The SPLIT procedure is general and flexible… as long as
the shortest path problem is polynomial (VRP, VRPTW,
PVRP) or pseudo-polynomial (HVRP)!
Software engineering point of view: the progressive
upgrade GA → MA → MA|PM is (relatively) easy.
Remarks confirmed by other applications not described
here (e.g. time windows, multi-objective problems).