OVRP Model
OVRP Model
a r t i c l e i n f o a b s t r a c t
Keywords: This paper presents a real-value version of particle swarm optimization (PSO) for solving the open vehicle
Particle swarm optimization routing problem (OVRP) that is a well-known combinatorial optimization problem. In OVRP a vehicle
Open vehicle routing problem does not return to the depot after servicing the last customer on a route. A particular decoding method
Decoding method is proposed for implementing PSO for OVRP. In the decoding method, a vector of the customer’s position
is constructed in descending order. Then each customer is assigned to a route with taking into account
feasibility conditions. Finally one-point move has been applied on constructed routes that seem promis-
ing to result in a better solution. Experimental evaluations on benchmark data sets demonstrate the com-
petitiveness of the proposed algorithm.
Ó 2011 Elsevier Ltd. All rights reserved.
1. Introduction is about planning a set of school bus routes where in the morning
pupils are picked up at various locations and brought to school, and
In the basic vehicle routing problem (VRP), we generate a se- the routes are reversed to take pupils home in the afternoon. Bodin,
quence of routes which a homogeneous fleet of vehicles in at a Golden, Assad, and Ball (1983) described a problem of express air-
single depot service all customers and the total distance traveled mail distribution in the USA, which is an open pick-up and delivery
by the fleet is minimized. Each customer has a fixed demand and VRP with capacity constraints and time windows. The VRP has
is serviced by exactly one visit of a single vehicle. Each vehicle been studied extensively, but few works address the OVRP. During
must leave from and return to the depot and it has a known the last decade, tabu search, deterministic annealing, large neigh-
capacity and possibly a route-length restriction that limits the borhood search and branch-and-cut, among other methods, have
maximum distance it can travel. In the open vehicle routing prob- been successfully applied to the OVRP. Although exact methods
lem, a vehicle does not return to the depot after servicing the last can obtain optimal solutions, the computational time required to
customer on a route. In addition, we need to find the minimum solve adequately large problem instances is expensively. Therefore
number of vehicles required to service all of customers. This the most of researchers focus on designing meta-heuristic ap-
means that the cost of an additional vehicle is larger than any proaches to produce high quality near optimum solutions with rea-
savings that may be get by reduction of the total travel time. sonable computational time (Repoussis, Tarantilis, Braysy, &
The important difference between the OVRP and VRP is that in Ioannou, 2010). Bodin et al. (1983) used the well-known savings
the OVRP each route is a Hamiltonian path but in VRP each route heuristic of Clarke and Wright to solve OVRP with delivery and
is a Hamiltonian cycle so the optimal solution for the OVRP can pickup time windows. Sariklis and Powell (2007) solve the OVRP
be quite different from the VRP. The problem of findings the best associated capacity constraints on vehicles with cluster first route
Hamiltonian path for each set of customers that assigned to a second. Their heuristic has two phases. In the first phase, they con-
vehicle is NP-hard, hence the OVRP is also NP-hard (Fleszar, struct clusters of customers taking vehicle capacity into account
Osman, & Hindi, 2009). and then balance and improve the clusters by reassigning custom-
The open vehicle routing is usually used in a company which ers. In the second phase, open routes are generated by solving a
either does not own a vehicle fleet at all, or its fleet is inappropriate minimum spanning tree problem. They used penalties to modify
or inadequate to satisfy the demand of its customers. Thus, the the solution and iteratively convert infeasible solutions to feasible
company has to contract all or part of its distribution services to one. Brandao (2004) developed a tabu search algorithm to solve
external transporter. These contractors have their own vehicles OVRP. Initial solutions were generated by using the nearest neigh-
and pay their own vehicle costs. Fu, Egles, and Li (2005) described bor heuristic and the K-tree method. Each solution was submitted
two areas of application. The first application includes planning to an unstringing and stringing procedure to improve each route.
train services, starting or ending at the Channel Tunnel. The second In his algorithm, there are only two types of trial moves. First is
an insert move and second is a swap move that exchanges two
⇑ Corresponding author. Tel.: +98 2164542541; fax: +98 2166497930. customers on two different routes. Tarantilis, Ioannou, Kiranoudis,
E-mail address: [email protected] (S.A. MirHassani). and Prastacos (2004) developed backtracking adaptive threshold
0957-4174/$ - see front matter Ó 2011 Elsevier Ltd. All rights reserved.
doi:10.1016/j.eswa.2011.03.032
11548 S.A. MirHassani, N. Abolghasemi / Expert Systems with Applications 38 (2011) 11547–11551
accepting that is a deterministic variant of simulated annealing in sub-tours and constraint (7) imposes an upper bound equal to
which a threshold value T is specified as the upper bound on the the vehicle capacity Q to the total customer demand that is
amount of objective function increase allowed. The notion loaded on each vehicles. Constraints (8) and (9) guarantee that
behind the method is applying a backtracking policy for the thresh- only one vehicle will depart from the depot in order to service
old when no acceptances of feasible solutions are encountered dur- a sequence of customers, and none will return to the depot,
ing the search. Pisinger and Ropke (2005) developed an adaptive respectively. Finally, constraints (10) and (11) define variables x
large neighborhood search approach, which contained a set of large and z for each vehicle k.
neighborhoods that compete to modify the current solution. In any
iteration, two algorithms were selected to remove and repair the
current solution. Several removal and insertion heuristics can be 3. PSO for OVRP
used to expand and strengthen the search. Letchford, Lysgaard,
and Eglese (2007) developed a branch and cut solution method In this section, a particle swarm optimization algorithm is pro-
for solving the OVRP. This method is applied on both small and posed for solving OVRP. The first section is about the PSO algo-
medium scale OVRP instances. Repoussis et al. (2010) proposed a rithm; the second section explains the decoding method and
hybrid evolution strategy for solving OVRP. Their method manipu- followed by the improvement method.
lates a population of individuals at each generation.
This paper shows how to solve efficiently OVRP using continues 3.1. PSO algorithm
version of PSO. The proposed algorithm examines capacity restric-
tion in the decoding procedure and employ gbest and nbest neigh- Particle swarm optimization is a population-based computation
borhood in velocity equation. The paper is organized as follows: technique proposed by Kennedy and Eberhart (1995) which was
Section 2 reviews the OVRP definition and mathematical formula- motivated by the organism’s behavior such as schooling of fish
tion. Section 3 describes the proposed PSO algorithm for solving and flocking of birds. In PSO a number of particles are placed in
OVRP. This section also includes decoding method. Section 4 dis- the search space of some problem, and each evaluates the objective
cussed the computational experiment of the proposed PSO on a function at its current location. Each particle then determines its
benchmark data set. Finally, Section 5 concludes the result. movement through the search space by combining some aspects
of the history of its own current and best (best-fitness) locations
with other members of the swarm, with some random perturba-
2. Problem definition and notation
tions. After all particles have been moved, the next iteration takes
place. Ultimately the swarm as a whole, like a flock of birds collec-
Let n be the number of customers, V = {0, 1, 2, . . . , n} the set of
tively foraging for food, is likely to move close to an optimum of
customers and the depot. The depot is identified by 0. Let qi be de-
the fitness function.
mand of customer i e V {0}, and Q denotes the capacity of each
Each particle is composed of three D-dimensional vectors,
vehicle. We assume that, we have at most K vehicles. Also there
where D is the dimensionality of the search space. These are
is a cost cij associated with the sequence from customer i to cus- ! !
including the current position x i , the previous best position p i ,
tomer j. It is also assumed that cij is equivalent measures with !
and the velocity v i .
appropriate adjustments. Furthermore, a cost wk is relevant to !
The current position x i can be considered as a set of coordinates
the activation of vehicle k. The OVRP is to find the minimum num-
describing a point in space. An iteration of the algorithm is consist-
ber of vehicles and the route of each vehicle, such that all customer
ing of evaluating of the current position as a problem solution. If
demands are satisfied, while each customer is visited by exactly
that position is better than the ones found so far, its coordinates
one vehicle, and for each vehicle the capacity is not exceeded. !
are stored in the second vector, p i . The value of the best function
The mathematical formulation of the OVRP requires two groups
result so far is stored in a variable that is called pbesti, for compar-
of variables. The first group models the sequence in which vehicles
ison on later iterations. The objective, of course, is to keep finding
visit customers, and is defined as follows: !
8 better positions and updating p i and pbesti. New points are chosen
! !
< 1 if customer i precedes customer
> by adding v i coordinates to x i , and the algorithm operates by
!
xkij ¼ j visited by vehicle k adjusting v i , which can effectively be seen as a step size (Li, Golden,
>
: & Wasil, 2007; Poli, Kennedy, & Blackwell, 2007).
0 otherwise
Problem 1
The second group denoted by zk is a binary variable defined as
X
K X
n X
n X
K
follows: min cij xkij þ wk zk ð1Þ
k¼1 i¼0 j¼0 k¼1
1 if vehicle k is active
zk ¼ subject to
0 otherwise
K X
X n
Furthermore, a vehicle is considered active when it services at least xkij ¼ 1; 8j ¼ 1; 2; . . . ; n ð2Þ
one customer. With these parameters and variables, the OVRP for- k¼1 i¼0
The objective function in problem (1) models the trade-off be- xkij ¼ 1; 8i ¼ 1; 2; . . . ; n ð3Þ
k¼1 j¼1
tween route and vehicle costs. The first term of (1) reflects the
cost of the routes followed by all vehicles after they depart from xkij 6 zk ; 8k ¼ 1; . . . ; K; 8i ¼ 0; 1; 2; . . . ; n; 8j ¼ 1; 2; . . . ; n ð4Þ
the depot, as well as the cost of the first segment of each route. X n X
n
The second term of (1) reflects the total vehicle acquisition or xkiu xkuj ¼ 0; 8k ¼ 1; 2; . . . ; K; 8u ¼ 1; 2; . . . ; n ð5Þ
i¼0 j¼1
set-up cost. On the other hand, constraints (2) and (3) ensure that X
exactly one vehicle enters and departs from every customer node xkij 6 jSj 1; 8S # V : 1 6 jSj 6 n; 8k ð6Þ
and the depot. Constraint (4) relates the x and z variables, ensur- ði;jÞ2SS
!
ing that all customers are serviced by active vehicles. Constraint X
n X
n
set (5) is the typical flow conservation equation that ensures qj xkij 6 Q; 8k ¼ 1; 2; . . . ; K ð7Þ
j¼1 i¼0
the continuity of each vehicle route. Constraint (6) eliminates
S.A. MirHassani, N. Abolghasemi / Expert Systems with Applications 38 (2011) 11547–11551 11549
X
n
xk0j 6 1; 8k ¼ 1; 2; . . . ; K ð8Þ 3.2. The decoding method
j¼1
!
X
n The particle x i must be decoded to route Ri. The details of this
xki0 ¼ 0; 8k ¼ 1; 2; . . . ; K ð9Þ decoding procedure are described in Algorithm 2.
i¼1
where ns is the total number of particles in the swarm. In this section we describe one-point move which has been
In nbest PSO smaller neighborhoods are defined for each particle. used in the decoding method. In this procedure a customer leaves
The social component reflects information exchanged within the the current position and inserted on the same or different route.
neighborhood of the particle. In this type, the velocity is calculated as The details of this movement are described in Algorithm 3.
v ij ðt þ 1Þ ¼ wv ij ðtÞ þ c1 r1j ðtÞ þ ½pij ðtÞ xij ðtÞ þ c2 r2j ðtÞ½pnij ðtÞ xij ðtÞ
Algorithm 3 (One-point move).
where pnij is the best position found by the neighborhood of particle
i in dimension j. 1. For each node i in the current solution.
The details of the PSO algorithm for solving OVRP are presented 2. For each edge j in the current solution whose one end is in node
below as Algorithm 1. In this algorithm, neighborhoods are formed i’s neighbor list.
on the basis of particle indices. 3. Calculate the savings of inserting node i between edge j if such a
move is feasible. If the savings is greater than zero, store the
Algorithm 1. information of this savings and return to step two.
4. Select the largest saving, then insert node i between the corre-
1. Initialize ns particles with ns dimensions as a swarm (n is the sponding edge.
number of customers), generate the ith particle with random 5. If the vertex set is empty stop, otherwise return to step one.
! ! !
position xi, velocity v i ¼ 0 and personal best p i ¼ x i for
i = 1, . . . , ns. Set iteration t = 1. In this algorithm, we use the neighbor list of a customer. To
!
2. For i = 1, . . . , ns, decode x i ðtÞ to a set of vehicle route Ri. obtain the neighbor list of node i, calculate Euclidean distance
3. For i = 1, . . . , ns, compute the performance measurement of between node i and other nodes, construct a vector in ascending
! !
Ri, and set this as the fitness value of x i , represented by Zðx i Þ. order and select the first h elements of this vector. In this study
! !
4. Update pbest: For i = 1, . . . , ns, update p i ¼ x i , if we set h = 7.
! !
Zðx i Þ < Zðp i Þ.
! !
5. Update gbest: For i = 1, . . . , ns, update pg ¼ p i , if 4. Computational results
! !
Zðp i Þ < Zðpg Þ.
6. Update nbest: For i = 1, . . . , ns, among all pbest from K neigh- In this section, we present the results (solution values and run-
bors of the ith particle, set the personal best which obtains ning times) generated by OVRP algorithm on the test problems.
!
the least fitness value to be pni . First we set the parameters that we use in this algorithm.
7. Update the velocity and the position of each ith particle:
tT
8. wðtÞ ¼ wðTÞ þ 0T ðwð0Þ wðTÞÞ
v ij ðt þ1Þ ¼ wðtÞv ij ðtÞþc1 r1j ðpij xij Þþc2 r2j ðpg j xij Þþc3 r3j ðpnij xij Þ Customer No. 1 2 3 4 5
if v ij ðt þ1Þ < V min ; then v ij ðt þ1Þ ¼ V min if v ij ðt þ1Þ > V max then
v ij ðt þ1Þxij ðt þ1Þ ¼ v ij ðt þ1Þ. demand 2 1 4 3 1
9. If the stopping criterion is met, i.e. t = T, stop. Otherwise,
position 3.2 1.7 7.8 9.5 3.1
t = t + 1 and return to step 2.
! !
10. pg is the best solution which attained so far, Decode pg and
present it as a solution of the OVRP. Fig. 1. Data for the decoding example.
11550 S.A. MirHassani, N. Abolghasemi / Expert Systems with Applications 38 (2011) 11547–11551
Table 2
Table 1 Algorithm performance without neighbor.
Comparison results and optimal solutions. Name Opt. val. Best val. %Dev
Name C V T Opt. Best val. %Dev A-n32-k5 487.306 487.306 0.000
A-n32-k5 32 5 0.82 487.306 487.306 0.000 A-n33-k5 424.543 424.543 0.000
A-n33-k5 33 5 0.89 424.543 424.543 0.000 A-n33-k6 462.433 462.433 0.000
A-n33-k6 33 6 0.90 462.433 462.433 0.000 A-n34-k5 508.173 511.088 0.574
A-n34-k5 34 5 0.92 508.173 508.516 0.067 A-n36-k5 519.455 526.919 1.437
A-n36-k5 36 5 0.88 519.455 519.455 0.000 A-n37-k5 486.243 486.243 0.000
A-n37-k5 37 5 0.81 486.243 486.243 0.000 F-n45-k4 463.896 463.896 0.000
F-n45-k4 45 4 0.90 463.986 463.986 0.000 F-n72-k4 176.999 220.813 24.754
F-n72-k4 72 4 0.96 176.999 177.453 0.256 P-n19-k2 168.569 168.569 0.000
P-n19-k2 19 2 0.97 168.569 168.569 0.000 P-n20-k2 170.278 170.790 0.301
P-n20-k2 20 2 0.97 170.278 170.278 0.000 P-n21-k2 163.877 163.877 0.000
P-n21-k2 21 2 0.93 163.877 163.877 0.000 P-n22-k2 167.191 167.191 0.000
P-n22-k2 22 2 0.96 167.191 167.191 0.000 P-n40-k5 349.552 349.552 0.000
P-n40-k5 40 5 0.88 349.552 349.552 0.000 P-n45-k5 391.809 401.531 2.481
P-n45-k5 45 5 0.92 391.809 391.809 0.000 P-n50-k7 397.376 416.938 4.923
P-n50-k7 50 7 0.91 397.376 407.727 2.605
Table 3
Algorithm performance without one-point move.