Beruflich Dokumente
Kultur Dokumente
kK
(i, j)E
t
i j
x
k
i j
+
2
kK
(i, j)E
d
i j
x
k
i j
+
3
kK
(i, j)E
(s
k
i
e
i
)x
k
i j
(2)
1
,
2
,
3
: the weights assigned to each objective in
order to express the relative importance the correspond-
ing objectives.
Constraints:
kK
(i, j)E
x
k
i j
= 1, k K (3)
N
j=1
x
k
0 j
1, k K (4)
N+M
j=N+1
x
k
j0
1, k K (5)
N
j=1
x
k
j0
= 0, k K (6)
N
i=1
x
k
i j
=
N
i=1
x
k
ji
= 1, k K, j V (7)
N+M
i=0
x
k
i j
N+M
i=0
x
k
ji
= 0, k K, j V (8)
kK
(i, j)E
x
k
i j
d
i j
L (9)
w
k
i
+ u
j
w
k
j
(1 x
k
i j
)M, k K, (i, j) E (10)
0 < w
k
i
W, k K, i N (11)
w
k
i
= 0, k K, i {0} M (12)
4
E s
k
i
L, k K, i {0} M (13)
v
k
i
+ s
i
+ t
i j
v
k
j
(1 x
k
i j
)M, k K, (i, j) E (14)
e
i
N+M
j=1
x
k
i j
s
k
i
l
i
N+M
j=1
x
k
i j
(15)
Let = {
1
,
2
, ...,
q
} denote the set of all feasible
sub-routes in G, each element
r
is sub-route of G.
We dene the binary variable y
rk
i j
be equal to 1 if and
only if edge (i, j)
r
and traveled by vehicle k. The
conict constraint:
q
r=1
a
i j
y
rk
i j
= 0, k K, (i, j) E (16)
4. Generic algorithm
Our implement GA is divided into ve major steps
or phases: initial population, selection, crossover, mu-
tation and adaptation, in which rst four step as seem
as the traditional GA. The evolution of population is
driven by the selection, recombination, mutation phases
respectively while adaptation phases helps individuals
improve themselves. Thus, the idea of the algorithm not
only base on biological evolution but also base on cul-
tural evolution
3
.
Algorithm GA
(1) INITIAL population pop
(2) SET cont = stop condition
(3) while cont != true do
(4) pop = naturalSelect(pop)
(5) pop = recombine(pop)
(6) pop = mutate(pop)
(7) pop = adapt(pop)
(8) cont = Update stop condition
(9) FINISH
4.1. Initial population
In order to setup the initial population, we use the
ideal is proposed by D.V. Tung and A. Pinnoi research.
Authors start from Solomons I1 Insert heuristic and
modify it by adding criteria in Eq 17 to Eq 19.
3
Cultural evolution, also called sociocultural evolution, the de-
velopment of one or more cultures from simpler to more complex
forms http://www.britannica.com/EBchecked/topic/146212/cultural-
evolution
C
1
(i, u, j) =
1
C
11
(i, u, j) +
2
C
12
(i, u, j) (17)
C
11
(i, u, j) = d
iu
+ d
uj
d
i j
(18)
C
12
(i, u, j) = v
ju
v
j
(19)
C
2
= d
0u
C
11
C
1
(i, u, j) (20)
in which:
d
i j
: distance from vertex i to vertex j
v
ju
and v
j
: starting service time at vertex j after and
before insert vertex u into the sub-route.
1
: the weight of the distance increase when insert a
new stop into the present sub-route.
2
: the weight of the waiting time increase when in-
sert a new stop into the present sub-route
1
+
2
= 1.
: the weight express the distance between the depot
and the insert stop.
: the distance adjusted factor.
The stop is selected insert into the route has the
largest value in Eq. 17 without violate any constrains.
However, this method is only designed to create just
one feasible solution and support for optimizing local
search algorithm. For the set of feasible solutions, these
heuristics needed improvement.
Algorithm A
(1) UNROUTED all stops
(2) CREATE new solution S
(3) CREATE new route R
SET ref = Depot
SET dist = Maximum travel distance
(4) if CAN create new sub-route then
SR = createSubroute(ref, dist ) //Algorithm B
Repeat
SET stop = The stop has value C
2
is max
INSERT stop into SR
ROUTED stop
Until CANT nd the stop insert into SR
DELETE Depot in the last of SR
INSERT SR into the route R
SET ref = The landll at the end of SR
UPDATE dist = The remain travel distance
GOTO (4)
else
if EXIST the sub-route in R then
INSERT the Depot into the last of R
INSERT R into the solution S
GOTO (3)
else
GOTO (5)
5
(5) FINISH
Algorithm A, in the function createSubroute, a ran-
dom stop will be selected and insert into the rst posi-
tion of the new sub-route. Thus, the feasible solutions
in population are created randomly.
4.2. Representation
An individual is represented as a string of the se-
quence of vertices. In the the chromosome represen-
tation, the depot and landlls is removed from the se-
quence of vertices. That will help us advance in using
crossover and mutation operator. In decode process, the
depot and landlls are restored. The rst, the depot will
be inserted at the beginning and the end position of the
chromosome string. The next step, the process of check-
ing constraints is executed, when the constraint is vio-
lated, the suitable landll will be inserted into the chro-
mosome string. The suitable landll can be found by
scan all landll in problem and get the landll with the
minimization of distance between two neighbor stop.
4.3. Fitness function
Base on objective function in Eq 2, the tness func-
tion be expressed as:
C =
1
C
dist
+
2
C
move time
+
3
C
wait time
(21)
in which:
C
dist
: The total move distance of all vehicles.
C
move time
: The total move time of all vehicles.
C
wait time
: The total wait time of all vehicles.
Depend on importance of objectives, the correspond-
ing weights will have great or small value. Our study,
we consider the total move distance objective and total
move time objective is more important than total wait
time objective. About number vehicles optimization,
this objective is not consider as main component in the
global objective function, however, it will be considered
in GA search process.
4.4. Operators and heuristics
Next, we discuss about operators are used in GA to
solve for waste collecting VRPTWC. Elements in the
initial population are created by Algorithm A may be
not dominant and in the searching process it will be
evolved after each generation. The GA try to nd dom-
inant solutions in the set of Pareto solutions and its op-
erators are essential tool help the search process explore
the searching space.
Partial-mapped crossover operator (PMX) has been
proposed by Goldberg and Lingle [14] that is main com-
ponent to reproduce next generation. With the two
selected individual, PMX exchanges one or many se-
quences of vertices between two chromosomes and re-
arranges them when exchange phase nished. Fig. 4 is
performance of steps in crossover process implemented
by PMXoperator. Two newpermutation strings are gen-
erated maybe not satisfy constraints of problem. How-
ever, encoding process will recorrected them to satisfy
constraints.
Figure 4: Steps in crossover process implemented by PMX operator
Random exchange mutation operator is an operator
used in mutation phase in our GA implement. The
mutation operator only executes just one argument is
a chromosome. It exchanges two or more genes ran-
domly in the chromosome. Fig. 5 illustrates our imple-
ment of the random exchange mutation operator with
3 crossover point at . At two or more positions of the
chromosome is selected, the vertices will be exchanged.
In the gure the vertex at position 2 exchange with the
vertex at position 6 and similar to vertex 8 and 9.
Figure 5: An example of random exchange mutation operator.
-interchange operator (-opt) is used in adaptation
that is an operator help the local search embed in GAex-
plorer search space. The -interchange was introduced
by in Osman and Christodes [15] for the capacitated
clustering problem. However, authors implement it only
for the route is the Hamiltonian cycle. Here, we extend
-opt for using with the routes are not the simple cycle.
Assuming
p
i
and
q
j
are two sub-routes i-th and j-
th of two routes r
p
and r
q
in the solution S and
p
i
and
q
j
are two paths in sub-routes. ||||
and |||| and they not store the landlls and the
depot. -interchange generated the new feasible solu-
6
tion by exchange two set vertices are subsets of two
sub-routes in two routes of the solution. If
p
i
and
q
j
are denoted two new sub-routes, we have
p
i
=
(
p
i
\)
and
q
j
= (
q
j
\)
= {r
1
, ..., r
p
, ..., r
q
, ..., r
k
} with r
p
= (r
p
\
p
i
)
p
i
and r
q
= (r
q
\
q
j
)
q
j
are two new routes.
The space of the neighbor of solution is set of the
all feasible solution created by -opt is N
(). Assum-
ing that each route r has n
s
sub-routes and each sub-
route has same number of vertices n
v
and n
v
> , we
consider the count of elements in N
(s) space.
There are C
k
2
pair routes to exchange:
C
k
2
=
k!
2!(k 2)!
(22)
, with route pair (r
i
, r
j
), every sub-route
i
p
r
i
can
exchange with n
s
sub-routes in r
j
. The count of sub-
route pairs can exchange in each route pair is n
2
s
. In each
sub-route pair (
i
p
,
j
q
), amount of path to exchange can
be chosen in each sub-route are:
n
v
1
i=1
i = (n
v
2
) (23)
Thus, amount of elements in neighbor N
2
(n
v
2
)
2
k!
2!(k 2)!
(24)
, by the product of n
s
and n
v
is proportional to N and
number vertices of graph and k is not too large constant
(k << N), we have:
||N
(s)|| O(
2
N
2
) (25)
, and in Eq 25 is not considered case, in which each
route self-exchange.
stop condition GA is started up with number gener-
ation is determinant. However after every each genera-
tion another criterion will be checked. If it is satised,
the algorithm will stop. We dene tness function of
population in generation i-th as:
C
i
(pop) =
1
avg
i
(pop) +
2
max
i
(pop) (26)
in which
C
i
(pop): is value help to evaluate progress of popu-
lation at i-th generation
avg(i): is average value of tness of all individual in
population at i-th generation.
max(i): is tness value of the best individual in pop-
ulation at i-th generation.
The value C
i1
(pop) of the previous generation is
kept, if i-th generation is not progressive than the pre-
vious generation after n-times, the algorithm will be
stop. This is necessary because in many cases, after
nite number loop, the population set will converge be-
fore it reaches the stop condition of problem. The result
of this improvement for stop condition will be show in
section 5.
Encoding and decoding process is designed to sup-
port for optimizing the number vehicles. In encoding,
its simple that landlls and depot are removed from the
solution to form the chromosome. Decoding is dier-
ent, the constraints are always checked in the process
to form the solution. Base on the algorithm in Fig. ??,
we change the next stop is chosen with the best value
in Eq. ?? by the stop in the chromosome. When the
next stop in chromosome is inserted into the solution
is violate the constraints then the suitable landll will
be inserted into the solution. Before the maximum dis-
tance constraint is violate, the solution must be inserted
the depot into it.
However, one interesting important detail in the pro-
cesses are the solution after decoding is not sure like
as the original solution before encoding. They are
not deterministic process, the following example shows
clearly that. In Fig. ?? show an solution instance of a
problem and its chromosome. Its decoding process is
illustrated in Fig. 6. The solution result of the decoding
process which 3 sub-routes is better the origin solution
has 4 sub-routes. In some cases, decoding process re-
duce not only number sub-routes but also number routes
(number vehicles) in the solution. Thus, the encoding
and decoding method are also the ways help MA extend
searching space and so that the population will more di-
verse.
4.5. Components of the MA
Base on the above improvements, we implement MA
with components as following:
Natural Selection: we implement MA with rate se-
lection. First,the individuals are sorted in ascend-
ing order according to their tness. Then, only
the best are selected to continue, while the rest are
deleted. The number of chromosomes that are kept
each generation depend on selection rate input pa-
rameter.
Pairing selection: is implemented based on the
method ranking weighted random pairing. The
probabilities assigned to the individual in popula-
tion pool are proportional to their tness cost. A
7
Figure 6: Illustrate decoding process of the chromosome in Fig. ??
individual with the high ranking in population cost
has the high probability of mating, while the others
with the low cost has the low probability of mating.
Mating: is the creation of ospring from the par-
ents selected. In here, PMX is used in mating pro-
cess.
Mutation: as mentioned above, MA use the ran-
dom exchange mutation operator for chromosome
is chosen for mutation. Number of chromosomes
will be chosen with the given rate as input parame-
ter of the mutation operator. Except elite individu-
als, others may be muted with a certain probability.
Adaptation: that is process improves tness cost of
each individual in population by the local search.
Hill Climbing (HC) is applied to individuals after
mutation process. With a determined rate, some of
individuals in population are adapted to improve
their tness cost. The neighborhood is explored
with -opt interchange.
5. Computational results
Our algorithms are implemented in GNU C++ lan-
guage in the a CentOS 6.3 machine of 2.2GHz Xeon
processor with 32 nodes and 128 GB of RAM. Table ??
show the set up parameters of the algorithms for each
waste collection VRPTWC benchmark problem sets.
The benchmark data for waste collection VRPTW is
proposed by used Kim et al. [2] in their research. How-
ever, these benchmark data need additional information
about the properties of the waste in order to use for
Table 3: The best solution results of our algorithms for the Waste
collection VRPTWC benchmark problem sets.
Algorithm Value
Number stops
102 277 335 444
HC
F -307 -511 -269 -86
T
c
6 365 1692 1769
N
v
4 3 8 11
TD 280 511 269 86
T
w
139 0 0 0
S
m
1036 1071 651 183
GA
F -294 -527 -263 -91
T
c
1 9 44 14
N
v
3 3 6 10
TD 272 527 263 91
T
w
107 0 0 0
S
m
979 1144 738 184
MA
F -271 -521 -249 -56
T
c
3256 9006 63471 74224
N
v
3 3 7 7
TD 230 521 249 56
T
w
202 0 0 0
S
m
1074 1119 747 151
the waste collection VRPTWC. Our benchmark set, the
property of the waste is a new column and is attached
into the origin benchmark. The waste properties are
denoted from 1 to 7 as shown in Table 1. We insert
these value sequentially into the waste property column
in each row which store information about the regular
stop. For the other rows (rows store information about
the landll and depot), the value 0 is inserted.
In order to compare MA with other algorithms, the
result of Hill-Climbing (HC) and Generic Algorithm
(GA) are also presented. The computational results are
shown in Table 3 include: tness value (F), computa-
tional time (T
c
) in second, number vehicles (N
v
), to-
tal travel distance (TD) in mile, waiting time (T
w
) in
minute and shape metric (S
m
). The tness value pro-
vides an overview of the quality of solution while other
values as total travel distance, waiting time, number ve-
hicles and shape metric provide detail information. The
computational time shows the time cost of the algorithm
and the shape metric is a value to quantify the route
compactness, more detail about shape metric see [2].
The total travel distance is the total travel distance of
routes of the solution, the waiting time is the time vehi-
cles takes to wait on all routes of the solution.
In case of waste collecting VRPTW, when the conict
condition is not considered, our results are compared
with experiments of Kim et al. [2]. In order to optimize
computational time cost, GA is selected for compute
and compare. We set up the population number equal
the stop number in each benchmarks. Table 2 presents
8
Table 2: The solution of the waste collection VRPTW by our experiments and Kim et al. [2]
Problem set
T
c
TD S
m
N
v
GA B.-I. Kim GA B.-I. Kim GA B.-I. Kim GA B.-I. Kim
102 stop 4 3 174 205 637 399 2 3
277 stop 111 37 483 521 928 858 3 3
335 stop 647 28 206 191 674 410 5 5
444 stop 248 372 80 82 180 70 9 10
804 stop 103282 92 509 769 4941 2350 4 5
1051 stop 50714 329 1378 2370 7774 3615 8 18
1351 stop 95 1039 2145 7
1599 stop 212 1459 4141 13
1932 stop 424 1395 3166 17
2100 stop - 408 1833 5761 16
the computational result for all benchmarks by GA. We
gain the better solutions with the total traveling distance
value and number vehicles are less than. However, our
implement is not included break-time lunch constraint
as same as [2]. Because the constraint is relaxed, the
searching space is more extend and thus our algorithm
is more advantage in the searching process.
6. Conclusion
Phan tam chua viet
References
[1] I. H. Osman, I. Christodes, Capacitated Clustering Problems
by Hybrid Simulated Annealing and Tabu Search, International
Transactions in Operational Research 1 (3) (1994) 317 336.
[2] B.-I. Kim, S. Kimb, S. Sahoo, Waste collection vehicle rout-
ing problem with time windows., Computers & Operations Re-
search 3 (2005) 3624 3642.
[3] H. G. M. Pullen, M. H. J. Webb, A computer application to a
transport scheduling problem, The Computer Journal 10 (1967)
10 13.
[4] M. W. P. Savelsbergh, Local search in routing problem with time
windows, Annals of Operations Research 4 (1985) 285 305.
[5] K. Knight, J. Hofer, Vehicle scheduling with timed and con-
nected calls: A case study, Operational Research Quarterly 19
(1968) 299 310.
[6] O. B. G. Madsen, Optimal scheduling of trucks - Arouting prob-
lem with tight due times for delivery, Optimization applied to
transportation systems (1976) 126 136.
[7] M. M. Solomon, M. Desrochers, Time windows con-strained
routing and scheduling problem, Transportation Science 22
(1988) 1 13.
[8] M. M. Solomon, Algorithms for the Vehicle Routing and
Scheduling Problems with Time Window Constraints, Opera-
tional Research 35 (2) (1987) 254 265.
[9] D. V. Tung, A. Pinnoi, Vehicle routing-scheduling for waste col-
lection in Hanoi, European Journal of Operational Research 125
(2000) 449 468.
[10] O. Br aysy, M. Gendreau, Vehicle Routing Problem with Time
Windows, Part I: Route Construction and Local Search Algo-
rithms, Transportation Science 39 (1) (2005) 104 118.
[11] M. Desrochers, J. Lenstra, M. Savelsbergh, F. Soumis, Vehicle
Routing with Time Windows: Optimization and Approximation,
in: B. L. Golden, A. A. Assad (Eds.), Vehicle Routing: Methods
and Studies, North-Holland, 65 84, 1988.
[12] K. Q. Zhu, A New Genetic Algorithm For VRPTW, in: Proceed-
ings of the International Conference on Articial Intelligence,
2000.
[13] K. Hamdi-Dhaoui, N. Labadie, A. Y. Q. Zhu, The Vehicle Rout-
ing Problem with Conicts, in: Proceedings of the 18th IFAC
World Congress, 2011.
[14] D. Goldberg, R. Lingle, Alleles, loci and the traveling sales-
man problem, in: Proceedings of the Second International Con-
ference on Genetic Algorithms, Lawrence Eribaum Associates,
Mahwah, NJ, 1985.
[15] I. H. Osman, N. Christodes, Capacitated clustering problems
by hybrid simulated annealing and tabu search, International
Transactions in Operational Research 1 (3) (1994) 317 336.
9