The Petrol Station Replenishment Problem With Time Windows
The Petrol Station Replenishment Problem With Time Windows
The Petrol Station Replenishment Problem With Time Windows
www.elsevier.com/locate/cor
Abstract
In the Petrol Station Replenishment Problem with Time Windows (PSRPTW) the aim is to optimize the delivery of several
petroleum products to a set of petrol stations using a limited heterogeneous fleet of tank-trucks. More specifically, one must
determine the quantity of each product to deliver, the assignment of products to truck compartments, delivery routes, and schedules.
The objective is to maximize the total profit equal to the sales revenue, minus the sum of routing costs and of regular and overtime
costs. This article first proposes a mathematical formulation of the PSRPTW. It then describes two heuristics based on arc preselection
and on route preselection. Extensive computational tests on randomly generated instances confirm the efficiency of the proposed
heuristics. Finally, a performance analysis on a real case shows a distance reduction of more than 20% over a solution obtained by
an experienced dispatcher.
䉷 2007 Elsevier Ltd. All rights reserved.
1. Introduction
This article proposes a mathematical model and two heuristics for the Petrol Station Replenishment Problem with
Time Windows (PSRPTW). This problem consists of optimizing the delivery of several petroleum products to a set of
petrol stations, which must be supplied once by a limited heterogeneous fleet of tank-trucks based at a terminal, within
given time windows. This problem is motivated by a real case faced by a Quebec based transportation company. In
North America most petrol companies subcontract the replenishment of their outlets to private transporters who are
paid on a delivered quantity basis. The objective of the PSRPTW is to maximize the total profit, equal to the revenue
which is a function of delivered quantities, minus the sum of routing costs and of regular and overtime costs. Decision
variables specify how much of each product to deliver to stations subject to their minimum requirements, how to assign
products to vehicle compartments, and how to design and schedule delivery routes. In this study, we formulate the
PSRPTW as a mixed integer linear program. We then propose two heuristics based on the same formulation. The first
heuristic consists of preselecting promising arcs and of solving the associated mathematical program to optimality. It
can solve small instances of up to about 15 stations. The second heuristic makes a preselection of promising routes
through a geographical decomposition method, and can be applied to larger instances.
∗ Corresponding author. Tel.: +1 418 656 7029; fax: +1 418 656 2624.
E-mail addresses: [email protected] (F. Cornillier), [email protected] (G. Laporte), [email protected] (F.F. Boctor),
[email protected] (J. Renaud).
0305-0548/$ - see front matter 䉷 2007 Elsevier Ltd. All rights reserved.
doi:10.1016/j.cor.2007.11.007
920 F. Cornillier et al. / Computers & Operations Research 36 (2009) 919 – 935
A major difference between the PSRPTW and most vehicle routing problems with time windows is the loading
component: in the PSRPTW one must simultaneously design vehicle routes and assign petroleum products to truck
compartments for each trip. Related but different problems have been studied by a number of authors. Brown and
Graves [1] have considered the problem of direct deliveries (i.e. single-customer trips) and time windows. Different
algorithms have been proposed for other versions of the same problem without time windows. Brown et al, [2] and
Malépart et al. [3] have generalized this problem by allowing the delivery of more than one station in a same trip.
Heuristics for a multiperiod version of this problem have been developed by Taqa allah et al. [4]. In Cornillier et al.
[5], an exact algorithm is developed for a similar problem without time windows, where only one or two stations can
be delivered within a same trip, while Avella et al. [6] have proposed a heuristic and an exact algorithm based on a
route generation scheme and a branch-and-price algorithm to solve a similar problem. More recently, a heuristic for
the multiperiod problem without time windows was put forward by Cornillier et al. [7] for the case where the number
of stations on any given route is limited to two.
The remainder of this paper is organized as follows. The problem is defined and modelled in Section 2. The route
generation procedure is described in Section 3. In Section 4, we propose two heuristics, one based on arc preselection
and the other based on route preselection. Computational results are presented in Section 5 and conclusions follow in
Section 6.
The PSRPTW can be formally defined as follows. Let G = (V ∗ , A) = (V ∪ {0}, A) be a directed graph where
V = {1, . . . , n} is the set of stations, vertex 0 is the terminal, and A = {(i, j ) : i, j ∈ V ∗ , i = j } is the arc set. Denote
by cij and tij the travel cost and the travel time associated with arc (i, j ), and by si the service time of station i. The
PSRPTW consists of maximizing a profit related function by designing delivery routes to replenish stations with a
limited heterogeneous fleet of K tank-trucks based at the terminal. Service at station i must start and end within a given
time window [ai , bi ] satisfying bi − ai si . A working day contains H regular working hours which can be extended
by using H overtime hours. A regular wage rate applies to regular working time while a higher rate applies to overtime
hours. Only the hours effectively worked are paid, i.e. the hours from the beginning of the vehicle first trip to the return
of its last trip. The total variable cost is the sum of travel costs cij , regular and overtime wages. All trucks are assumed
to travel at the same speed. Moreover, each truck is subdivided into several compartments of known capacities and is
not equipped with a flow metre. Thus a given compartment can only be used to deliver one product to one station. Each
petrol station has a given number of capacitated underground tanks. The PSRPTW consists of determining:
• the quantity of each product to be delivered to each station, which should lie between a minimum and a maximum;
• the loading of these products into vehicle compartments;
• feasible delivery routes to these stations;
• the selected routes assignment to available trucks;
• the departure time of each truck trip,
2.1. Assumptions
Our mathematical model is based on the generation of all feasible routes a truck can follow. A route is feasible if it
satisfies all time windows and constraints on delivered amounts. Given a route r, one can compute its earliest and its
latest departure times, denoted by r and r , minimizing its total waiting time.
We first define the following parameters:
xrkv a binary variable equal to 1 if and only if route r corresponds to trip v of truck k;
dkv the departure time of truck k for trip v;
hk the number of regular working hours of truck k;
hk the number of overtime hours of truck k.
The model is then
(PSRPTW) Maximize rk xrkv − hk − hk , (1)
(r,k,v) k k
subject to
asr xrkv = 1 ∀s, (2)
(r,k,v)
xrkv 1 ∀(k, v), (3)
r
xrk,v+1 xrkv ∀(k, v), (4)
r r
r xrkv dkv r xrkv + M 1 − xrkv ∀(k, v), (5)
r r r
dk,v+1 dkv + r xrkv ∀(k, v), (6)
r
922 F. Cornillier et al. / Computers & Operations Research 36 (2009) 919 – 935
Fig. 1. Illustration of the model with two tank-trucks and three routes.
dkv − dk,1 + r xrkv hk + hk ∀(k, v), (7)
r
hk H ∀k, (8)
hk H ∀k, (9)
+
dkv ∈ R ∀(k, v), (10)
hk ∈ R+ , hk ∈ R+ ∀k, (11)
xrkv ∈ {0, 1} ∀(r, k, v). (12)
In this formulation, the objective function (1) maximizes the total profit. Constraint (2) stipulates that each station
is visited once and only once. Constraint (3) ensure that at most one route is assigned to the vth trip of truck k. By
constraint (4), trip v + 1 of truck k exists only if trip v exists. In constraint (5), M is a large positive number; these
constraints require that routes departure times lie within the computed windows [r , r ]. Constraint (6) states that
trip departure occurs after the arrival time of the preceding trip. Since we do not know the number of trips of truck
k, constraint (7) ensures that the total working hours, decomposed into regular and overtime hours, is equal to the
duration, calculated as the difference between its latest trip return time and its first trip departure time. Constraint (8)
and (9) ensure that regular and overtime hours lie within the allowable limits.
Fig. 1 illustrates a case with three routes r1 , r2 , and r3 , where [1 , 1 ] = [1, 2], [2 , 2 ] = [1, 3], [3 , 3 ] = [0, 3],
and 1 = 1, 2 = 2, and 3 = 3. There are two identical trucks generating the same profit, and the maximal working
hours are H = 3 and H = 2, for a total of five hour per truck. Fig. 1a depicts an optimal solution using one overtime
hour, while Figs. 1b and 1c correspond to suboptimal solutions using two overtime hours. In Fig. 1d, we show that the
solution of Fig. 1a cannot be improved by starting route r1 at time t = 0 because r1 would then need one additional
waiting hour.
3. Route generation
In the above formulation, the number of potential routes is generally huge. We first propose ways of reducing the
number of routes through feasibility and dominance criteria. A route can potentially visit as many stations as there are
compartments in the truck. However, a two-stop limit per route is common practice in North America. This is explained
by the fact that most trucks have from four to six compartments, while stations generally require two or three products,
one of which frequently requires two compartments. In this study, we consider the case where routes can visit up to four
stations. If G is a complete graph, the number of feasible and infeasible routes visiting at most m stations is equal to
F. Cornillier et al. / Computers & Operations Research 36 (2009) 919 – 935 923
m
i=1 n!/(n − i)! and can be rather large. Instead of making an explicit enumeration of all feasible and infeasible routes
to be checked, we use an adaptation of Johnson’s algorithm [8] to generate candidate routes from G, or a subgraph of
G, from which all infeasible arcs are removed. These are arcs that cannot be included in a solution without violating a
time or duration constraint. Given a directed graph, this algorithm consists of enumerating all or some of its elementary
circuits. In our adaptation, routes are iteratively built starting from the terminal, station by station, until no more stations
can be added without violating time or quantity constraints.
In our problem, some infeasible arcs of G can be removed since some station pairs are incompatible in terms of
time windows or requested quantities. Because these stations cannot belong to the same route, the number of feasible
routes is reduced. We define the subgraph G = (V ∗ , A ) of G where each arc of A corresponds to a pair of compatible
stations with respect to their time windows. Also, for each truck k we define the subgraph Gk = (V ∗ , Ak ) of G where
each arc of Ak corresponds to a pair of compatible stations with respect to their time windows and demand feasibility
constraints. Demand feasibility of a route for a given truck is checked as shown in Section 3.2.
A feasible route should allow the delivery of all minimal quantities required by its stations, and should visit these
stations within the required time windows. In this section, we solve a tank-truck loading problem (TTLP) defined as
follows. Let P be the set of demands of all stations on the route, and let gp be the revenue associated with quantity
qp delivered to station p. This revenue is a function of the distance between the station at which the delivery takes
place and the terminal. The TTLP consists of determining the quantity qp to be delivered to each station p of the
route in order to maximize the sum of revenues, while respecting the minimal and maximal requirements up and vp ,
and without exceeding the capacity of any tank-truck compartment. Related problems using compartmented vehicles,
generally referred to as Loading Problems, have been addressed with different objectives (Christofides et al. [9], Yuceer
[10], Smith [11], Bukchin and Sarin [12]), and in different applications: bulk ship scheduling with flexible cargo holds
(Fagerholt and Christiansen [13,14]), livestock transportation (Oppen and LZkketangen [15]), grocery delivery (Eglese
et al. [16]), and oil delivery (Brown et al. [2], Van der Bruggen et al. [17], Bausch et al. [18]).
In the PSRPTW, the loading problem can be formulated as follows. Let ypc be a binary variable equal to 1 if demand
p is assigned to compartment c, and 0 otherwise. Then the problem is
(TTLP) Maximize gp q p , (13)
p∈P
subject to
In this formulation, the objective function maximizes the total revenue. Constraint (14) ensure that the delivered
quantities lie between the requested minimum and maximum. Constraint (15) states that delivered quantity of demand
p cannot be larger than the sum of compartment capacities in which it is loaded. By constraint (16), two distinct
demands cannot be loaded in the same compartment.
This model is used to check the feasibility of each route with respect to a given truck and to obtain an optimal
load by maximizing the corresponding revenue. Once the delivered quantities are known, one can compute the service
time of each visited station and the profit rk for route r and truck k, which is equal to the difference between the
924 F. Cornillier et al. / Computers & Operations Research 36 (2009) 919 – 935
revenue generated by the delivered quantities and the route travel cost computed as the sum of the corresponding cij .
By convention, we set rk = −∞ if truck k is unable to deliver the requirements of route r.
Since the aim is to select a subset of feasible routes and to determine their optimal truck assignments and schedules,
we must compute for each of these a time interval within which any departure time from the terminal minimizes the
total duration including service time and waiting time, if any. Given a route r delivering all stations of the subset
Vr ⊆ V , we index its stations according to the sequence in which they must be visited. Denote by Vr∗ = Vr ∪ {0} the
set of vertices including the terminal and all stations of route r. We check whether we can satisfy the time window
constraint of each station and if so, we determine the departure window [r , r ] for which the sum of waiting times
is minimal. Savelsbergh [19] has proposed an algorithm for the determination of r . It computes a forward time slack
which indicates by how much the departure time of a vertex can be delayed without making the route infeasible, and
iteratively computes the waiting times at each vertex. In our case, we need to determine the time interval [r , r ] within
which any departure time from the terminal minimizes the total duration. We then have to compute the sum wr of all
its necessary waiting times in order to determine its duration r . First, for each vertex i, we define a normalized time
window [ai , bi ] representing the time interval within which the truck should leave the terminal in order to satisfy the
time window constraint of station i if waiting times were not allowed:
i−1
i−1
i−1
i
[ai , bi ] = ai − tu,u+1 − su , bi − tu,u+1 − su . (18)
u=0 u=0 u=0 u=0
If waiting times were not allowed, the route would be feasible if and only if the intersection of all normalized time
windows was not empty. However, waiting times may be needed in our problem and a new feasibility criterion is given
by Proposition 1. The proofs of all propositions are given in Appendix.
When a route r is feasible, we compute the sum wr of all its minimal waiting times by means of Proposition 2. This
waiting time is added to the sum of travel and service times in order to arrive at the route duration r .
Finally, we need to determine a departure window for the route r from the terminal, such that the time window
constraint of each station is satisfied.
Proposition 3. If a route r is feasible, its departure time d0 from the terminal has a time window [r , r ] which
minimizes the total waiting time, where
and
Note that starting route r at any time before r only increases the embedded waiting times and does not allow the
truck to return to the terminal earlier.
F. Cornillier et al. / Computers & Operations Research 36 (2009) 919 – 935 925
Proposition 1 is illustrated in Fig. 2 where b1 < max{a1 , a2 , a3 } = a2 ; in this case there is no feasible solution. In
Fig. 3, max{a1 , a2 , a3 } < min{b1 , b2 , b3 } and consequently, as implied by Propositions 2 and 3, wr = 0 and r r .
Fig. 4 shows the case where wr > 0 and r = r . In this case, the truck should leave the terminal exactly at r in order
to minimize its waiting time wr .
Knowing the total minimum waiting time of a route r, we are able to compute its total duration r , including travel
and service times:
n−1
r = wr + (tu,u+1 + su+1 ) + tn,0 . (23)
u=0
When several routes visit the same subset of stations but in a different order, we only retain Pareto optimal routes.
More precisely, given two routes r1 and r2 , both visiting the same set of stations with the same truck, route r1 can be
eliminated if 1 2 , 1 2 , 1 2 , and 1 2 .
4. Heuristics
As the number of stations grows, the problem becomes more difficult to solve, even if there are fewer candidate
routes, since the number of vehicles increases proportionally. In practice, it is often difficult to solve problems to
optimality with more than 15 stations. For larger problems, we propose two heuristic procedures in which we solve
the proposed mathematical model with only a preselected subset of all feasible routes instead of the whole set. The
aim of the first heuristic is to reduce the number of routes by preselecting a subset of all feasible arcs of Gk . It can
be applied to relatively small instances. In the second heuristic, we decompose the geographical space in order to
iteratively construct a candidate set of locally optimal routes which is then used to solve the global problem. This
heuristic is more appropriate for larger instances.
926 F. Cornillier et al. / Computers & Operations Research 36 (2009) 919 – 935
The first heuristic preselects an arc subset Ak of Ak . In the first version of the heuristic, this subset includes the arcs
linking each vertex to its nearest neighbours, where is a parameter to be determined. Note that is at most n − 1
because a station has n − 1 neighbours. In the second version, the arc subset includes all arcs of at most successive
minimum spanning tree, where is a parameter; this way of reducing the arc set is inspired by the work of Helsgaun
[20,21] for the Traveling Salesman Problem and of Toth and Vigo [22] for the Vehicle Routing Problem. The procedure
first generates a minimum spanning tree on the initial graph. It then removes the selected edges and repeats itself as
long as the graph is connected. The value of can be at most
n/2 because the spanning trees sequential generation
procedure uses n−1 of the n(n−1)/2 potential edges for each tree. In addition to these selected arcs, all arcs linking the
terminal to customers in both directions are included. Nearest neighbours and minimum spanning trees are not based
on distances, but on travel times. Since minimum spanning trees are constructed on undirected graphs, we construct
them while setting the value of each edge equal to the minimum travel time for each of the two directions. All routes
are generated from each Ak as described in Section 3 and the optimal routes selection is made by solving the proposed
PSRPTW model.
If the parameters or are too small, the problem may be infeasible. On the other hand, for large instances and larger
values of the parameters, the number of generated routes can become prohibitive and make the formulation unsolvable.
We found that this heuristic becomes inefficient as soon as n reaches 20 when tested on randomly generated instances.
However, a real case experiment where 42 stations need to be replenished suggests that the arc preselection heuristic
can be efficiently used on larger real instances.
To solve larger instances, we propose a decomposition of the geographical space into sectors. Since any given decom-
position would be arbitrary, we consider successive random partitions. Each generated random sector s corresponds to
a different subset of stations V s ⊂ V . The decomposition is such that no sector appears in two different partitions. The-
oretically, any partition of V could be used, but since in practice distances are Euclidean, we have only used partitions
induced by non-overlapping sectors centred at the terminal. Once the partitions are generated, the problem associated
with each sector is solved exactly as a separate PSRPTW and, each time, the corresponding optimal routes are added
to the preselected route set. Thus, the idea of this decomposition scheme is to generate a set of locally optimal routes
which will be used to define the decision variables of the whole problem model.
To solve the subproblem associated with a sector V s , we generate all its feasible routes using a restricted fleet in which
K|V s |/n trucks are randomly chosen from the whole fleet. Each time a subproblem is solved, we add all of its
optimal routes not already included to the set of preselected routes, up to the given limit of routes.
5. Computational results
The two heuristics just described were coded in Objective-C and used the CPLEX 10.0 Callable Library. They were
run on dual AMD Opteron 250 processors 2.4 GHz computers with Linux operating system. We present two sets of
928 F. Cornillier et al. / Computers & Operations Research 36 (2009) 919 – 935
Table 1
Daily sales distribution
1 0–1350 21.7
2 1350–2700 22.6
3 2700–5400 29.8
4 5400–8100 13.6
5 8100–10 800 6.2
6 10 800–16 200 6.1
Table 2
Underground tank typical configurations as a function of daily sales
0–2700 1 25 000
2 15 000
3 15 000
2700–8100 1 35 000
2 22 700
3 25 000
Table 3
Configurations of the tank-trucks
tests. We have first solved a set of randomly generated 15 stations instances in order to evaluate the performance of
the arc preselection and route preselection heuristics. The route preselection heuristic was then assessed on randomly
generated instances with 50 stations. Finally, we solved a real case where 42 stations need to be replenished. All
instances are available on the website http://www.fsa.ulaval.ca/personnel/renaudj/Recherche/PSRPTW.
We have generated test instances similar to real-life problems using a set of real data extracted from Malépart et
al. [23]. From these data, we have determined a discrete random distribution on six categories of stations in function
of their daily sales (Table 1). Station categories are randomly drawn from this distribution and daily sales are then
randomly determined within the lower and upper limits of the obtained categories.
The sales of regular, intermediate, and super petrol grades are 76%, 7%, and 17% of the total, respectively. Because
daily sales and underground tank capacities are generally correlated, we present in Table 2 the typical observed tank
capacities as a function of the total daily sales. For our test instances, the underground tanks configuration for each station
is randomly selected among these three typical configurations. However, the probability of choosing the configuration
corresponding to the station daily sales is 80% and the probability of choosing each of the other configurations is 10%.
We consider three tank-truck configurations among those commonly used in practice (Table 3). The terminal co-
ordinates are (50,50) for all instances, while stations coordinates are integer and randomly drawn from a uniform
distribution in the 100 km × 300 km Euclidean space. The fleet compositions as a function of the problem size are
F. Cornillier et al. / Computers & Operations Research 36 (2009) 919 – 935 929
Table 4
Fleet compositions
15 2 2 1 5
50 8 5 5 18
Table 5
Per litre revenue as a function of the distance from terminal
0–50 $0.004
50–100 $0.007
100–150 $0.010
150–200 $0.013
> 200 $0.016
given in Table 4. In all tests, the number of stations that can be visited in a same route is limited to four, except in tests
in which we evaluate the impact of this limit.
We have used the following data for all instances:
driver wage per regular working hour: $15.00;
overtime hourly cost: $30.00;
variable travel cost per kilometre: $1.70;
average travel speed (km/h): 60;
truck loading time (min): 15;
station delivery time (min): 30;
daily regular working hours: 9;
daily maximum overtime hours: 3.
The revenue per delivered litre is a function of distance from the terminal. Rates are given in Table 5.
In this section, we study the performance of the proposed heuristics. We first analyse the results given by the arc
preselection heuristic used. We then evaluate the impact of limiting the number of delivered stations per route. Finally,
we analyse the performance of the route preselection heuristic. Average results over 20 instances of 15 or 50 stations
are given.
Table 6
Average results as a function of the number of nearest neighbours
1 2 3 4
3 299 2067 568 485 4743 41.36 3.46 10.75 70.7 20.5 7.4 1.4 504.24 13 40
4 565 2051 564 712 4711 41.18 3.35 10.65 69.5 21.6 7.5 1.4 505.69 17 61
5 888 2052 564 705 4713 41.21 3.34 10.65 69.5 21.6 7.5 1.4 506.18 18 92
6 1271 2052 564 705 4713 41.21 3.34 10.65 69.5 21.6 7.5 1.4 506.18 18 155
All 3060 2047 563 282 4709 40.93 3.51 10.60 68.9 22.2 7.5 1.4 509.94 20 350
, number of nearest neighbours; #CR, number of preselected routes; Dist, distance travelled; Qty, delivered quantity in litres; Rev, revenue; RT,
regular hours used; OT, overtime hours used; #Rtes, number of selected routes in the solution; %Rtes(s ), percentage of routes visiting s stations;
Profit, profit corresponding to the best solution; #O, number of times the optimal solution has been obtained; CPU, computing time in seconds; all,
all arcs are selected.
Table 7
Average results as a function of the number of minimum spanning trees
1 2 3 4
3 621 2052 564 705 4713 41.21 3.34 10.65 69.5 21.6 7.5 1.4 506.18 18 54
4 1317 2052 564 705 4713 41.21 3.34 10.65 69.5 21.6 7.5 1.4 506.18 18 156
5 2080 2050 564 530 4714 41.04 3.47 10.65 69.5 21.6 7.5 1.4 509.06 19 243
6 2589 2050 564 530 4714 41.04 3.47 10.65 69.5 21.6 7.5 1.4 509.06 19 287
All 3060 2047 563 282 4709 40.93 3.51 10.60 68.9 22.2 7.5 1.4 509.94 20 350
Table 8
Average results as a function of the maximal number of stations per route
1 2 3 4
2 140 2223 585 279 5025 42.67 4.83 11.05 64.3 35.7 – – 460.15 5 182
3 807 2062 564 979 4732 41.44 3.27 10.65 68.5 22.1 9.4 – 507.01 17 113
4 3060 2047 563 282 4709 40.93 3.51 10.60 68.9 22.2 7.5 1.4 509.94 20 350
This procedure uses 30.6% less than the CPU time needed to obtain an optimal solution. From Tables 6 and 7, we can
see that there is no tangible performance difference between the two versions of the arc preselection heuristic for a
similar number of candidate routes.
Table 9
Average results as a function of the number of preselected routes for the 15 stations instances
1 2 3 4
45 2077 564 455 4752 41.15 3.80 10.65 68.1 23.9 7.0 0.9 490.56 11 131
90 2082 567 680 4764 41.25 3.81 10.70 68.2 24.3 6.5 0.9 491.08 12 241
135 2066 564 765 4742 41.08 3.69 10.65 69.5 21.6 7.5 1.4 502.72 14 308
180 2070 568 161 4753 41.25 3.60 10.70 69.6 22.0 7.0 1.4 507.32 18 472
225 2070 568 161 4754 41.25 3.60 10.70 69.6 22.0 7.0 1.4 508.54 19 579
270 2070 568 161 4754 41.25 3.60 10.70 69.6 22.0 7.0 1.4 508.54 19 792
315 2070 568 161 4754 41.25 3.60 10.70 69.6 22.0 7.0 1.4 508.54 19 954
3060 2047 563 282 4709 40.93 3.51 10.60 68.9 22.2 7.5 1.4 509.94 20 350
Table 10
Average results as a function of the number of generated routes for the 50 stations instances
1 2 3 4
150 7003 1 863 858 16 075 141.27 9.66 34.55 60.3 34.6 5.1 0.0 1 760.54
300 6862 1 849 960 15 843 138.91 9.57 34.20 60.1 33.9 5.7 0.3 1 807.58
450 6686 1 830 191 15 531 135.64 9.81 33.80 60.5 32.0 6.7 0.9 1 835.91
600 6632 1 818 840 15 438 134.62 9.86 33.55 61.1 30.1 7.5 1.3 1 848.42
750 6542 1 806 543 15 256 133.81 9.11 33.30 61.0 29.6 7.8 1.7 1 853.71
900 6571 1 808 900 15 307 134.81 8.60 33.35 61.2 29.4 7.8 1.6 1 856.91
We have tested the arc preselection heuristic on a real-life instance arising in eastern Canada with a depot located in
Quebec City. The delivery data correspond to 42 stations on a single regular day. We used the drivers’ worksheets to
determine the routes and delivered quantities of each product for that day. We define the profit rk of route r performed
932 F. Cornillier et al. / Computers & Operations Research 36 (2009) 919 – 935
Best solution
MIP best bound
1880
1860
Average profit
1840
1820
1800
1780
1760
150 300 450 600 750 900
Number of generated routes
Fig. 6. Average profits as a function of the number of generated routes for the 50 stations instances.
Table 11
Time windows repartition
Number of stations ai bi
11 0h00 24h00
1 4h30 23h00
1 6h00 22h00
4 6h00 23h00
2 6h00 24h00
1 6h30 23h00
1 6h30 24h00
2 7h00 18h00
1 7h00 21h30
6 7h00 22h00
5 7h00 23h00
7 8h00 18h00
by truck k as the negative value of its distance in kilometres, and we set both and to zero which enable us to directly
apply models (1)–(12) and the heuristic developed in this study. The time windows [ai , bi ] for servicing stations have
been obtained by the company and are displayed in Table 11.
The manual solution obtained by the company dispatcher (which includes routing and loading of the products) has
a length of 7827 km and is composed of 16 routes visiting two stations, and 10 routes visiting a single station each. We
solved this problem with the heuristic based on arc preselection presented in Section 4.1. Table 12 details the results
obtained by the company and by the heuristic when the arc preselection is done both with the nearest neighbours and
with the successive minimum spanning trees. In comparison, solving this instance exactly with CPLEX requires the
generation of all the 17 720 feasible routes and more than 3.5 hours of computing time, including 3 hours for the route
generation alone.
The best results are obtained with the arc preselection procedure based on the minimum spanning tree, irrespective of
the value. In this case, the heuristic produces within a minute an optimal solution of 6108 km, and an improvement of
22% (1719 km) over the solution obtained manually. Not only is this solution shorter, but more products are loaded into
the vehicle compartments. For the minimum spanning tree with = 3, the vehicles delivered 1 184 000 litres, 16 500
F. Cornillier et al. / Computers & Operations Research 36 (2009) 919 – 935 933
Table 12
Detailed solution of the real case
1 2 3 4
litres more than the manual solution, which also confirms that combining a good loading with a good vehicle routing
is not easy for a dispatcher. The quantity delivered per kilometre is 193.8 litres with the heuristic, compared to 149.2
litres for the manual solution. It is worth observing that in the heuristic solution routes visiting three and four stations
are used, which enables a reduction in the total number of routes from 26 to 23, while still making larger deliveries.
We did not test the route preselection heuristic on the real case because we only had the distance matrix as input
data, as opposed to the station coordinates which are necessary to generate sectors.
6. Conclusions
We have proposed a mathematical formulation of the petrol stations replenishment problem with time windows.
Based on this formulation, an arc preselection heuristic was developed in order to reduce the number of candidate
routes. Computational results show that this heuristic reduces computation time while yielding near-optimal solutions.
For larger instances, a decomposition heuristic based on route preselection was proposed. On small instances, it was
compared to an exact algorithm. Computational results show that this decomposition heuristic succeeds in finding
near-optimal solutions while using a very small proportion of all feasible routes. Moreover, the effect of generating
more routes was analyzed on larger instances.
Acknowledgements
This work was partially supported by the Canadian Natural Sciences and Engineering Research Council (NSERC)
under Grants OGP0036509, OGP0039682, and OGP0172633. This support is gratefully acknowledged. Thanks are
due to José Eduardo Pécora Junior, to two referees, and the editor for their valuable comments.
Appendix
i i
Proof of Proposition 1. Let Ti = i−1 u=0 tu,u+1 , Si = u=0 su , and Yi = u=0 yu , where yi 0 denotes a minimal
waiting time between stations i and i + 1. Then ai = ai − Ti − Si−1 and bi = bi − Ti − Si . The route is feasible if and
only if for each station i there exists a departure time, denoted by di ∈ R, such that
which is equivalent to
But as di = d0 + Ti + Si + Yi , we have
Then, the route is feasible if and only if there exists d0 ∈ R and Yi 0 such that for all i ∈ Vr∗ :
For all (i, j ) ∈ (Vr∗ )2 such that j < i, we need to show that there exists a sum of minimal non-negative waiting times
between stations j and i, and a departure time d0 ∈ R from the terminal such that
Proof of Proposition 2. We have shown in the proof of Proposition 1 that a route is feasible if and only if there
exists for all vertices i and j > i a non-negative sum of waiting times Yj − Yi between i and j within the interval
[aj − bi , bj − ai ] (Eq. (34)). Then there exists a non-negative sum of waiting times w = Yn which can be decomposed
as follows:
w = Yn (36)
= (Yj2 − Y0 ) + (Yj1 − Yj2 ) + (Yn − Yj1 ), (37)
and
wmin = max∗ {ai } − min∗ {bi } (41)
i∈Vr i∈Vr
= wr . (42)
When maxi∈Vr∗ {ai } − mini∈Vr∗ {bi } 0, there exists a feasible time departure from the terminal which is common to
all stations without waiting time. In this case, we have wr = 0.
Proof of Proposition 3. Since waiting time always delays the return to the terminal even if departure occurs time
units before r , it is always preferable to start from the terminal as late as possible, i.e. at d0 = r = mini∈Vr∗ {bi }.
Any other departure time r − just makes the route duration longer. Then, if waiting is needed, we have r =
maxi∈Vr∗ {ai } − wr = r .
References
[1] Brown GG, Graves GW. Real-time dispatch of petroleum tank trucks. Management Science 1981;27:19–32.
[2] Brown GG, Ellis CJ, Graves GW, Ronen D. Real-time, wide area dispatch of mobil tank trucks. Interfaces 1987;17:107–20.
[3] Malépart V, Boctor FF, Renaud J, Labilois S. Nouvelles approaches pour l’approvisionnement des stations d’essence. Revue Française de
Gestion Industrielle 2003;22:15–31.
[4] Taqa allah D, Renaud J, Boctor FF. Le problème d’approvisionnement des stations d’essence. APII-JESA Journal Européen des Systèmes
Automatisés 2000;34:11–33.
[5] Cornillier F, Boctor FF, Laporte G, Renaud J. An exact algorithm for the petrol station replenishment problem. Journal of the Operational
Research Society, 2007, doi:10.1057/palgrave.jors.2602374.
[6] Avella P, Boccia M, Sforza A. Solving a fuel delivery problem by heuristic and exact approaches. European Journal of Operational Research
2004;152:170–9.
[7] Cornillier F, Boctor FF, Laporte G, Renaud J. A heuristic for the multiperiod petrol station replenishment problem. European Journal of
Operational Research, 2007, doi:10.1016/j.ejor.2007.08.016.
[8] Johnson DB. Finding all the elementary circuits of a directed graph. SIAM Journal on Computing 1975;4:77–84.
[9] Christofides N, Mingozzi A, Toth P. Loading problems. In: Toth P, Christofides N, Sandi C, editors. Combinatorial optimization. Chichester:
Wiley; 1979. p. 339–69.
[10] Yuceer U. A multi-product loading problem: a model and solution method. European Journal of Operational Research 1997;101:519–31.
[11] Smith JC. A genetic algorithm approach to solving a multiple inventory loading problem. International Journal of Industrial Engineering
2003;10:7–16.
[12] Bukchin Y, Sarin SC. Discrete and dynamic versus continuous and static loading policy for a multi-compartment vehicle. European Journal of
Operational Research 2006;174:1329–37.
[13] Fagerholt K, Christiansen M. A combined ship scheduling and allocation problem. Journal of the Operational Research Society 2000;51:
834–42.
[14] Fagerholt K, Christiansen M. A travelling salesman problem with allocation, time window and precedence constraints—an application to ship
scheduling. International Transactions in Operational Research 2000;7:231–44.
[15] Oppen J, LZkketangen A. A tabu search approach for the livestock collection problem. Computers & Operations Research, 2007,
doi:10.1016/j.cor.2007.02.021.
[16] Eglese RW, Mercer A, Sohrabi B. The grocery superstore vehicle scheduling problem. Journal of the Operational Research Society 2005;56:
902–11.
[17] Van der Bruggen L, Gruson R, Salomon M. Reconsidering the distribution structure of gasoline products for a large oil company. European
Journal of Operational Research 1995;81:460–73.
[18] Bausch DO, Brown GG, Ronen D. Scheduling short-term marine transport of bulk products. Maritime Policy and Management 1998;25:
335–48.
[19] Savelsbergh MWP. The vehicle routing problem with time windows: Minimizing route duration. ORSA Journal on Computing 1992;4:
146–54.
[20] Helsgaun K. An effective implementation of the Lin-Kernighan traveling salesman heuristic. Datalogiske Skrifter No. 81, Roskilde University,
1998.
[21] Helsgaun K. An effective implementation of the Lin-Kernighan traveling salesman heuristic. European Journal of Operational Research
2000;126:106–30.
[22] Toth P, Vigo D. The granular tabu search and its application to the vehicle routing problem. INFORMS Journal on Computing 2003;14:
333–46.
[23] Malépart V, Renaud J, Boctor FF, La distribution des produits pétroliers au Québec: État de la situation. Technical Report, Université du Québec;
1998.