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
b
c

Department of Industrial Engineering, College of Engineering, University of Tehran, Tehran, Iran


Department of Industrial Engineering, Iran University of Science and Technology, Tehran, Iran
Department of Industrial Engineering, Islamic Azad University Tehran South Branch, Tehran, Iran

a r t i c l e

i n f o

Article history:
Received 8 June 2010
Received in revised form 8 April 2011
Accepted 27 April 2011

Keywords:
Vehicle routing problem
Competitive situation
Transportation
Simulated annealing

a b s t r a c t
This paper presents an extension of a competitive vehicle routing problem with time windows (VRPTW)
to nd short routes with the minimum travel cost and maximum sale by providing good services to
customers before delivering the products by other rival distributors. In distribution of the products with
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
annealing (SA) approach is used. Then some small test problems are solved by the SA and the results are
compared with obtained results from Lingo 8.0. For large-scale problems, the, Solomons benchmark
instances with additional assumption are used. The results show that the proposed SA algorithm can nd
good solutions in reasonable time.
2011 The Society of Manufacturing Engineers. Published by Elsevier Ltd. All rights reserved.

1. Introduction
Transportation has an important role in various domains, such as
enterprise, economic and service systems. By this way, researchers
are interested in improving the routes, deleting the unnecessary
travels and creating the replacement short routes. In addition,
many problems, such as traveling salesman problem (TSP), vehicle routing problem (VRP) and the like, are developed by this
approach. VRPs include problems where eet of vehicles presents
service from depot to geographically dispersed customers set with
specic demands so that the cost function of transportation is
minimized. The VRP was formulated mathematically by Dantzig
and Ramser [1]. Clarke and Wright [2] developed Dantzig and
Ramsers approach by using a saving algorithm. Also, a different
approach based on the branch-and-bound algorithm was presented
by Loporte et al. [3]. Christian et al. [4] solved the capacitated
VRP with stochastic demands by a branch-and-price algorithm.
Since VRPs are categorized as NP-hard problems [5] that no exact
algorithm is used to solve them in large sizes due to high computational cost; thus approximate and heuristic algorithms are used in
practice. Thus, many researchers developed heuristics and metaheuristics, such as local search [6], minimum K-trees [7], adaptive
memory (AM) [8], column generation [9], simulated annealing (SA)

Corresponding author.
E-mail address: alinaghian@iust.ac.ir (M. Alinaghian).

[1012], genetic algorithms (GAs) [12,13], tabu search (TS) [13,14],


ant system [15,16]. Tavakkoli-Moghaddam et al. developed a mathematical model for the VRP with backhauls by a memetic algorithm
[17]. Furthermore, Tavakkoli-Moghaddam et al. [18] presented a
linear-integer model of a capacitated VRP with the independent
route length in order to minimize the heterogeneous eet cost and
maximize the capacity utilization. This presented model was solved
by a hybrid simulated annealing.
The vehicle routing problem with time windows (VRPTW) is an
extension of the VRP where delivery of goods to each customer
should be occurred in the interval [ai , bi ], in which ai and bi are
the earliest and the latest allowable times that the service should
be taken place. The VRPTW is divided in two parts, namely VRP
with soft time window (VRPSTW) and VRP with hard time window (VRPHTW). The VRPSTW is a relaxation of the VRPHTW, in
which the delivery of goods is allowed outside the time windows if
a penalty is paid. However in the VRPHTW, the deviation from the
time windows constraint is not allowed at all.
Early studies of solution methods for the VRPTW can be found in
Golden and Assad [19] and Solomon [20]. Ombuki et al. [21] propagated a VRPTW by a Pareto approach, weighted sum and genetic
algorithm in such a way the total length and number of the vehicles
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
be found in [23]. Qureshi et al. [24] presented a new column gen-

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.


Due to the high complexity level of the VRPTW a tabu search algorithm was proposed by Taillard et al. [25] to solve the VRPSTW.
The proposed algorithm minimizes the total traveled distance and
total penalty that must be paid for presenting the service delay
outside time windows. Furthermore, Tavakkoli-Moghaddam et al.
[26] proposed a multi-criteria vehicle routing problem with considering soft time windows and their problem is solved by SA. In
addition a comprehensive review of heuristics methods used for
solving the VRPHTW and the VRPSTW can be found in [27,28]. Due
to the importance of service times presented by other companies
in real world, distribution companies design the routes of eets
with respect to the condition of other competitors for obtaining
the maximum sale.
This paper proposes a new approach for VRPs, in which the cost
of routes is minimized while the amount of sale is concurrently
maximized. This approach needs to consider some other parameters, such as competition between distributors, deciding factors of
the customers and service time presented by companies for customers where the classical VRP is unable to achieve good solutions
for these kinds of assumptions.
In this paper, a novel variant of vehicle routing problem with
time windows is presented that occurs in a competitive environment. In this situation, it is very important to attend the service time
presented to customers in such a way that if the vehicle presents
the service to customers later than its rival, it will miss a partial
of its sale. Demand of each customer is divided of two parts, the
rst part (didi ), 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. Therefore distributors reaching time
to the customers inuences on the amount of sales.
Since there are no related papers on a competitive approach on
the VRP in our best knowledge, in this work a new presented model
for the VRP with competitive time windows (VRPCTW) is presented
that can be considered as a new class of the VRPTW. Despite of
similarities between the classical models of VRPTW with proposed
model there are several differences that are described as follows:

In the classical models, arriving to the customer earlier than lower


bound of time windows is not desirable whereas in the new
model it is desirable.
In the classical models, arriving to the customer at any time in
time window bounds has same desirability, but in the proposed
model, desirability of arriving time from lower bound to upper
bound of time windows decrease.
In the new model, arriving to the customer after upper bound
of time windows makes partial of sale miss, but in the classical
models total sale is missed or only desirability decrease.

It is proven that VRPs belong to the category of NP-hard problems [5]; therefore the model is solved by simulated annealing (SA)
for large-scale problems. For some small cases, the related results
of the proposed SA are compared with the results obtained by the
Lingo8 software using a branch-and-bound algorithm. The related
results show the appropriate efciency for solving the problem,
especially for large sizes.
The rest of this paper is organized as follows. Section 2 introduces the problem and Section 3 represents the model formulation.
The problem-solving methodology is described in Section 4 and
the computational results are discussed in Section 5. Finally, the
conclusion is presented in Section 6.

2. Problem denition
In a competitive environment, it is very important to attend the
service time presented to customers in such a way that if the vehicle
presents the service to customers later than its rival, it will miss a
partial of its sale. For this reason, distributing companies dene the
route of their vehicles based upon other rival companies strategies
for serving customers. In other words, sometimes in competitive
situations considering the competition between vehicles is needed.
The competition in distribution of products with a short life cycle
is an example, which customers need a special device for keeping
them. Therefore reaching time of a distributor to customers inuences on the amount of sales. Hence, a model presented in this
paper is to nd the routing of vehicles in a competitive environment such that it can be considered as a new version of the VRPTW.
This problem is proposed under a condition that a competition is
between distributors for obtaining more sales and market shares.
Before presenting the model, these parameters are introduced
for clarication of the problem. Let G = (V, A) be a graph, where
V = {v1 , v1 , . . ., vn } is the nodes set and, A = {(vi , vj ): vi , vj V} is the
arcs set which each arc (vi , vj ) is associated with a non-negative cost
Cij .
tli lower bound of rivals arrival time to node i
tui upper bound of rivals arrival time to node i
tri rivals arrival time to node i
tdi actual distributers vehicle arrival time to node i
fr (x) probability distribution function of rivals arrival time to node
i
Fr (x) cumulative distribution function of rivals arrival time to node
i
dtdi time dependent demand of node i
dini time independent demand of node i
Di maximum number of customers demand in node i
E(Di ) Expected coverage of the ith customers demand
Demand of each customer is divided of two parts, the rst part
(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
the demand.
Di = dini + dtdi

(1)

The problem is solved under the following assumptions:


(1) Each vehicle has a xed capacity.
(2) Each customer location is serviced from only one vehicle.
(3) The total demands of customers must not exceed from the
capacity of the vehicle.
(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 allowable service time windows without missing any sale. Except
of the rivals arrival time, all problem parameters (e.g., customers demands and travel time) are assumed to be known
with certainty.
Arriving after the latest rivals arrival time, tui , the rst part of
demand, Dtdi , will be lost. If the arrival time occurs in the time window, the expected value of the obtained sale before rival reduces
according to the probability distribution function of the rivals
arrival time.
The rivals service time distribution to customers can be determined by the use of stochastic methods. In this problem, the rivals
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 follows:

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

distribution, in which the probability of serving node i before its


rival follows Eq. (2).
p(tri > tdi ) = 1 Fr (tdi )

(2)

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
arrival time to node i. So if the rivals arrival time to customers
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.
Now, the probability of reaching to customer i earlier than its
rival in time of tdi is computed by:

p(tdi ) =

1
1 Fr (tdi )
0

if tdi tli
if tli tdi tui
if tdi tui

E(Di ) =

Di
dini + [1 Fr (tdi )]dtdi
didi

if
if
if

tdi tli
tli tdi tui
tdi tui

xijv = 0 Otherwise

(3)

Because of this equation, if the vehicle reaches to node i in the


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
[tli , tui ], then with the probability of p(tdi ) 1 Fr (tdi ), it will service
node i earlier than its rival. Finally, if the vehicle reaches to node
i after tu , it will reach to node i with the probability of p(tdi ) = 0
earlier than its rival. In this case, the customers time dependent
demand is affected to service time presented, while if a rival distributor reaches to node i earlier, this part of the demand will be
missed. Therefore, the expected value of the customers demand is
computed by:
(4)

Therefore due to this equation, if the vehicle reaches to customer


i in time before tli , then it obtains the entire sale and satisfying all
the demand; otherwise, it only will deliver dini to the customer.
3. Model formulation
Let G = (V, A) be a graph, where V = {v1 , v1 , . . ., vn } is the nodes
set, and A = {(vi , vj ): vi , vj V} is the arcs set where each arc (vi , vj )
is associated with a non-negative cost Cij . Followings are a number
of parameters used in the presented mathematical model.
3.1. Parameters

xijv = 1 If vehicle v travels through route [i , j]

Oi = 1 If vehicle v visits node i in bound [0 , tli ]


Oi = 0 Otherwise
qi = 1 If vehicle v visits node i in bound [tli , tui ]
qi = 0 Otherwise
yi = 1 If vehicle v visits node i in bound [0 , tui ]
yi = 0 Otherwise
zi = 1 If vehicle v visits node i after tui
zi = 0 Otherwise

tdi

Actual vehicle arrival time to node i


Now, the problem can be mathematically formulated as follows:
n
nv
n 



min

 n


Cij xijv W

i=1 j=1 v=1

Oi dtdi + qi

i=1

t t 
ui
di
tui tli

dtdi
(5)

s.t.
nv

n

xijv = 1,

j = 2, ..., n

(6)

xijv = 1,

i = 2, ..., n

(7)

i=1 v=1
nv
n 

j=1 v=1
n


v
xip

n


i=1

v = 0,
xpi

p = 1, 2, ..., n, v = 1, 2, ..., nv

(8)

i=1

n
n



tiv

i=1

xijv +

n
n



j=1

tdj =

tijv xijv Tv ,

v = 1, 2, ..., nv

(9)

i=1 j=1

n
nv



tdi

i=1

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


Di number of demands in node i (i = 1, . . ., n)
Dini time independent demand of customer i
Dtdi time dependent demand of customer i
nv total number of vehicles
Kv capacity of vehicle v.
tiv required time for servicing the customer (node) i by vehicle v
tijv required time for traveling between customers i and j by vehicle

n


M arbitrary large number, say M > >

zi + yi = 1,

xijv +

v=1

(tiv + tijv )xijv ,

j = 2, ..., n

(10)

i=1 v=1
n


(Di dtdi zi )

i=2

nv
n



xijv Kv ,

v = 1, 2, ..., nv

(11)

j=1

(tui tdi ) M(yi ) 0,

i = 1, 2, ..., n

(12)

(tui tdi ) + M(zi ) 0,

i = 1, 2, ..., n

(13)

i = 1, 2, ..., n

(14)

86

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

(tui tdi ) + M(1 qi ) 0,

i = 1, 2, ..., n

(15)

(tli tdi ) + M(1 Oi ) 0,

i = 1, 2, ..., n

(16)

(tli ti ) M(i ) 0,
qi + i = 1,

i = 1, 2, ..., n

(17)

i = 1, 2, ..., n

(18)

v = 1, 2, ..., nv

(19)

xiv = 1,
1

i=2
nv 


xijv S r(S) S A {1}, S =


/ 

(20)

v=1 j S j/
S

xij , Oi , yi , zi , qi , i [0, 1],

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)
the value of yi and zi are 1 and 0 respectively. These values cause
carrying all demands of customers according to Constraint (11).
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)
the value of yi and zi are 0 and 1 respectively. These values cause
carrying only time independent demand of customer according to
Constraint (11).
Paraphrase 3. The second term of the objective function, which
maximizes the sale in a rival situation, is as follows:
n 


oi dtdi +

i=1

ti 0, t1 = 0

(21)

In this formulation, the objective function (5) minimizes the


total travel cost and maximizes expected value of obtained prot
as well. Constraints (6) and (7) ensure that each customer location is serviced from only one vehicle. Constraint (8) states that if
a vehicle arrives at a node (i.e., customer location), it must leave
it and by this way the route continuity is ensured. Constraint (9)
ensures that the sum of the required time for servicing customer i
and the required time for traveling between customers i and j do
not have to exceed from the maximum time, in which vehicle v can
be used. Also, Constraint (10) states the time for reaching to the jth
customer. Constraints (11)(14) impose that if vehicle v reaches to
customer i earlier than time tui , it must carry all of the customers
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
possible to reach to the customer earlier than its rival and deliver
dtdi to the customer. However after tui , dtdi is not carried to the customer denitely. Constraints (15)(18) are related to that part of the
objective function maximizing the amount of sale. Constraint (19)
warrantee that a depot is the rst and nal destination of each vehicle. Constraint (20) eliminates the sub-tours and nally, Constraint
(21) denes variables of model.
Paraphrase 1. In this paraphrase, the explanation of the second
objective function and the related constraints is described. Considering the time period of rivals arrival time and vehicle arrival
time, three modes are possible:Vehicles arrival time is less than
the lower bound of rivals arrival time: in this situation total time
dependent demands of customer is satised and also (tui ti ) 0,
(tli ti ) 0. According to Eqs. (15)(18) binary variables Oi , qi and
 i are free, 1 and 0 in value respectively, but because of the objective functions tendency to increase term oi dtdi , binary variable
Oi is one.Vehicles arrival time is between the lower bound and
the upper bound of rivals arrival time: in this mode (tui ti ) 0,
(tli ti ) 0 and according to Eqs. (15)(18) binary variables Oi is
0 and qi and  i are free in value, but because of existent term
qi ((tui ti )/(tui tli ))dtdi in the objective function, binary variable qi
is 1 and  i is 0.Vehicles arrival time is larger than the upper bound
of rivals arrival time:
In this case probability to provide a time-dependent customer
demand does not exist and terms (tui ti ) < 0 and (tli ti ) < 0 are
negative in values, so the both values of Oi and qi are 0 and the
value of  i is 1.
Paraphrase 2. As mentioned before, the strategy of carrying the
demand of customer is that if vehicle v reaches to customer i earlier
than time tui , it must carry all of the customers demand; otherwise,
it carries only dini for customer. Therefore to apply this strategy the
related constraints (11)(14), to the maximum capacity of vehicles
are added to the model. There are two modes for arriving time of
vehicle to the customer.

 t
ui
qi

tui tli

  [q t ] 
i
di

tui tli


dtdi

(22)

where qi tdi changes the second term of the objective function to


a nonlinear function. In order to linearize this term, i is substituted with qi tdi and two new constrains are added to the problem.
Therefore, the second objective function is determined by:
z2 =

N 

i=1

  t
ui

oi dtdi + qi

 

tui tli

i Mqi , i = 2, ..., n
i tdi , i = 2, ..., n
i tdi M(1 qi ), i = 2, ..., n

i
tui tli




dtdi

(23)

(24)

4. Problem-solving approach
The problem-solving methodology based on the simulated
annealing (SA) algorithm is presented in this section. A decoding
method and an initial solution generation are also discussed. Then
some of the neighborhood search methods for improving solutions
are proposed.
4.1. Simulated annealing
Simulated annealing (SA) is a stochastic relaxation technique
that has its origin in statistical mechanics. The SA methodology
draws its analogy from the annealing process of solids. In the
annealing process, a solid is heated to a high temperature and gradually is cooled to crystallize. As the heating process allows atoms
to move randomly, if the cooling is done too slowly, it gives atoms
enough time to align themselves in order to reach a minimum
energy state, namely stability or equilibrium. This analogy can be
used in combinatorial optimization problems, in which the state of
solid is corresponding to the feasible solution, the energy at each
state is corresponding to the improvement in the objective function
and the minimum energy state is the optimal solution.
SA uses a stochastic approach to direct the search. It allows the
search to proceed to a neighboring state even if the move causes the
value of the objective function to become worse. It guides the original local search method in the following way. If a move to a neighbor
X
in the neighborhood N(X) decreases the objective function value,
or leaves it unchanged, then the move is always accepted. More
precisely, the solution X
is accepted as the new current solution if
 0, where  = C(X
) C(X) and C(X) is the value of the objective
function. Moves, which increase the objective function value, are
accepted with a probability of e(/T) to allow the search to escape a
local optimum, where T is a parameter named as temperature. The
value of T varies from a relatively large value to a small value close
to zero. These values are controlled by a cooling schedule that species the initial and incremental temperature values at each stage
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

Fig. 2. Pseudocode of the proposed SA.

4.1.1. Simulated annealing implementation


The parameters of the proposed SA are as follows:
R number of iterations
EL epoch length indicating the number of the accepted solutions
in each temperature to achieve the equilibrium
T0 initial temperature
A rate of the current temperature decrease (i.e., cooling schedule)
X feasible solution
C(X) objective function value for X
N counter for the number of the accepted solutions in each temperature
IR counter for the number of iterations
The main steps of the SA algorithm are shown in Fig. 2.

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 representation consist of n numbers in the bound (0, m + 1 ]. The
integer part of each dimension represents the vehicle that serves
the nodes. Thus, the same integer parts represent the same vehicle for serving the customers. The fractional part represents the
sequence of the customer in the route. In other words, it shows priority of serving by the vehicle. The decoding method is based on
the following steps:
Step (1) For each customer (i.e., customer i where i = 1, . . ., n),
repeat Step 2.
Step (2) Fill all the dimension of representation with numbers
in the bound (0, m + 1 ]. The ith dimension represents the ith
node. Allocate customer i to vehicle k if the integer part of the ith
dimension of representation is k.
Step (3) Sort the allocated customers of each vehicle according to
the fractional part of the related dimension of customers.
For example, suppose that 7 nodes and 3 vehicles are available. A
simple representation is shown in Fig. 3. In this example, customers
7 and 2 are allocated to vehicle 1. The sequence of visiting customers
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 generate initial solutions, which is the rst step in any metaheuristic approach, a creative approach is applied as follows:
(1) Sort the customers according to tli none descending.
(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
its distance to depot is more than the rst customer allocated
(r1 ). It is necessary to consider the limitation of the capacity and
travel time of the vehicle.
(4) Repeat the following steps for the reminding customers till all
customers are serviced by all vehicles.
(5) Select the sequence of the reminding customers.
(6) Estimate the new customers distance with the last customer
allocated of each route and depot as well. Allocate the customer
to that route where the minimum distance is achieved while
the capacity of vehicles and the travel time limitations are not
violated.
4.4. Local search methods
After generating initial solutions, one of the following steps is
repeated for improving the initial solution.
4.4.1. 2-Opt exchange operator
The 2-opt operator improves single route. It exchanges the route
direction between two consecutive nodes. If the cost function of the
route has been improved, then the modied route is kept; otherwise, the route returns to the last condition. The 2-opt exchange
operation is shown in Fig. 5, in which the edge (i, i + 1) and (j,
j + 1) are replaced by edge (i, j) and (i + 1, j + 1), thus reversing the
direction of customers between i + 1 and j.
4.4.2. Insertion method
Select a route at random, then select as the max [0.1 (length
of the route), 2] nodes in each route, and change the integer number of selected nodes in the bound of [0, m] randomly to change
the vehicle that services the selected node. In other words, a node
is departed from one route and it is added to another route using
insertion heuristics. A new insertion is accepted if the vehicle capacity and maximum time, in which vehicle v can be used, are not
violated.
4.5. Parameter setting
The performance of any meta-heuristic algorithm is usually sensitive to the settings of the parameters that inuence its search
behavior. In this section, the parameters for the proposed metaheuristics are explained and introduced experimentally according
to Table 1. In this table, a is the cooling rate, EL is the number of
the accepted solution in each temperature for achieving the equilibrium, and T0 represents the initial temperature.

To set T0 , an initial solution is rst generated and then 20 neighbors of the initial solution are found. Finally, the objective functions
of them are calculated. fmin and fmax are set for the minimum
and maximum changes on the objective function obtained from
neighbors, respectively. T0 is set based on Eq. (25):
fmin + 0.1(fmax fmin )

(25)

5. Computational results
Computational results are shown in small and large-scale cases
for the model verication and the SA results, respectively. For the
model verication, 10 test problems in small sizes are solved by
the Lingo 8.0 software. The coordination of nodes is generated
randomly in the uniform distribution [0,100] and the customers
demand is generated randomly in the uniform distribution [0,10].
The total vehicles capacity is considered as to 1.2 times of the total
demands of customers. To determine the time windows boundaries, the given problem is solved without considering customers
time windows boundaries the maximum travel time of vehicles is
considered as U. then the value of time windows boundaries are
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,
respectively. Also, all the solution procedures are coded in the MATLAB7 program and all the test problems are run using the Intel Dual
Core, 2.5 GHz compiler and 1 GB of RAM.
The comparison of Lingo with the proposed algorithm shows
that our proposed algorithm can obtain approximately an optimal
solution in less time than Lingo as shown in Table 2. The average
gap between the optimal and the SA solutions is 1.288% showing
the efciency of the proposed SA. Furthermore, increasing the size
of the problem increases the solution time of Lingo exponentially
while it does not tangible effect on the solution time of the proposed
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
all of the test problems in the original data, there are 100 customers
that are divided into six sets of R1, R2, C1, C2, RC1 and RC2. In sets of
R1 and R2, the customer locations, demands and time windows are
randomly and uniformly distributed; however, they are clustered in
sets C1 and C2. Sets RC1 and RC2 display a combination of uniformly
distributed and their clusters.
Because of the difference between the given problem (VRPCTW)
and the classical VRPTW, some assumptions are inserted into the
Solomons test problems for adjusting the standard test problems
with the given problem. Hence, all of the customers demands
are considered as time dependent demands. Also, in the classical
Table 1
SA parameters.
SA parameter settings
No. of iterations
a
EL

100, 200, 500


0.99
50

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

1
2
3
4
5
6
7
8
9
10

nv

8
8
8
10
10
10
12
12
12
12

Lingo 8

2
2
3
2
3
4
2
2
3
4

SA (200 iterations)

Best solution

Time (s)

Best solution

Time (s)

Gap (%)

17.71
22.40
15.68
22.26
29.37
21.11
24.78
29.04
28.20
27.08

12
12
78
127
320
430
489
542
1245
2530

17.71
22.40
15.96
22.26
29.68
21.45
25.32
29.40
28.85
27.81

12.528
13.188
15.081
14.781
15.016
16.494
17.543
15.467
18.769
18.653

0.000
0.000
1.754
0.000
1.082
1.619
2.196
1.237
2.288
2.708

24.084

15.752

1.288

23.763

Average

578.5

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

C101
C102
C103
C104
C105
C106
C107
C108
C109
C201
C202
C203
C204
C205
C206
C207
C208

nv

10
10
10
10
10
10
10
10
10
3
3
3
3
3
3
3
3

Average

100 iterations

200 iterations

500 iterations

Best solution

Time (s)

Gap (%)

Best solution

Time (s)

Gap (%)

Best solution

Time (s)

34.83
78.14
89.65
93.31
37.35
33.57
39.88
50.67
54.47
24.49
67.23
69.19
81.02
24.90
25.69
25.48
25.58

253.67
320.71
225.56
291.24
214.26
225.32
213.77
228.82
221.55
320.56
337.71
349.91
362.07
354.64
345.12
334.64
355.16

3.2
58.1
76.7
50.0
4.8
0.1
4.1
32.6
47.3
1.5
39.4
59.8
55.1
2.8
3.1
4.8
5.4

34.01
65.35
69.13
80.24
35.80
34.59
39.03
43.79
40.40
24.31
51.76
62.89
73.20
24.46
25.08
24.97
24.34

756.57
649.36
506.18
626.01
534.22
628.06
544.60
476.25
532.90
814.36
788.76
840.94
886.64
746.88
745.45
679.57
689.22

0.8
32.2
36.3
28.9
4.8
3.1
1.9
14.6
9.3
0.7
7.3
45.2
40.1
1.0
0.6
2.7
0.3

33.74
49.41
50.73
62.23
35.65
33.56
38.30
38.21
36.97
24.14
48.22
43.31
52.25
24.23
24.92
24.31
24.27

1373.37
1066.51
1292.34
1051.22
1055.68
1497.61
1000.58
938.61
1127.72
1786.14
1688.32
1909.99
1817.24
1785.99
1766.83
1761.36
1760.13

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

R101
R102
R103
R104
R105
R106
R107
R108
R109
R110
R111
R112
R201
R202
R203
R204
R205
R206
R207
R208
R209
R210
R211
Average

nv

19
17
13
10
14
12
10
9
11
10
10
9
4
3
2
3
3
3
2
3
3
3
2

100 iterations

200 iterations

500 iterations

Best solution

Time (s)

Gap (%)

Best solution

Time (s)

Gap (%)

Best solution

Time (s)

69.92
68.57
119.96
171.43
49.61
98.36
124.76
167.07
48.08
47.49
56.88
50.31
46.61
68.08
87.81
129.73
52.17
69.86
103.13
134.83
44.61
49.44
59.02

51.96
46.23
49.48
62.20
44.90
51.33
59.56
63.97
48.54
54.33
53.39
57.57
152.85
351.28
389.05
1173.53
342.97
368.53
1193.48
1111.53
358.55
365.44
1599.35

18.7
24.3
55.5
46.1
7.6
54.0
47.3
59.4
13.4
6.4
40.9
22.4
39.9
68.2
52.7
74.6
56.8
66.7
71.9
69.4
33.0
53.6
59.9

62.24
69.05
104.85
145.24
49.34
97.78
102.60
148.21
45.75
44.76
48.88
44.64
37.23
64.68
75.27
99.01
40.65
52.06
79.91
114.32
41.85
43.69
49.60

90.23
89.48
96.13
120.46
98.16
84.84
109.59
120.40
102.37
107.88
115.26
118.61
325.59
784.42
888.67
2453.90
770.71
930.32
2411.69
2510.75
741.87
730.40
2598.85

5.7
25.2
35.9
23.8
7.0
53.1
21.2
41.5
7.9
0.3
21.1
8.6
11.8
59.8
30.9
33.2
22.2
24.2
33.2
43.6
24.8
35.8
34.4

58.90
55.17
77.14
117.31
46.11
63.87
84.67
104.78
42.40
44.62
40.37
41.10
33.31
40.48
57.50
74.32
33.27
41.90
60.01
79.59
33.53
32.18
36.92

349.09
326.19
319.03
356.37
242.26
309.63
283.68
737.77
438.31
514.65
508.49
712.90
692.93
1901.95
1660.74
5522.43
1899.95
1691.04
5384.14
5612.23
1791.94
1868.25
5515.25

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

RC101
RC102
RC103
RC104
RC105
RC106
RC107
RC108
RC201
RC202
RC203
RC204
RC205
RC206
RC207
RC208

nv

14
12
11
10
13
11
11
10
4
3
3
3
4
3
3
3

Average

100 iterations

200 iterations

500 iterations

Best solution

Time (s)

Gap (%)

Best solution

Time (s)

Gap (%)

Best solution

Time (s)

63.24
117.86
158.38
211.79
56.76
61.31
65.28
55.75
48.14
92.68
111.23
135.58
49.93
62.84
51.12
54.46

95.72
232.49
178.91
247.03
120.26
173.38
172.94
233.54
181.37
404.86
382.96
371.83
177.45
359.15
357.09
358.92

10.3
28.4
35.1
44.9
11.7
15.1
23.7
12.2
35.5
57.4
46.8
47.4
55.4
81.2
26.1
42.1

59.94
95.43
134.88
163.53
51.30
54.35
54.83
52.40
39.99
72.52
97.61
116.32
39.78
51.67
47.50
43.05

208.69
326.71
433.66
557.77
202.61
304.10
317.27
426.42
383.54
729.11
747.02
719.33
364.43
806.13
748.87
717.19

4.5
4.0
15.1
11.9
0.9
2.1
3.9
5.5
12.5
23.1
28.9
26.5
23.8
49.0
17.2
12.3

57.34
91.77
117.21
146.11
50.82
53.25
52.78
49.69
35.54
58.89
75.74
91.96
32.12
34.68
40.53
38.33

300.41
408.58
508.68
562.94
370.16
493.11
542.65
277.23
940.65
1867.27
1786.43
2000.79
984.50
1623.57
1858.59
1915.30

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 problem, minimizing the number of the vehicles is not the problem
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 objective function is presented in two terms. The rst term
minimizes the total travel cost and the second one maximizes the
sale in a rival situation. In each test problem, two objective functions are changed into one objective function by weighting to each
term. The weights of two terms are considered 1 and 5, respectively.
To evaluate the quality of the solutions, the relative gap (RG)
between the best solution (BR) obtained from the proposed SA
with the maximum iterations and the best solution (RA) of the proposed SA within other iterations for each test problem is computed
by:
RG =

RA BR
100
BR

To evaluate the solution quality versus the run time of the


algorithm, each test problem is solved for R = 100, 200 and 500
iterations.
Tables 35 compare the performance produced by the proposed
SA in the set of C1, C2, R1, R2, RC1 and RC2 for 100, 200 and
500 iterations. In this table, nv is the number of the considered
vehicles.

Fig. 7. Convergence rate for Problem C108.

The average gaps of the proposed SA algorithm for three sets


of problems C, R and RC in 100 iterations are 26.4, 45.3 and 35.8%,
respectively. In addition, the average gaps of the SA algorithm for
these sets of problems in 200 iterations are 13.3%, 26.3% and 15.1%,
respectively. In the set of RC, the coverage speed to a good solution is faster than other sets. The best results are obtained for 500
iterations in all the sets. The relative gap for 500 iterations are zero,
because the best solutions obtained within 500 iterations are much
better than the best solutions obtained for 100 and 200 iterations.
Thus, there is no need to illustrate the Gap column for 500 iterations. The relative gaps for 100 and 200 iterations are computed
according to the comparisons results with 500 iterations. Fig. 6
shows the convergence rate of the proposed algorithm in different
sets. The algorithm run time is acceptable for solving test problems and the maximum run time in 100, 200 and 500 iterations
are 1599.35 and 2598.85 and 5612.23, respectively for Problem
R211.
Also, convergence rate for Problem C108 is shown in Fig. 7. The
percentage of the improved result from 100 iterations to 200% iterations is 15.7%. Finally, the problem is solved for Problem C108 with
100, 200 and 500 iterations, and a schematic route is also shown in
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 support from the University of Tehran under the research Grant No.
8106043/1/14.
References

Fig. 8. Schematic routes for Problem C108 with 100, 200 and 500 iterations.

6. Conclusion
This paper has presented a special type of the vehicle routing
problem with time windows (VRPTW), in which a competition
exists between distributors. In distribution of the products with
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.
In addition, a new mathematical model related to this problem
has been presented to nd the short routes with the minimum
travel cost of eet, traveled distances and maximum sale for a company. To verify the solution technique, 10 test problems have been
solved by the Lingo 8.0 software and the related results obtained

[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 Ktrees. 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 vehicle 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.
Applied Mathematics and Computation 2006;176:44554.
[19] Golden BL, Assad AA, editors. Vehicle routing: methods and studies. Amsterdam, The Netherlands: Elsevier; 1988.
[20] Solomon MM. On the worst-case performance of some heuristics for the vehicle routing and scheduling problem with time window constraints. Networks
1986;16:16174.
[21] Ombuki B, Ross BJ, Hanshar F. Multi-objective genetic algorithm for vehicle
routing problem with time windows. Applied Intelligence 2006;24:1730.
[22] Geiger MJ. Multi-criteria und Fuzzy Systeme in Theorie und Praxis. In: A computational study of genetic crossover operators for multi-objective vehicle
routing problem with soft time windows. Deutscher Universities-Verlag; 2003.
p. 191207.
[23] Cordeau JF, Desaulniers G, Desrosiers J, Solomon MM, Soumis F, The VRP with
time windows. In: Toth P, Vigo D, editors. The vehicle routing problem, SIAM
Monographs on Discrete Mathematics and Applications, Vol. 9, Philadelphia,
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 vehicle routing and scheduling problems with soft time windows. Transportation
ResearchPart E 2009;45:96077.
[25] Taillard E, Badeau P, Guertin F, Gendreau M, Potvin J. A tabu search heuristic for
the vehicle routing problem with soft time windows. Transportation Science
1997;31:17086.
[26] Tavakkoli-Moghaddam R, Safaei N, Shariat MA. A multi-criteria vehicle routing
problem with soft time windows by simulated annealing. Journal of Industrial
EngineeringInternational 2005;1(1):2836.

[27] Braysy O, Gendreau M. Vehicle routing problem with time windows, part
I: route construction and local search algorithms. Transportation Science
2005;39:10418.
[28] Solomon MM, Desrosiers J. Time window constrained routing and scheduling
problems. Transportation Science 1988;22(1):113.
[29] Solomon MM. Algorithms for the vehicle routing and scheduling problem with time windows constraints. Operations Research 1987;35:254
65.

You might also like