You are on page 1of 10

Journal of Manufacturing Systems 30 (2011) 8392

Contents lists available at ScienceDirect

Journal of Manufacturing Systems


journal homepage: www.elsevier.com/locate/jmansys

Technical paper

A new mathematical model for a competitive vehicle routing problem with time
windows solved by simulated annealing
R. Tavakkoli-Moghaddam a , M. Gazanfari b , M. Alinaghian b, , A. Salamatbakhsh c , N. Norouzi c
a
Department of Industrial Engineering, College of Engineering, University of Tehran, Tehran, Iran
b
Department of Industrial Engineering, Iran University of Science and Technology, Tehran, Iran
c
Department of Industrial Engineering, Islamic Azad University Tehran South Branch, Tehran, Iran

a r t i c l e i n f o a b s t r a c t

Article history: This paper presents an extension of a competitive vehicle routing problem with time windows (VRPTW)
Received 8 June 2010 to nd short routes with the minimum travel cost and maximum sale by providing good services to
Received in revised form 8 April 2011 customers before delivering the products by other rival distributors. In distribution of the products with
Accepted 27 April 2011
short life time that customers need special device for keeping them, reaching time to customers inuences
on the sales amount which the classical VRPs are unable to handle these kinds of assumptions. Hence, a
new mathematical model is developed for the proposed problem and for solving the problem, a simulated
Keywords:
annealing (SA) approach is used. Then some small test problems are solved by the SA and the results are
Vehicle routing problem
Competitive situation
compared with obtained results from Lingo 8.0. For large-scale problems, the, Solomons benchmark
Transportation instances with additional assumption are used. The results show that the proposed SA algorithm can nd
Simulated annealing good solutions in reasonable time.
2011 The Society of Manufacturing Engineers. Published by Elsevier Ltd. All rights reserved.

1. Introduction [1012], genetic algorithms (GAs) [12,13], tabu search (TS) [13,14],
ant system [15,16]. Tavakkoli-Moghaddam et al. developed a math-
Transportation has an important role in various domains, such as ematical model for the VRP with backhauls by a memetic algorithm
enterprise, economic and service systems. By this way, researchers [17]. Furthermore, Tavakkoli-Moghaddam et al. [18] presented a
are interested in improving the routes, deleting the unnecessary linear-integer model of a capacitated VRP with the independent
travels and creating the replacement short routes. In addition, route length in order to minimize the heterogeneous eet cost and
many problems, such as traveling salesman problem (TSP), vehi- maximize the capacity utilization. This presented model was solved
cle routing problem (VRP) and the like, are developed by this by a hybrid simulated annealing.
approach. VRPs include problems where eet of vehicles presents The vehicle routing problem with time windows (VRPTW) is an
service from depot to geographically dispersed customers set with extension of the VRP where delivery of goods to each customer
specic demands so that the cost function of transportation is should be occurred in the interval [ai , bi ], in which ai and bi are
minimized. The VRP was formulated mathematically by Dantzig the earliest and the latest allowable times that the service should
and Ramser [1]. Clarke and Wright [2] developed Dantzig and be taken place. The VRPTW is divided in two parts, namely VRP
Ramsers approach by using a saving algorithm. Also, a different with soft time window (VRPSTW) and VRP with hard time win-
approach based on the branch-and-bound algorithm was presented dow (VRPHTW). The VRPSTW is a relaxation of the VRPHTW, in
by Loporte et al. [3]. Christian et al. [4] solved the capacitated which the delivery of goods is allowed outside the time windows if
VRP with stochastic demands by a branch-and-price algorithm. a penalty is paid. However in the VRPHTW, the deviation from the
Since VRPs are categorized as NP-hard problems [5] that no exact time windows constraint is not allowed at all.
algorithm is used to solve them in large sizes due to high computa- Early studies of solution methods for the VRPTW can be found in
tional cost; thus approximate and heuristic algorithms are used in Golden and Assad [19] and Solomon [20]. Ombuki et al. [21] prop-
practice. Thus, many researchers developed heuristics and meta- agated a VRPTW by a Pareto approach, weighted sum and genetic
heuristics, such as local search [6], minimum K-trees [7], adaptive algorithm in such a way the total length and number of the vehicles
memory (AM) [8], column generation [9], simulated annealing (SA) were minimized. Geiger [22] developed a VRPTW for minimizing
the total distance, total deviations from the time window bounds,
number of violations, and number of vehicles by a Pareto approach
and genetic algorithm. An exhaustive review of the VRPHTW can
Corresponding author. be found in [23]. Qureshi et al. [24] presented a new column gen-
E-mail address: alinaghian@iust.ac.ir (M. Alinaghian).

0278-6125/$ see front matter 2011 The Society of Manufacturing Engineers. Published by Elsevier Ltd. All rights reserved.
doi:10.1016/j.jmsy.2011.04.005
84 R. Tavakkoli-Moghaddam et al. / Journal of Manufacturing Systems 30 (2011) 8392

eration based on the exact optimization approach for the VRPSTW. 2. Problem denition
Due to the high complexity level of the VRPTW a tabu search algo-
rithm was proposed by Taillard et al. [25] to solve the VRPSTW. In a competitive environment, it is very important to attend the
The proposed algorithm minimizes the total traveled distance and service time presented to customers in such a way that if the vehicle
total penalty that must be paid for presenting the service delay presents the service to customers later than its rival, it will miss a
outside time windows. Furthermore, Tavakkoli-Moghaddam et al. partial of its sale. For this reason, distributing companies dene the
[26] proposed a multi-criteria vehicle routing problem with con- route of their vehicles based upon other rival companies strategies
sidering soft time windows and their problem is solved by SA. In for serving customers. In other words, sometimes in competitive
addition a comprehensive review of heuristics methods used for situations considering the competition between vehicles is needed.
solving the VRPHTW and the VRPSTW can be found in [27,28]. Due The competition in distribution of products with a short life cycle
to the importance of service times presented by other companies is an example, which customers need a special device for keeping
in real world, distribution companies design the routes of eets them. Therefore reaching time of a distributor to customers inu-
with respect to the condition of other competitors for obtaining ences on the amount of sales. Hence, a model presented in this
the maximum sale. paper is to nd the routing of vehicles in a competitive environ-
This paper proposes a new approach for VRPs, in which the cost ment such that it can be considered as a new version of the VRPTW.
of routes is minimized while the amount of sale is concurrently This problem is proposed under a condition that a competition is
maximized. This approach needs to consider some other parame- between distributors for obtaining more sales and market shares.
ters, such as competition between distributors, deciding factors of Before presenting the model, these parameters are introduced
the customers and service time presented by companies for cus- for clarication of the problem. Let G = (V, A) be a graph, where
tomers where the classical VRP is unable to achieve good solutions V = {v1 , v1 , . . ., vn } is the nodes set and, A = {(vi , vj ): vi , vj V} is the
for these kinds of assumptions. arcs set which each arc (vi , vj ) is associated with a non-negative cost
In this paper, a novel variant of vehicle routing problem with Cij .
time windows is presented that occurs in a competitive environ-
ment. In this situation, it is very important to attend the service time tli lower bound of rivals arrival time to node i
presented to customers in such a way that if the vehicle presents tui upper bound of rivals arrival time to node i
the service to customers later than its rival, it will miss a partial tri rivals arrival time to node i
of its sale. Demand of each customer is divided of two parts, the tdi actual distributers vehicle arrival time to node i
rst part (didi ), does not depend on time and should be sent to the fr (x) probability distribution function of rivals arrival time to node
customer completely, the second part (dtdi ), is time-dependent and i
it would be lost if the rivals arrival time is earlier than vehicles Fr (x) cumulative distribution function of rivals arrival time to node
arrival time to the customer. Therefore distributors reaching time i
to the customers inuences on the amount of sales. dtdi time dependent demand of node i
Since there are no related papers on a competitive approach on dini time independent demand of node i
the VRP in our best knowledge, in this work a new presented model Di maximum number of customers demand in node i
for the VRP with competitive time windows (VRPCTW) is presented E(Di ) Expected coverage of the ith customers demand
that can be considered as a new class of the VRPTW. Despite of
similarities between the classical models of VRPTW with proposed Demand of each customer is divided of two parts, the rst part
model there are several differences that are described as follows: (dini ), does not depend on time and should be sent to the customer
completely, the second part (dtdi ), is time-dependent and it would
be lost if the rivals arrival time is earlier than vehicles arrival time
to the customer. Eq. (1) shows the relation between components of
In the classical models, arriving to the customer earlier than lower the demand.
bound of time windows is not desirable whereas in the new
Di = dini + dtdi (1)
model it is desirable.
In the classical models, arriving to the customer at any time in The problem is solved under the following assumptions:
time window bounds has same desirability, but in the proposed
model, desirability of arriving time from lower bound to upper (1) Each vehicle has a xed capacity.
bound of time windows decrease. (2) Each customer location is serviced from only one vehicle.
In the new model, arriving to the customer after upper bound (3) The total demands of customers must not exceed from the
of time windows makes partial of sale miss, but in the classical capacity of the vehicle.
models total sale is missed or only desirability decrease. (4) Each vehicle has to depart the visited customer and return to
the depot.
(5) A vehicle is allowed to deliver goods before the earliest allow-
able service time windows without missing any sale. Except
It is proven that VRPs belong to the category of NP-hard prob- of the rivals arrival time, all problem parameters (e.g., cus-
lems [5]; therefore the model is solved by simulated annealing (SA) tomers demands and travel time) are assumed to be known
for large-scale problems. For some small cases, the related results with certainty.
of the proposed SA are compared with the results obtained by the
Lingo8 software using a branch-and-bound algorithm. The related Arriving after the latest rivals arrival time, tui , the rst part of
results show the appropriate efciency for solving the problem, demand, Dtdi , will be lost. If the arrival time occurs in the time win-
especially for large sizes. dow, the expected value of the obtained sale before rival reduces
The rest of this paper is organized as follows. Section 2 intro- according to the probability distribution function of the rivals
duces the problem and Section 3 represents the model formulation. arrival time.
The problem-solving methodology is described in Section 4 and The rivals service time distribution to customers can be deter-
the computational results are discussed in Section 5. Finally, the mined by the use of stochastic methods. In this problem, the rivals
conclusion is presented in Section 6. arrival time distribution to customer i is attributed by the uniform
R. Tavakkoli-Moghaddam et al. / Journal of Manufacturing Systems 30 (2011) 8392 85

Cij travel cost (i.e., length of the arc) between customers i and j
W obtained benet of each unit of product
Tv maximum travel time of vehicle v
S = {i|i = 1, . . ., n} collection of nodes

3.2. Decision variables

The decision variables used in the presented model are as fol-


lows:
Fig. 1. Probability of serving node i earlier than the rival.

xijv = 1 If vehicle v travels through route [i , j]
distribution, in which the probability of serving node i before its xijv = 0 Otherwise
rival follows Eq. (2).

p(tri > tdi ) = 1 Fr (tdi ) (2) Oi = 1 If vehicle v visits node i in bound [0 , tli ]
Oi = 0 Otherwise
In this equation, tri is the actual rivals arrival time to node i,
and tdi is the actual vehicle arrival time to node i. In addition, Fr (x)

is introduced as the cumulative distribution function of the rivals qi = 1 If vehicle v visits node i in bound [tli , tui ]
arrival time to node i. So if the rivals arrival time to customers qi = 0 Otherwise
follows the uniform distribution, then the density function based
on the uniform distribution, f(x), of reaching the vehicle to customer 
i earlier than its rival is illustrated in Fig. 1. yi = 1 If vehicle v visits node i in bound [0 , tui ]
Now, the probability of reaching to customer i earlier than its yi = 0 Otherwise
rival in time of tdi is computed by:
 
1 if tdi tli zi = 1 If vehicle v visits node i after tui
p(tdi ) = 1 Fr (tdi ) if tli tdi tui (3) zi = 0 Otherwise
0 if tdi tui
Because of this equation, if the vehicle reaches to node i in the tdi Actual vehicle arrival time to node i
interval [0, tli ], then it will reach to the customer earlier than its rival
denitely. However, if the vehicle reaches to node i in the interval Now, the problem can be mathematically formulated as follows:
 n 
[tli , tui ], then with the probability of p(tdi ) 1 Fr (tdi ), it will service 
n 
n

nv
 t t  
ui di
node i earlier than its rival. Finally, if the vehicle reaches to node min Cij xijv W Oi dtdi + qi dtdi
i after tu , it will reach to node i with the probability of p(tdi ) = 0 tui tli
i=1 j=1 v=1 i=1
earlier than its rival. In this case, the customers time dependent (5)
demand is affected to service time presented, while if a rival dis-
tributor reaches to node i earlier, this part of the demand will be
missed. Therefore, the expected value of the customers demand is s.t.
computed by: 
nv
n
 xijv = 1, j = 2, ..., n (6)
Di if tdi tli
E(Di ) = dini + [1 Fr (tdi )]dtdi if tli tdi tui (4) i=1 v=1

didi if tdi tui 


n 
nv

Therefore due to this equation, if the vehicle reaches to customer xijv = 1, i = 2, ..., n (7)
i in time before tli , then it obtains the entire sale and satisfying all j=1 v=1
the demand; otherwise, it only will deliver dini to the customer.

n

n
v
xip v = 0,
xpi p = 1, 2, ..., n, v = 1, 2, ..., nv (8)
3. Model formulation
i=1 i=1

Let G = (V, A) be a graph, where V = {v1 , v1 , . . ., vn } is the nodes 


n

n 
n

n

set, and A = {(vi , vj ): vi , vj V} is the arcs set where each arc (vi , vj ) tiv xijv + tijv xijv Tv , v = 1, 2, ..., nv (9)
is associated with a non-negative cost Cij . Followings are a number i=1 j=1 i=1 j=1
of parameters used in the presented mathematical model.

n

nv 
n

nv
tdj = tdi xijv + (tiv + tijv )xijv , j = 2, ..., n (10)
3.1. Parameters
i=1 v=1 i=1 v=1

n number of nodes (i.e., customers) 


n

n
Di number of demands in node i (i = 1, . . ., n) (Di dtdi zi ) xijv Kv , v = 1, 2, ..., nv (11)
Dini time independent demand of customer i i=2 j=1
Dtdi time dependent demand of customer i
nv total number of vehicles (tui tdi ) M(yi ) 0, i = 1, 2, ..., n (12)
Kv capacity of vehicle v.
tiv required time for servicing the customer (node) i by vehicle v (tui tdi ) + M(zi ) 0, i = 1, 2, ..., n (13)
tijv required time for traveling between customers i and j by vehicle
v
M arbitrary large number, say M > > zi + yi = 1, i = 1, 2, ..., n (14)
86 R. Tavakkoli-Moghaddam et al. / Journal of Manufacturing Systems 30 (2011) 8392

In the rst mode, the arriving time to the customer is smaller


than tui , so (tui tdi ) 0 and according to the constraints (12)(14)
(tui tdi ) + M(1 qi ) 0, i = 1, 2, ..., n (15) the value of yi and zi are 1 and 0 respectively. These values cause
carrying all demands of customers according to Constraint (11).
(tli tdi ) + M(1 Oi ) 0, i = 1, 2, ..., n (16) In the second mode, the arriving time to the customer is larger
than tui , so (tui tdi ) 0 and according to the constraints (12)(14)
(tli ti ) M(i ) 0, i = 1, 2, ..., n (17) the value of yi and zi are 0 and 1 respectively. These values cause
qi + i = 1, i = 1, 2, ..., n (18) carrying only time independent demand of customer according to
Constraint (11).
 n
xiv = 1, v = 1, 2, ..., nv (19) Paraphrase 3. The second term of the objective function, which
1
i=2 maximizes the sale in a rival situation, is as follows:

nv 
n 

 t   [q t ]  
xijv S r(S) S A {1}, S =
/  (20) oi dtdi + qi ui
i di
dtdi (22)
tui tli tui tli
v=1 j S j/
S i=1

xij , Oi , yi , zi , qi , i [0, 1], ti 0, t1 = 0 (21) where qi tdi changes the second term of the objective function to
In this formulation, the objective function (5) minimizes the a nonlinear function. In order to linearize this term, i is substi-
total travel cost and maximizes expected value of obtained prot tuted with qi tdi and two new constrains are added to the problem.
as well. Constraints (6) and (7) ensure that each customer loca- Therefore, the second objective function is determined by:
tion is serviced from only one vehicle. Constraint (8) states that if N 
   t   i
 
a vehicle arrives at a node (i.e., customer location), it must leave ui
z2 = oi dtdi + qi dtdi (23)
it and by this way the route continuity is ensured. Constraint (9) tui tli tui tli
i=1
ensures that the sum of the required time for servicing customer i
and the required time for traveling between customers i and j do i Mqi , i = 2, ..., n
not have to exceed from the maximum time, in which vehicle v can i tdi , i = 2, ..., n (24)
be used. Also, Constraint (10) states the time for reaching to the jth i tdi M(1 qi ), i = 2, ..., n
customer. Constraints (11)(14) impose that if vehicle v reaches to
customer i earlier than time tui , it must carry all of the customers
4. Problem-solving approach
demand; otherwise, it carries only dini for customer. It is because
that if the vehicle reaches to the customer earlier than time tui , it is
The problem-solving methodology based on the simulated
possible to reach to the customer earlier than its rival and deliver
annealing (SA) algorithm is presented in this section. A decoding
dtdi to the customer. However after tui , dtdi is not carried to the cus-
method and an initial solution generation are also discussed. Then
tomer denitely. Constraints (15)(18) are related to that part of the
some of the neighborhood search methods for improving solutions
objective function maximizing the amount of sale. Constraint (19)
are proposed.
warrantee that a depot is the rst and nal destination of each vehi-
cle. Constraint (20) eliminates the sub-tours and nally, Constraint
(21) denes variables of model. 4.1. Simulated annealing

Paraphrase 1. In this paraphrase, the explanation of the second Simulated annealing (SA) is a stochastic relaxation technique
objective function and the related constraints is described. Con- that has its origin in statistical mechanics. The SA methodology
sidering the time period of rivals arrival time and vehicle arrival draws its analogy from the annealing process of solids. In the
time, three modes are possible:Vehicles arrival time is less than annealing process, a solid is heated to a high temperature and grad-
the lower bound of rivals arrival time: in this situation total time ually is cooled to crystallize. As the heating process allows atoms
dependent demands of customer is satised and also (tui ti ) 0, to move randomly, if the cooling is done too slowly, it gives atoms
(tli ti ) 0. According to Eqs. (15)(18) binary variables Oi , qi and enough time to align themselves in order to reach a minimum
 i are free, 1 and 0 in value respectively, but because of the objec- energy state, namely stability or equilibrium. This analogy can be
tive functions tendency to increase term oi dtdi , binary variable used in combinatorial optimization problems, in which the state of
Oi is one.Vehicles arrival time is between the lower bound and solid is corresponding to the feasible solution, the energy at each
the upper bound of rivals arrival time: in this mode (tui ti ) 0, state is corresponding to the improvement in the objective function
(tli ti ) 0 and according to Eqs. (15)(18) binary variables Oi is and the minimum energy state is the optimal solution.
0 and qi and  i are free in value, but because of existent term SA uses a stochastic approach to direct the search. It allows the
qi ((tui ti )/(tui tli ))dtdi in the objective function, binary variable qi search to proceed to a neighboring state even if the move causes the
is 1 and  i is 0.Vehicles arrival time is larger than the upper bound value of the objective function to become worse. It guides the origi-
of rivals arrival time: nal local search method in the following way. If a move to a neighbor
In this case probability to provide a time-dependent customer X
in the neighborhood N(X) decreases the objective function value,
demand does not exist and terms (tui ti ) < 0 and (tli ti ) < 0 are or leaves it unchanged, then the move is always accepted. More
negative in values, so the both values of Oi and qi are 0 and the precisely, the solution X
is accepted as the new current solution if
value of  i is 1.  0, where  = C(X
) C(X) and C(X) is the value of the objective
Paraphrase 2. As mentioned before, the strategy of carrying the function. Moves, which increase the objective function value, are
demand of customer is that if vehicle v reaches to customer i earlier accepted with a probability of e(/T) to allow the search to escape a
than time tui , it must carry all of the customers demand; otherwise, local optimum, where T is a parameter named as temperature. The
it carries only dini for customer. Therefore to apply this strategy the value of T varies from a relatively large value to a small value close
related constraints (11)(14), to the maximum capacity of vehicles to zero. These values are controlled by a cooling schedule that spec-
are added to the model. There are two modes for arriving time of ies the initial and incremental temperature values at each stage
vehicle to the customer. of the algorithm [18].
R. Tavakkoli-Moghaddam et al. / Journal of Manufacturing Systems 30 (2011) 8392 87

Fig. 4. Sequence of customers in their routes by vehicles.

4.2. Representation and decoding method

This section presents a decoding method for the representation


of a solution. The solution representation of the given problem with
n customers consists of n dimensional particles. The particles rep-
resentation consist of n numbers in the bound (0, m + 1 ]. The
integer part of each dimension represents the vehicle that serves
Fig. 2. Pseudocode of the proposed SA. the nodes. Thus, the same integer parts represent the same vehi-
cle for serving the customers. The fractional part represents the
sequence of the customer in the route. In other words, it shows pri-
ority of serving by the vehicle. The decoding method is based on
4.1.1. Simulated annealing implementation
the following steps:
The parameters of the proposed SA are as follows:

Step (1) For each customer (i.e., customer i where i = 1, . . ., n),


R number of iterations repeat Step 2.
EL epoch length indicating the number of the accepted solutions Step (2) Fill all the dimension of representation with numbers
in each temperature to achieve the equilibrium in the bound (0, m + 1 ]. The ith dimension represents the ith
T0 initial temperature node. Allocate customer i to vehicle k if the integer part of the ith
A rate of the current temperature decrease (i.e., cooling schedule) dimension of representation is k.
X feasible solution Step (3) Sort the allocated customers of each vehicle according to
C(X) objective function value for X the fractional part of the related dimension of customers.
N counter for the number of the accepted solutions in each tem-
perature
For example, suppose that 7 nodes and 3 vehicles are available. A
IR counter for the number of iterations
simple representation is shown in Fig. 3. In this example, customers
7 and 2 are allocated to vehicle 1. The sequence of visiting customers
The main steps of the SA algorithm are shown in Fig. 2. is shown in Fig. 4.

Fig. 3. Example of a problem representation and decoding.


88 R. Tavakkoli-Moghaddam et al. / Journal of Manufacturing Systems 30 (2011) 8392

Fig. 5. 2-Opt exchange operation.

4.3. Initial solution generation To set T0 , an initial solution is rst generated and then 20 neigh-
bors of the initial solution are found. Finally, the objective functions
To generate initial solutions, which is the rst step in any meta- of them are calculated. fmin and fmax are set for the minimum
heuristic approach, a creative approach is applied as follows: and maximum changes on the objective function obtained from
neighbors, respectively. T0 is set based on Eq. (25):
(1) Sort the customers according to tli none descending. fmin + 0.1(fmax fmin ) (25)
(2) Allocate the rst customer (i.e., r1 ) to the rst vehicle (i.e., v1 ).
(3) Allocate the second customer (r2 ) to the current vehicle (v1 ) if 5. Computational results
its distance to depot is more than the rst customer allocated
(r1 ). It is necessary to consider the limitation of the capacity and Computational results are shown in small and large-scale cases
travel time of the vehicle. for the model verication and the SA results, respectively. For the
(4) Repeat the following steps for the reminding customers till all model verication, 10 test problems in small sizes are solved by
customers are serviced by all vehicles. the Lingo 8.0 software. The coordination of nodes is generated
(5) Select the sequence of the reminding customers. randomly in the uniform distribution [0,100] and the customers
(6) Estimate the new customers distance with the last customer demand is generated randomly in the uniform distribution [0,10].
allocated of each route and depot as well. Allocate the customer The total vehicles capacity is considered as to 1.2 times of the total
to that route where the minimum distance is achieved while demands of customers. To determine the time windows bound-
the capacity of vehicles and the travel time limitations are not aries, the given problem is solved without considering customers
violated. time windows boundaries the maximum travel time of vehicles is
considered as U. then the value of time windows boundaries are
4.4. Local search methods calculated in a = Rand (0, U U/n) and b = a + U/n for each customer
where a and b are the lower and upper bounds of time windows,
After generating initial solutions, one of the following steps is respectively. Also, all the solution procedures are coded in the MAT-
repeated for improving the initial solution. LAB7 program and all the test problems are run using the Intel Dual
Core, 2.5 GHz compiler and 1 GB of RAM.
4.4.1. 2-Opt exchange operator The comparison of Lingo with the proposed algorithm shows
The 2-opt operator improves single route. It exchanges the route that our proposed algorithm can obtain approximately an optimal
direction between two consecutive nodes. If the cost function of the solution in less time than Lingo as shown in Table 2. The average
route has been improved, then the modied route is kept; other- gap between the optimal and the SA solutions is 1.288% showing
wise, the route returns to the last condition. The 2-opt exchange the efciency of the proposed SA. Furthermore, increasing the size
operation is shown in Fig. 5, in which the edge (i, i + 1) and (j, of the problem increases the solution time of Lingo exponentially
j + 1) are replaced by edge (i, j) and (i + 1, j + 1), thus reversing the while it does not tangible effect on the solution time of the proposed
direction of customers between i + 1 and j. algorithm.
To evaluate the proposed SA on large-scale problems, it is tested
on a set of 56 Solomons test cases [29]. In these problems and for
4.4.2. Insertion method
all of the test problems in the original data, there are 100 customers
Select a route at random, then select as the max [0.1 (length
that are divided into six sets of R1, R2, C1, C2, RC1 and RC2. In sets of
of the route), 2] nodes in each route, and change the integer num-
R1 and R2, the customer locations, demands and time windows are
ber of selected nodes in the bound of [0, m] randomly to change
randomly and uniformly distributed; however, they are clustered in
the vehicle that services the selected node. In other words, a node
sets C1 and C2. Sets RC1 and RC2 display a combination of uniformly
is departed from one route and it is added to another route using
distributed and their clusters.
insertion heuristics. A new insertion is accepted if the vehicle capac-
Because of the difference between the given problem (VRPCTW)
ity and maximum time, in which vehicle v can be used, are not
and the classical VRPTW, some assumptions are inserted into the
violated.
Solomons test problems for adjusting the standard test problems
with the given problem. Hence, all of the customers demands
4.5. Parameter setting are considered as time dependent demands. Also, in the classical

The performance of any meta-heuristic algorithm is usually sen-


Table 1
sitive to the settings of the parameters that inuence its search SA parameters.
behavior. In this section, the parameters for the proposed meta-
SA parameter settings
heuristics are explained and introduced experimentally according
to Table 1. In this table, a is the cooling rate, EL is the number of No. of iterations 100, 200, 500
the accepted solution in each temperature for achieving the equi- a 0.99
EL 50
librium, and T0 represents the initial temperature.
R. Tavakkoli-Moghaddam et al. / Journal of Manufacturing Systems 30 (2011) 8392 89

Table 2
Results in small-sized problems.

No. of problems No. of customers nv Lingo 8 SA (200 iterations)

Best solution Time (s) Best solution Time (s) Gap (%)

1 8 2 17.71 12 17.71 12.528 0.000


2 8 2 22.40 12 22.40 13.188 0.000
3 8 3 15.68 78 15.96 15.081 1.754
4 10 2 22.26 127 22.26 14.781 0.000
5 10 3 29.37 320 29.68 15.016 1.082
6 10 4 21.11 430 21.45 16.494 1.619
7 12 2 24.78 489 25.32 17.543 2.196
8 12 2 29.04 542 29.40 15.467 1.237
9 12 3 28.20 1245 28.85 18.769 2.288
10 12 4 27.08 2530 27.81 18.653 2.708

Average 23.763 578.5 24.084 15.752 1.288

Table 3
Comparison of the performance of the proposed SA algorithm for a set of C.

Problem nv 100 iterations 200 iterations 500 iterations

Best solution Time (s) Gap (%) Best solution Time (s) Gap (%) Best solution Time (s)

C101 10 34.83 253.67 3.2 34.01 756.57 0.8 33.74 1373.37


C102 10 78.14 320.71 58.1 65.35 649.36 32.2 49.41 1066.51
C103 10 89.65 225.56 76.7 69.13 506.18 36.3 50.73 1292.34
C104 10 93.31 291.24 50.0 80.24 626.01 28.9 62.23 1051.22
C105 10 37.35 214.26 4.8 35.80 534.22 4.8 35.65 1055.68
C106 10 33.57 225.32 0.1 34.59 628.06 3.1 33.56 1497.61
C107 10 39.88 213.77 4.1 39.03 544.60 1.9 38.30 1000.58
C108 10 50.67 228.82 32.6 43.79 476.25 14.6 38.21 938.61
C109 10 54.47 221.55 47.3 40.40 532.90 9.3 36.97 1127.72
C201 3 24.49 320.56 1.5 24.31 814.36 0.7 24.14 1786.14
C202 3 67.23 337.71 39.4 51.76 788.76 7.3 48.22 1688.32
C203 3 69.19 349.91 59.8 62.89 840.94 45.2 43.31 1909.99
C204 3 81.02 362.07 55.1 73.20 886.64 40.1 52.25 1817.24
C205 3 24.90 354.64 2.8 24.46 746.88 1.0 24.23 1785.99
C206 3 25.69 345.12 3.1 25.08 745.45 0.6 24.92 1766.83
C207 3 25.48 334.64 4.8 24.97 679.57 2.7 24.31 1761.36
C208 3 25.58 355.16 5.4 24.34 689.22 0.3 24.27 1760.13

Average 50.32 291.45 26.4 44.32 673.29 13.3 37.91 1451.74

Table 4
Comparison of the performance of the proposed SA algorithm for a set of R.

Problem nv 100 iterations 200 iterations 500 iterations

Best solution Time (s) Gap (%) Best solution Time (s) Gap (%) Best solution Time (s)

R101 19 69.92 51.96 18.7 62.24 90.23 5.7 58.90 349.09


R102 17 68.57 46.23 24.3 69.05 89.48 25.2 55.17 326.19
R103 13 119.96 49.48 55.5 104.85 96.13 35.9 77.14 319.03
R104 10 171.43 62.20 46.1 145.24 120.46 23.8 117.31 356.37
R105 14 49.61 44.90 7.6 49.34 98.16 7.0 46.11 242.26
R106 12 98.36 51.33 54.0 97.78 84.84 53.1 63.87 309.63
R107 10 124.76 59.56 47.3 102.60 109.59 21.2 84.67 283.68
R108 9 167.07 63.97 59.4 148.21 120.40 41.5 104.78 737.77
R109 11 48.08 48.54 13.4 45.75 102.37 7.9 42.40 438.31
R110 10 47.49 54.33 6.4 44.76 107.88 0.3 44.62 514.65
R111 10 56.88 53.39 40.9 48.88 115.26 21.1 40.37 508.49
R112 9 50.31 57.57 22.4 44.64 118.61 8.6 41.10 712.90
R201 4 46.61 152.85 39.9 37.23 325.59 11.8 33.31 692.93
R202 3 68.08 351.28 68.2 64.68 784.42 59.8 40.48 1901.95
R203 2 87.81 389.05 52.7 75.27 888.67 30.9 57.50 1660.74
R204 3 129.73 1173.53 74.6 99.01 2453.90 33.2 74.32 5522.43
R205 3 52.17 342.97 56.8 40.65 770.71 22.2 33.27 1899.95
R206 3 69.86 368.53 66.7 52.06 930.32 24.2 41.90 1691.04
R207 2 103.13 1193.48 71.9 79.91 2411.69 33.2 60.01 5384.14
R208 3 134.83 1111.53 69.4 114.32 2510.75 43.6 79.59 5612.23
R209 3 44.61 358.55 33.0 41.85 741.87 24.8 33.53 1791.94
R210 3 49.44 365.44 53.6 43.69 730.40 35.8 32.18 1868.25
R211 2 59.02 1599.35 59.9 49.60 2598.85 34.4 36.92 5515.25

Average 83.38 350.00 45.3 72.24 713.07 26.3 56.50 1679.97


90 R. Tavakkoli-Moghaddam et al. / Journal of Manufacturing Systems 30 (2011) 8392

Table 5
Comparison of the performance of the proposed SA algorithm for a set of RC.

Problem nv 100 iterations 200 iterations 500 iterations

Best solution Time (s) Gap (%) Best solution Time (s) Gap (%) Best solution Time (s)

RC101 14 63.24 95.72 10.3 59.94 208.69 4.5 57.34 300.41


RC102 12 117.86 232.49 28.4 95.43 326.71 4.0 91.77 408.58
RC103 11 158.38 178.91 35.1 134.88 433.66 15.1 117.21 508.68
RC104 10 211.79 247.03 44.9 163.53 557.77 11.9 146.11 562.94
RC105 13 56.76 120.26 11.7 51.30 202.61 0.9 50.82 370.16
RC106 11 61.31 173.38 15.1 54.35 304.10 2.1 53.25 493.11
RC107 11 65.28 172.94 23.7 54.83 317.27 3.9 52.78 542.65
RC108 10 55.75 233.54 12.2 52.40 426.42 5.5 49.69 277.23
RC201 4 48.14 181.37 35.5 39.99 383.54 12.5 35.54 940.65
RC202 3 92.68 404.86 57.4 72.52 729.11 23.1 58.89 1867.27
RC203 3 111.23 382.96 46.8 97.61 747.02 28.9 75.74 1786.43
RC204 3 135.58 371.83 47.4 116.32 719.33 26.5 91.96 2000.79
RC205 4 49.93 177.45 55.4 39.78 364.43 23.8 32.12 984.50
RC206 3 62.84 359.15 81.2 51.67 806.13 49.0 34.68 1623.57
RC207 3 51.12 357.09 26.1 47.50 748.87 17.2 40.53 1858.59
RC208 3 54.46 358.92 42.1 43.05 717.19 12.3 38.33 1915.30

Average 87.27 252.99 35.8 73.44 499.55 15.1 64.17 1027.55

Fig. 6. Quality vs iteration.

VRPTW, two considered objectives are to minimize the number of


vehicles and the travel distance. However, in our presented prob-
lem, minimizing the number of the vehicles is not the problem
Fig. 7. Convergence rate for Problem C108.
objective. Hence, the number of vehicles of the test problems is set
with the best solution reported in the literature that can be found
at: http://www.crt.umontreal.ca/cordeau/tabu/.
The average gaps of the proposed SA algorithm for three sets
The objective function is presented in two terms. The rst term
of problems C, R and RC in 100 iterations are 26.4, 45.3 and 35.8%,
minimizes the total travel cost and the second one maximizes the
respectively. In addition, the average gaps of the SA algorithm for
sale in a rival situation. In each test problem, two objective func-
these sets of problems in 200 iterations are 13.3%, 26.3% and 15.1%,
tions are changed into one objective function by weighting to each
respectively. In the set of RC, the coverage speed to a good solu-
term. The weights of two terms are considered 1 and 5, respec-
tion is faster than other sets. The best results are obtained for 500
tively.
iterations in all the sets. The relative gap for 500 iterations are zero,
To evaluate the quality of the solutions, the relative gap (RG)
because the best solutions obtained within 500 iterations are much
between the best solution (BR) obtained from the proposed SA
better than the best solutions obtained for 100 and 200 iterations.
with the maximum iterations and the best solution (RA) of the pro-
Thus, there is no need to illustrate the Gap column for 500 itera-
posed SA within other iterations for each test problem is computed
tions. The relative gaps for 100 and 200 iterations are computed
by:
according to the comparisons results with 500 iterations. Fig. 6
shows the convergence rate of the proposed algorithm in different
RA BR
RG = 100 sets. The algorithm run time is acceptable for solving test prob-
BR
lems and the maximum run time in 100, 200 and 500 iterations
To evaluate the solution quality versus the run time of the are 1599.35 and 2598.85 and 5612.23, respectively for Problem
algorithm, each test problem is solved for R = 100, 200 and 500 R211.
iterations. Also, convergence rate for Problem C108 is shown in Fig. 7. The
Tables 35 compare the performance produced by the proposed percentage of the improved result from 100 iterations to 200% iter-
SA in the set of C1, C2, R1, R2, RC1 and RC2 for 100, 200 and ations is 15.7%. Finally, the problem is solved for Problem C108 with
500 iterations. In this table, nv is the number of the considered 100, 200 and 500 iterations, and a schematic route is also shown in
vehicles. Fig. 8.
R. Tavakkoli-Moghaddam et al. / Journal of Manufacturing Systems 30 (2011) 8392 91

by the proposed simulated annealing (SA) have been very efcient


approaching to the optimal solution. For small sizes, the average
gap between the proposed SA and Lingo solutions has been equal
to 1.288% showing an acceptable result. The proposed SA has been
used for solving the presented model for large-scale instances.
These solutions have shown that the presented model has been
veried and the proposed SA has considered as a suitable approach
to obtain high quality solutions with reasonably computational cost
and time.

Acknowledgement

The rst author is grateful for the partially nancial sup-


port from the University of Tehran under the research Grant No.
8106043/1/14.

References

[1] Dantzig G, Ramser JH. The truck dispatching problem. Management Science
1959;6:8091.
[2] Clarke G, Wright JW. Scheduling of vehicles from a central depot to a number
of delivery points. Operations Research 1964;12:56889.
[3] Laporte G, Mercure H, Nobert Y. A branch and bound algorithm for a class
of asymmetrical vehicle routing problems. Journal of Operational Research
Society 1992;43:46981.
[4] Christian HC, Lysgaard J. A branch-and-price algorithm for the capacitated
vehicle routing problem with stochastic demands. Operations Research Letters
2007;35(6):77381.
[5] Lenstra JK, Rinnooy Kan AHG. Complexity of vehicle routing and scheduling
problems. Networks 1981;11:2217.
[6] Zachariadis EE, Kiranoudis CT. A strategy for reducing the computational
complexity of local search-based methods for the vehicle routing problem.
Computers & Operations Research 2010;37(12):2089105.
[7] Fisher ML. Optimal solution of vehicle routing problems using minimum K-
trees. Operations Research 1994;42:62642.
[8] Golden B, Laporte G, Taillard E. An adaptive memory heuristic for a class of
vehicle routing problems with minmax objective. Computers and Operations
Research 1999;24:44552.
[9] Taillard ED. A heuristic column generation method for the heterogeneous eet
VRP. Rairo OR 1999;33(1):114.
[10] Chiang WC, Russell R. Simulated annealing meta-heuristics for the vehicle
routing problem with time windows. Annals of Operations Research 1996;93:
327.
[11] Koulamas C, Antony S, Jaen R. A survey of simulated annealing applications to
operations research problems. Omega 1994;22(1):4156.
[12] Thangiah SR, Osman IH, Sun T, Hybrid genetic algorithm, simulated annealing
and tabu search methods for vehicle routing problems with time windows,
Technical Report 27, Computer Science Department, Slippery Rock University;
1994.
[13] Gendreau M, Hertz A, Laporte G. A tabu search heuristic for the vehicle routing
problem. Management Science 1994;40:127690.
[14] Gendreau M, Laporte G, Musaraganyi C, Taillard ED. A tabu search heuristic for
the heterogeneous eet vehicle routing problem. Computers and Operations
Research 1999;26:115373.
[15] Yu B, Yang Z-Z, Yao B. An improved ant colony optimization for vehicle routing
problem. European Journal of Operational Research 2009;196(1):1716.
[16] Gajpal Y, Abad P. An ant colony system (ACS) for vehicle routing problem
with simultaneous delivery and pickup. Computers and Operations Research
2009;36(12):321523.
[17] Tavakkoli-Moghaddam R, Saremi AR, Ziaee MS. A memetic algorithm for a vehi-
Fig. 8. Schematic routes for Problem C108 with 100, 200 and 500 iterations.
cle routing problem with backhauls. Applied Mathematics and Computation
2006;181:104960.
[18] Tavakkoli-Moghaddam R, Safaei N, Gholipour Y. A hybrid simulated annealing
for capacitated vehicle routing problems with the independent route length.
6. Conclusion Applied Mathematics and Computation 2006;176:44554.
[19] Golden BL, Assad AA, editors. Vehicle routing: methods and studies. Amster-
This paper has presented a special type of the vehicle routing dam, The Netherlands: Elsevier; 1988.
[20] Solomon MM. On the worst-case performance of some heuristics for the vehi-
problem with time windows (VRPTW), in which a competition
cle routing and scheduling problem with time window constraints. Networks
exists between distributors. In distribution of the products with 1986;16:16174.
short life time that customers need special device for keeping them, [21] Ombuki B, Ross BJ, Hanshar F. Multi-objective genetic algorithm for vehicle
reaching time to customers inuences on the sales amount which routing problem with time windows. Applied Intelligence 2006;24:1730.
[22] Geiger MJ. Multi-criteria und Fuzzy Systeme in Theorie und Praxis. In: A com-
the classical VRPs are unable to handle these kinds of assumptions. putational study of genetic crossover operators for multi-objective vehicle
In addition, a new mathematical model related to this problem routing problem with soft time windows. Deutscher Universities-Verlag; 2003.
has been presented to nd the short routes with the minimum p. 191207.
[23] Cordeau JF, Desaulniers G, Desrosiers J, Solomon MM, Soumis F, The VRP with
travel cost of eet, traveled distances and maximum sale for a com- time windows. In: Toth P, Vigo D, editors. The vehicle routing problem, SIAM
pany. To verify the solution technique, 10 test problems have been Monographs on Discrete Mathematics and Applications, Vol. 9, Philadelphia,
solved by the Lingo 8.0 software and the related results obtained PA; 2002. p. 157194.
92 R. Tavakkoli-Moghaddam et al. / Journal of Manufacturing Systems 30 (2011) 8392

[24] Qureshi AG, Taniguchi E, Yamada T. An exact solution approach for vehi- [27] Braysy O, Gendreau M. Vehicle routing problem with time windows, part
cle routing and scheduling problems with soft time windows. Transportation I: route construction and local search algorithms. Transportation Science
ResearchPart E 2009;45:96077. 2005;39:10418.
[25] Taillard E, Badeau P, Guertin F, Gendreau M, Potvin J. A tabu search heuristic for [28] Solomon MM, Desrosiers J. Time window constrained routing and scheduling
the vehicle routing problem with soft time windows. Transportation Science problems. Transportation Science 1988;22(1):113.
1997;31:17086. [29] Solomon MM. Algorithms for the vehicle routing and scheduling prob-
[26] Tavakkoli-Moghaddam R, Safaei N, Shariat MA. A multi-criteria vehicle routing lem with time windows constraints. Operations Research 1987;35:254
problem with soft time windows by simulated annealing. Journal of Industrial 65.
EngineeringInternational 2005;1(1):2836.