You are on page 1of 8

Available online at www.sciencedirect.

com

Electronic Notes in Discrete Mathematics 39 (2012) 91–98


www.elsevier.com/locate/endm

A variable neighborhood search for the


multi-product inventory routing problem

Anis Mjirda a Bassem Jarboui b Rita Macedo a Saı̈d Hanafi a


a LAMIH, Université de Valenciennes et du Hainaut-Cambrésis, France
b MODELIS, Faculté des Sciences Economiques et de Gestion de Sfax, Tunisie

Abstract
We address a multi-product inventory routing problem, and propose a two-phase
variable neighborhood search (VNS) metaheuristic to solve it. In the first phase,
VNS is used to solve a capacitated vehicle routing problem, period by period, to find
an initial solution without taking into account the inventory. In the second phase,
VNS iteratively improves the initial solution while minimizing both the transporta-
tion and inventory costs. We propose an efficient heuristic to determine the amount
of products to collect from each supplier at each time period. This heuristic is
applied at each local search move, and during the exploration we use priority rules
of suppliers and vehicles, based on the current delivery schedule over the planing
horizon. Computational results show the efficiency of the two-phase approach pro-
posed.
Keywords: Inventory, Routing, Metaheuristic, VNS.

1 Introduction
In this paper, we address the multi-product inventory routing problem (IRP),
which is an integrated distribution problem, concerned with the relation of
two important activities of the supply chain, the management of both routes

1571-0653/$ – see front matter © 2012 Elsevier B.V. All rights reserved.
doi:10.1016/j.endm.2012.10.013
92 A. Mjirda et al. / Electronic Notes in Discrete Mathematics 39 (2012) 91–98

and inventory [5,6]. It therefore combines a vehicle routing problem, where the
vehicle routes to visit suppliers must be determined, and an inventory problem,
concerning the management of the quantities of product to be collected at each
supplier, at each time period. We propose a Variable Neighborhood Search
(VNS) algorithm for this problem. VNS [4] is a metaheuristic based on the
systematic exploration of different neighborhood structures, within a local
search routine. This method has been used in numerous classes of problems,
namely in different variants of vehicle routing problems (for example [3]).
Surveys of some of these applications can be found in [1,2]. We consider a
time horizon composed by T different periods. At each time period t ∈ τ =
{1, . . . , T }, an assembly plant has a demand of dit units of product i ∈ N =
{1, . . . , n}. Each product is available at the corresponding supplier i. There
is a fleet of vehicles v ∈ M = {1, . . . , m}, with a capacity C. At each period
t, vehicle v departs from the depot 0, visits a set of n(t, v) ≤ n suppliers and
goes to the assembly plant n + 1. The number of vehicles used in period t is
denoted by m(t). Let N(t, v) = {1, . . . , n(t, v)}, N − (t, v) = N(t, v)−{n(t, v)},
N + (t, v) = N(t, v) + {n(t, v) + 1} and M(t) = {1, . . . , m(t)}. There are three
different costs to be taken into account. A fixed cost, F , for using one vehicle
in one period, the cost of traveling from supplier i to supplier j, cij , and the
inventory cost, hi , of keeping one unit of product from supplier i, for one
period of time, in the assembly plant. The paper is organized as follows. In
section 2, we describe our two-phase variable neighborhood search approach
for the IRP. In section 3, we present computational results and, finally, in
section 4 we draw some conclusions.

2 Two-phase variable neighborhood search


We propose a two-phase variable neighborhood search metaheuristic, 2P-VNS,
for the considered IRP. A solution S of our problem is represented by a se-
quence of T elements, each representing the set of routes for period t ∈ τ . A
route is defined by a sequence of suppliers to be visited. We use the follow-
ing notation: S = (S1 , . . . , ST ) represents the solution defined in the horizon
τ , St = (St1 , . . . , Stm(t) ) represents the routes generated at period t, Stv =
< Stv1 , . . . , Stvn(t,v) > represents the route of vehicle v at period t, and Stvi =
ind q
(Stvi , Stvi ) represents the ith supplier to be visited in route v of period t, being
ind q
Stvi its index and Stvi the quantity of its product to be collected. We define
three moves, concerning changes within one route. Given a route Stv , ΨDrop
drops one of its supplier , ΨAdd adds a new supplier, and ΨChange exchanges
one supplier by any other one. They can be formally defined as follows.
A. Mjirda et al. / Electronic Notes in Discrete Mathematics 39 (2012) 91–98 93


ΨDrop (Stv , i) = {Stv | ∀j ∈ N − (t, v), Stvj
 
= Stvj ; if j < i, Stvj = Stv(j+1) if
j ≥ i};
0 
ΨAdd (Stv , i, Stvk ) = {Stv | ∀j ∈ N + (t, v), Stvj
 
= Stvj if j < i, Stvj = Stv(j−1) if
 0
j > i; Stvi = Stvk };
0   0 
ΨChange (Stv , i, Stvk ) = {Stv | Stvi = Stvk ; ∀j ∈ N(t, v) − {i}, Stvj = Stvj }.
Using these three elementary moves on routes, we define seven different neigh-
borhood structures within the solution space:
Shift neighborhood
A neighbor of a solution S is obtained by changing the order on which a
supplier is visited, in one route of the solution.
N1 (S) = {S  | ∀t ∈ τ, ∀v ∈ M(t), ∀i1 , i2 ∈ N(t, v), Stv

= ΨAdd (ΨDrop (Stv , i1 ),
i2 , Stvi1 )}.
Exchange neighborhood
A neighbor of a solution S is obtained by exchanging a supplier of one route
by another supplier of a route of the same period.
N2 (S) = {S  | ∀t ∈ τ, ∀v1 , v2 ∈ M(t), ∀i1 ∈ N(t, v1 ), ∀i2 ∈ N(t, v2 ), Stv

1
=

ΨChange (Stv1 , i1 , Stv2 i2 ); Stv2 = ΨChange (Stv2 , i2 , Stv1 i1 )}.
Drop neighborhood
A neighbor of a solution S is obtained by dropping a supplier of a route.
N3 (S) = {S  | ∀t ∈ τ, ∀v ∈ M(t), ∀i ∈ N(t, v), Stv

= ΨDrop (Stv , i)}.
Insertion neighborhood
A neighbor of a solution S is obtained by inserting any supplier in a route.
0q
N4 (S) = {S  | ∀t ∈ τ, ∀v ∈ M(t), ∀i1 ∈ N(t, v), ∀i2 ∈ N, Stvk
0
= (i2 , Stvk ),
 0
Stv = ΨAdd (Stv , i1 , Stvk )}.
Replacement neighborhood
A neighbor of a solution S is obtained by replacing a supplier of one route
by any supplier.
N5 (S) = {S  | ∀t ∈ τ, ∀v ∈ M(t), ∀i1 ∈ N(t, v), ∀i2 ∈ N, Stvk ∗
= ( i2 ,
∗q  ∗
Stvk ), Stv = ΨAdd (ΨDrop (Stv,i1 ), i1 , Stvk )}.
Shift periodic neighborhood
A neighbor of a solution S is obtained by eliminating one supplier of a route
and inserting it in a route of any period.
N6 (S) = {S  | ∀t1 , t2 ∈ τ, ∀v1 ∈ M(t1 ), ∀v2 ∈ M(t2 ), ∀i1 ∈ N(t1 , v1 ), ∀i2 ∈
N(t2 , v2 )}, St1 v1 = ΨDrop (St1 v1 , i1 ), Stv

2
= ΨAdd (Stv2 , i2 , St1 v1 )}.
Exchange periodic neighborhood
A neighbor of a solution S is obtained by exchanging two suppliers of two
94 A. Mjirda et al. / Electronic Notes in Discrete Mathematics 39 (2012) 91–98

routes of different periods.


N7 (S) = {S  | ∀t1 , t2 ∈ τ, ∀v1 ∈ M(t1 ), ∀v2 ∈ M(t2 ), ∀i1 ∈ N(t1 , v1 ), ∀i2 ∈
N(t2 , v2 ), St1 v1 = ΨChange (St1 v1 , i1 , St2 v2 i2 ), St2 v2 = ΨChange (St2 v2 , i2 , St1 v1 i1 )}.

2.1 Phase 1: Construction of an initial solution

In the first phase, VNS is used to solve a capacitated vehicle routing problem,
period by period, to find an initial solution, without taking into account the
inventory. This means that ∀t ∈ τ , v ∈ M, ∀i ∈ N, the quantity of product to
collect at each supplier is equal to its demand for the considered period, i.e,
ind t . We use two different local search methods, LS1 and LS2 , as sub-
q
Stvi = dStvi
routines in our general algorithm for the first phase VNS. Function LS1 (S, N )
corresponds to a local search algorithm, where S is the initial solution and
N is the neighborhood explored with a first improvement strategy. Function
LS2 (S, N , N  ) corresponds to a local search algorithm, where S is the initial
solution and N  and N  are two different neighborhoods. It is described as
follows.

Algorithm 1: LS2 (S, N  , N  )

Repeat
S  ← LS1 (S, N  );
S  ← LS1 (S  , N  );
Δ ← f (S  ) − f (S  );
S ← S  ;
until Δ ≥ 0
Return: S

Let N h be recursively defined as: N h+1(S) = ∪S  ∈N (S) N h (S  ), with N 1 (S) =


N (S). Algorithm VNS is initialized with a random solution, and is described
as follows.

Algorithm 2: VNS(S, kmax , itermax )

For iter = 1 to itermax do


k ← 1;
while k ≤ kmax do
S  ∈ N1k ;
A. Mjirda et al. / Electronic Notes in Discrete Mathematics 39 (2012) 91–98 95

S  ← LS2 (S  , N1 , N2 )
if f (S ) < f (S) then
S ← S  ; k ← 1;
else
k ← k + 1;
end if
end while
end for
Return: S

The solution obtained with VNS corresponds to the initial solution to be used
in the second phase of our method, described in the following section. Again,
this solution does not consider having inventory products at any period, and
thus has an inventory cost equal to zero.

2.2 Phase 2: Improvement phase


In the second phase, we apply a Variable Neighborhood Descent (VND) algo-
rithm, which improves the initial solution, while minimizing both the trans-
portation and inventory costs. In this phase, we use neighborhood structures
that modify the amounts of products to collect. Thus, we propose an efficient
heuristic (section 2.2.1) to determine the amounts of products to be collected
from each supplier at each time period. The objective is to minimize the in-
ventory costs, taking into account the routes generated at each local search
move.

2.2.1 Inventory Management


We apply a backward method to define, at each time period, the amount of
products to deliver, by each vehicle, in order to fulfill the demands of the
preceding periods. Given that there are several suppliers to visit at each
period, and that each supplier may be visited by more than one vehicle, we
propose two priority rules, one defining the order of suppliers on which we
determine the amount of product to deliver and the other one defining the
order of the corresponding allocation of vehicles. The priority of supplier i ∈ N
at time period t ∈ τ is denoted by Pit , and is based on the inventory cost of its
product and on its nearest delivery period t < t. More precisely, we define this
priority as Pit = hi (t − max{t < t | if the supplier i is visited at period t }).
Once a supplier is selected for a period t, we must assign the order on which
96 A. Mjirda et al. / Electronic Notes in Discrete Mathematics 39 (2012) 91–98

its products are to be allocated to the existing vehicles visiting it at that same
period. Again, we define priority rules for this allocation. For that, we begin
by calculating an estimation of the average cost on which we incur if one unit of
product is not delivered
 by vehicle v, during time period t. This estimation is
∗ i∈N(t,v) (dit +Ii(t+1) )Pit
given by hvt =  , with Iit representing the inventory level of
i∈N(t,v) (dit +Ii(t+1) )
product from supplier i at time instant t, i.e., the amount of product i in stock
at the beginning of period t. Finally, the priority vehicle v at each time period
t is the one with the smallest P Vvt = h∗vt max{ i∈N (t,v) (dit + Ii(t+1) ) − C, 0}.

2.2.2 Variable Neighborhood Descent


As a subroutine of our general algorithm for the second phase, VND, we apply
a local search method, LSIM, on which we determine, at each solution move,
the amount of products to deliver.

Algorithm 3: LSIM(S, N )

For all S  ∈ N (S) do


q
Calculate Stvi , ∀t, v, i, see sect. 2.2.1;
if f (S ) < f (S) then S ← S  ;


end for all


Return: S

Let us consider the set of neighborhood structures Nset = {N [1] , . . . , N [5] } =


{N3 , . . . , N7 }. Our general algorithm for the second phase VND is initialized
with the solution found in the first phase, and is described as follows.

Algorithm 4: VND(S, Nset )

k ← 1;
Repeat
S  ← S;
S  ← LSIM(S  , N [k]);
if Δ = (f (S  ) − f (S)) < 0 then S ← S  ; k ← 1;
else k ← k + 1;
until k > |Nset|
Return: S
A. Mjirda et al. / Electronic Notes in Discrete Mathematics 39 (2012) 91–98 97

3 Computational Results
We tested our method on a set of 14 benchmark instances, the same ones
used in [5], and report the best and average results obtained on 5 runs of the
algorithm for each instance. The algorithm was implemented in C++ and
Table 1
Computational Results

GA 2P-VNS
∗ ∗
Inst f ∗ #v t∗ f ∗ #v t∗ f #v t Δ

S12T5 2096.8 14 58.5 1961.7 14 0.1 1961.7 14.0 0.1 6.4


S12T10 4333.3 29 111.2 4002.9 29 0.2 4002.9 29.0 0.2 7.6
S12T14 6115.2 41 120.3 5635.8 41 0.3 5635.8 41.0 0.3 7.8
S20T5 3143.4 21 31.8 3045.1 23 0.4 3045.1 23.0 0.4 3.1
S20T10 6499.4 43 126.0 6098.2 46 3.1 6137.5 46.4 2.7 6.2
S20T14 9208.4 61 360.3 8593.7 65 8.4 8635.6 65.4 7.4 6.7
S20T21 13948.4 92 255.8 12951.2 98 20.2 13028.5 99.0 18.0 7.1
S50T5 5618.1 45 133.4 5144.2 47 3.7 5188.2 46.8 3.8 8.4
S50T10 11642.0 95 226.0 10787.9 99 34.4 10846.8 98.4 31.3 7.3
S50T14 16987.0 135 328.1 15441.6 141 66.8 15503.2 141.2 51.7 9.1
S50T21 26448.8 209 496.7 23500.9 214 196.3 23560.0 215.2 147.2 11.1
S98T5 561168.2 57 476.8 575790.1 59 100.1 583195.3 59.8 78.3 -2.6
S98T10 1124797.6 113 1307.3 1169517.1 120 290.0 1263583.8 120.0 335.6 -4.0
S98T14 1571652.3 159 1589.7 1628946.0 167 1687.3 1636363.1 167.8 860.5 -3.6

the computational tests were run on a Pentium 4 with a 3.4GHz processor


and a 4GB RAM. In Table 1, we report the best value f ∗ , the number of
used vehicles #v and the CPU time in seconds t∗ , obtained by the genetic
algorithm (GA) in [5], and the two-phase method (2P-VNS). We also report
∗ ∗
the average values, f , #v and t , for the two-phase method (2P-VNS). The
last column, Δ, represents the improvements, in percentage, obtained with
the two-phase method (2P-VNS), when compared with the genetic algorithm
∗ ∗
(GA) (Δ = (1 − (f2P −V N S /fGA )) × 100). For the first eleven instances, both
the best cost value and CPU time obtained by the 2P-VNS are significantly
better than those provided by GA. However, for the last three instances, which
are the largest, the GA found a better solution, even though it took more than
four times of the CPU time, when compared with the 2P-VNS.

4 Conclusions
We propose a two-phase heuristic based on Variable Neighborhood Search for
a variant of the inventory routing problem where both the transportation and
98 A. Mjirda et al. / Electronic Notes in Discrete Mathematics 39 (2012) 91–98

inventory costs are minimized. The first phase constructs an initial solution
by solving a VRP problem for each period with VNS while minimizing only
the transportation cost. The second phase improves this initial solution with
VND while minimizing both the inventory and transportation costs. Compu-
tational results confirm the efficiency of VND, particularly for medium size
instances, comparing to the genetic algorithm. However, for large scale in-
stances VND stops at a local optimum that is worse than the one obtained by
GA. Some preliminary experiments, not reported in this paper, show that the
replacement of VND by VNS provides new best solutions.

Acknowledgements
This work was supported by the Centre National de la Recherche Scientifique
(CNRS), by the Campus interdisciplinaire de recherche, d’innovation tech-
nologique et de formation Internationale sur la Sécurité et l’Intermodalité des
Transports (CISIT), and by the Laboratoire d’Automatique, de Mécanique et
d’Informatique industrielles et Humaines (LAMIH) of the Université de Va-
lenciennes et du Hainaut-Cambrésis.

References

[1] Hansen, P., N. Mladenović, and J. A. Moreno-Pérez, Variable neighborhood


search: methods and applications, 4OR A Quarterly Journal of Operations
Research 6 (2008), 319–360.
[2] Hansen, P., N. Mladenović, and J. A. Moreno-Pérez, Variable neighbourhood
search: methods and applications, Annals of Operations Research 175 (2010),
367–407.
[3] Hemmelmayr, V. C., K. F. Doerner, R. F. Hartl, and M. W. P. Savelsbergh,
Delivery Strategies for Periodic Blood Products Supplies, Operations Research
Spectrum 31 (2009), 707–725.
[4] Mladenović, N., and P. Hansen, Variable neighborhood search, Computers &
Operations Research 24 (1997), 1097–1100.
[5] Moin, N. H., S. Salhi, and N. A. B. Aziz, An efficient hybrid genetic algorithm for
the multi-product multi-period inventory routing problem, International Journal
of Production Economics 133 (2011), 334–343.
[6] Savelsbergh, M., and J-H. Song, Inventory routing with continuous moves,
Computers & Operations Research 34 (2007), 1744–1763.

You might also like