Intl. Trans. in Op. Res. 0 (2024) 1–20
DOI: 10.1111/itor.13572
INTERNATIONAL
TRANSACTIONS
IN OPERATIONAL
RESEARCH
Districting in last-mile delivery with stochastic customers
Maria Elena Brunia,b , Edoardo Faddac,∗
, Stanislav Fedorovd and Guido Perbolib,e
a
Department of Mechanical, Energy and Management Engineering, Università della Calabria, Cosenza, Italy
b
CIRRELT, Montreal, Canada
c
Department of Mathematical Sciences “Giuseppe Luigi Lagrang”, Politecnico di Torino, Turin, Italy
d
Department of Control and Computer Engineering, Politecnico di Torino, Turin, Italy
e
Department of Management and Production Engineering, Politecnico di Torino, Turin, Italy
E-mail: mariaelena.bruni@unical.it[Bruni]; edoardo.fadda@polito.it[Fadda]; stanislav.fedorov@polito.it[Fedorov];
guido.perboli@polito.it[Perboli]
Received 16 January 2024; received in revised form 12 October 2024; accepted 12 October 2024
Abstract
Due to the peculiarities of city streets, last-mile logistics is typically organized using territory-based routing
approaches, which divide the city into a set of districts and assign drivers to deliver in one or more of them.
This allows drivers to develop a deep understanding of the characteristics of each district, and clients benefit
from consistent service. However, these advantages must be carefully weighed against the flexibility of daily
customer assignments, which enable planners to maximize driver utilization and minimize routing costs. In
this paper, we propose a new holistic framework for defining districts, considering the impact on the quality
of logistics decisions and fleet capacity usage. Specifically, we address how districting decisions affect the demand distribution within each district. Computational experiments on both simulated and realistic instances
demonstrated a significant reduction in costs compared to benchmark techniques.
Keywords: districting; last-mile delivery; city logistics; capacity management; demand uncertainty
1. Introduction
Last-mile logistics is known for being the most costly and challenging segment of the delivery
process due to both demand variability and the number of companies involved (Perboli et al.,
2021a). In this competitive market, companies split the urban area into a few geographical regions
(called districts) and assign them to a set of drivers. This is beneficial from the drivers’ point of
view since experienced drivers use shortcuts, know about traffic light intervals, anticipate road or
traffic problems, and find parking spaces more easily, which leads to reduced travel and service
∗
Corresponding author.
Edoardo Fadda and Stanislav Fedorov contributed equally to this work.
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and
reproduction in any medium, provided the original work is properly cited.
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
times (Schneider et al., 2015; Li et al., 2023). Moreover, in a delivery context, this enables service
consistency and builds trust-based relationships between customers and their assigned drivers
(Kovacs et al., 2013; Liu et al., 2023).
Usually, papers focus on constructing districts considering geographical city regions, route accessibility, or predetermined postal codes (Ducret et al., 2016). Then, they assign the vehicles to the
districts considering customers’ demand (Bender et al., 2020). Instead, in this paper, we consider
uncertain customers, that is, when we decide on the districts, we do not know the customer’s
position or the quantity they will require. Applying district decisions in this stochastic setting
cannot be done just by considering geographical aspects and disregarding the effect of district
definition on demand uncertainty (thus on the final decision). When defining a large district, the
associated demand is usually characterized by less variance, but it is more challenging to manage
because of the quantity to handle. On the other hand, small districts have demand easier to handle
but with a greater variance. In this paper, we aim to fill this gap by proposing a model whose
goal is to satisfy the demand at a minimum cost while considering the effect of districts on the
demand. In particular, we focus on an urban city divided into a set of small geographical areas
called basic units. Typical examples of basic units are customers’ streets or zip code areas. Our
goal is to aggregate them in contiguous and compact areas (called districts) and manage a fleet
of vehicles to satisfy their demand. The problem can be cast as a two-stage stochastic model in
which, in the first stage, we have to decide the districts and assign the fleet, while in the second,
the customer demand is realized, and the fleet has to satisfy the demand. Since merging basic
units affects the statistical model of the district demand, the stochastic problem is characterized
by endogenous uncertainty. These problems are difficult to solve exactly, hence we propose a
heuristic approach made of two parts: An adaptive large neighborhood search (ALNS) to define
the districts and a two-stage stochastic problem to solve the resulting uncertain logistic problem.
The ALNS defines the districts so that the results of the second problem are optimized. Instead,
given a district definition and the resulting scenario tree, the latter problem assigns drivers to
the districts and satisfies the demand for each district while minimizing the total fleet, routing,
working time, and outsourced capacity costs. We call this problem the district capacity assignment
problem (DCAP).
The contributions of the paper are
• to formulate a new general model for the districting problem with stochastic customers in the
contest of last-mile logistics. The model takes into account several real characteristics (routing,
usage of third-party logistics, etc.) and, more importantly, presents the problem from an endogenous stochastic point of view.
• to introduce a solution method to solve the problem in a reasonable amount of time, providing
good solutions.
The paper is organized as follows: Section 2 describes the current state of literature related to
this problem. Section 3 presents the methodological details of the techniques proposed in the study,
and Section 4 reports the computational results on both a synthetic instance and a real case study.
Finally, Section 5 outlines the conclusions and future work.
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
2
3
2. Literature review
Districts are particularly useful in providing person-oriented service consistency under fluctuating
demand and vehicle-related constraints (Wong and Beasley, 1984; Kovacs et al., 2013). In this section, we describe the existing literature focusing on the papers closer to our setting (we refer to
Kalcsics and Ríos-Mercado (2019) and Ríos-Mercado (2020) for a general overview of districting
problems). Although the methodology developed is general, we concentrate on the logistic application. Therefore, following the classification in Kalcsics and Ríos-Mercado (2019), we narrow the
literature review to distribution districting.
Essentially, there are two ways to do districting: Either by using geometrical approaches (Daganzo, 1984a, 1984b; Newell and Daganzo, 1986; Newell, 1986; Ouyang, 2007; Carlsson, 2012)
or by constructing districts by agglomerating basic units (Haugland et al., 2007; Schneider et al.,
2015; Bender et al., 2020). Given that this paper addresses the latter setting, we will concentrate our
focus there.
One of the most important papers in this branch is Schneider et al. (2015), where the author’s
goal is to minimize routing costs. There, the authors focus on territory-based routing approaches
to achieve high service consistency. They point out that the reduction of routing flexibility to preserve consistency, together with demand uncertainty, yields low efficiency in terms of total traveled
distance. They found that consideration of geographical aspects in the districting is paramount
for generating high-quality territories, whereas explicitly incorporating time window characteristics and historical demand data does not lead to a perceptible improvement of the solution quality.
Moreover, they build the districts based on spatial, temporal, and historical information using a
modular approach, selecting a set of seed customers and iteratively adding further customers to the
seeds until the desired size is created. Approaches similar to the one in Schneider et al. (2015) can
be seen in Ouyang et al. (2023). Nevertheless, they do not tackle demand uncertainty.
Demand uncertainty has been addressed by several studies in different ways, such as two-stage
models, robust ones, models with chance constraints, etc. We will focus on the former and refer to
Kalcsics and Ríos-Mercado (2019) and Ríos-Mercado (2020) for the latter ones.
Two-stage models consider a first stage dealing with the districting definition and a second stage
containing the recourse action to take when the uncertain parameter (usually demand) becomes
known. The first study in this field is Haugland et al. (2007), where the authors deal with the
design of districts for vehicle routing problems with stochastic demands. In their study, customers’
positions are known, but their demands are uncertain. As a result, some vehicle routes may violate
the capacity constraints. They proposed a tabu search heuristic to address this problem.
In contrast, Lei et al. (2012) further generalize the problem by considering unknown also customers’ positions. They introduce the vehicle routing and districting problem with stochastic customers, and they use the Beardwood–Halton–Hammersley formula to approximate the expected
routing cost for each district (Beardwood et al., 1959). The same modeling framework has been
used by Lei et al. (2016) where the authors, consider a multi-objective optimization in a dynamic
and stochastic setting.
More recently, in Bender et al. (2020), the authors consider a heterogeneous set of resources, that
is, different drivers and different vehicles and assign them to a set of customers requiring service. In
the second stage, they try to balance between service consistency and the impossibility of having a
strictly fixed assignment due to daily demand fluctuations and resource constraints. This study is
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
close to the one considered here, but they do not consider either the impact of districting on scenario
generation and, thus, on the final decisions or the routing decisions in the mathematical model.
In conclusion, the present paper further generalizes both Sandoval et al. (2022) and Bender et al.
(2020) by considering the impact that the definition of the districts has on the stochasticity of the
problem and, thus, on the final solution.
3. Mathematical model and methodology
Let us consider a set of basic units B = {1, . . . , B}. Each basic unit b contains a set of customers
whose position and delivery demand (measured in weight) are random. The goal of districting is to
define a partition of the set of basic units. In other words, calling D = {1, . . . , D} the set of districts,
we must have that each district d ∈ D is a connected subset of B, with a demand computed as the
sum of the demand of each basic unit that composes it (∪d∈D ). We assume that the demand in
each basic unit is distributed according to a normal distribution. Therefore, the demand for the
districts is also normally distributed. Let us define Xb1 ∼ N (μb1 , σb21 ) and Xb2 ∼ N (μb2 , σb22 ) to be
the random variables defining the demand in two basic units b1 , b2 ∈ B. Merging them in a bigger
district led to an equivalent demand
Xb1 + Xb2 ∼ N (μb1 + μb2 , σb21 + σb22 + 2ρσb1 σb2 ),
(1)
where ρ ∈ [−1, 1] is the correlation coefficient between Xb1 and Xb2 . Therefore, the standard deviation of Xb1 + Xb2 is
σb21 + σb22 + 2ρσb1 σb2 ≤ σb1 + σb2 ,
where the inequality stems from the condition ρ ≤ 1. Therefore, grouping districts reduces uncertainty unless ρ is 1. From this point of view, the effect on districting is the same as the one of
consolidation centers in supply chains (Brandimarte and Zotteri, 2007).
Grouping basic units into districts modifies the demand distribution of the districts, thus leading
to a stochastic problem with endogenous uncertainty that is not tractable in an exact way for a
reasonable size instance. Therefore, heuristics are needed. As described above, we split the problem
into two subparts: An ALNS to define the districts and a two-stage stochastic problem (the socalled DCAP) to solve the resulting logistic problem. Thus, in the following, we first present the
DCAP problem in Section 3.1 and our ALNS in Section 3.2, respectively.
3.1. District capacity assignment problem
We model the DCAP as a two-stage stochastic model where we approximate demand uncertainty
using a set of scenarios S = {1, . . . , S} each one with an associated probability π s . Each scenario
represents a possible state of the world, that is, for each scenario, we have a different realization
of the demand in terms of the position of the customers and quantity of demand (expressed in
volume) (Birge and Louveaux, 2011). Therefore, they represent possible days of activity.
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
4
5
We call K = {1, . . . , K} the set of vehicles available. Each vehicle is uniquely associated with
a driver; hence, in the following, we use these terms interchangeably. Moreover, each vehicle is
characterized by a fixed usage cost ck , a capacity vk , and the hourly cost of the drivers equal to qk .
This cost is valid if the driver works less than Tkmax hours. If this limit is exceeded, each extra hour is
paid qk Qk , with Qk > 1 an extra percentage cost. Finally, each driver cannot work more than emax
hours (logistic company regulations impose this limit).
Each vehicle starts and ends its route from the depot. The set of districts D together with the
.
depot is the set of nodes visited by the vehicles. In the formula, D̄ = D ∪ {0}. These nodes are
connected by a set of arcs A ⊆ D̄ × D̄ that defines the graph G(D̄, A).
In scenario s ∈ S, each district d ∈ D has a demand equal to Vds and it requires a time Tds to
be served (this time accounts for both internal travel times and delivery time). Moreover, each arc
(d1 , d2 ) ∈ A requires a time tds 1 d2 to be traversed.
It is worth noting that both Tds and tds 1 d2 are stochastic since they depend on the number of
customers and their position inside the districts.
If the drivers are not able to satisfy the deliveries, an external logistic service is used, which extra
cost is Cd per unit of delivery in district d.
The model uses the following decision variables:
• yk = 1 if vehicle k ∈ K is used, and 0 otherwise.
• xkd = 1 if the vehicle k ∈ K is assigned to district d ∈ D.
• wsk
d1 d2 = 1 if the vehicle k traverse arc (d1 , d2 ) ∈ A in scenario s ∈ S.
• θds is the extra capacity required to serve the demand in the district d ∈ D in scenario s ∈ S.
• esk is the extra working time of the driver k ∈ K in the realization s ∈ S.
The summary of the outlined parameters’ notation is provided in Table 1.
Using the above notation, the mathematical model for the DCAP is
⎡
⎛
⎞⎤
s ⎠⎦
ck yk +
π s⎣
Cd θds +
qk ⎝
Tds xkd +
tds 1 d2 wsk
min
,
d1 d2 + Qk ek )
k∈K
s∈S
d∈D
k∈K
s.t.
d∈D
xkd = yk ,
(2)
(d1 ,d2 )∈A
∀d ∈ D,
(3)
k∈K
vk xkd + θds ≥ Vds ,
∀ d ∈ D, ∀s ∈ S,
(4)
(Vds − θds )xkd ≤ vk ,
∀ k ∈ K, ∀s ∈ S,
(5)
k∈K
d∈D
tds 1 d2 wsk
d1 d2 +
(d1 d2 )∈A
d1 ∈D
Tds xkd ≤ Tkmax + esk ,
∀k ∈ K ∀s ∈ S,
(6)
d∈D
wsk
dd2 ≥ xkd2 ,
d∈D
wsk
d1 d2 =
wsk
d2 d1 ,
∀k ∈ K, ∀d2 ∈ D, ∀s ∈ S,
∀k ∈ K, ∀d2 ∈ D, ∀s ∈ S,
(7)
(8)
d1 ∈D
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
Table 1
Notation used in the DCAP model
Notation
Meaning
K
k∈K
ck
vk
qk
Tkmax
Qk
D
d ∈D
A
s∈S
Vds
Tds
tds1 d2
Cd
yk
xkd
wsk
d1 d2
θds
esk
Set of available vehicles.
Index indicating vehicles
Usage cost of the vehicle k
Capacity of the vehicle k
Hourly cost of a driver for the vehicle k
Maximal number of working hours on vehicle k
Percentage cost of extra working hours for vehicle k. Qk > 1.
Set of districts to be visited for vehicles.
Index indicating the district
Set of arcs connecting adjacent districts along with the depot {0} node.
Scenario of stochastic parameters realization.
Value of the demand of the district d in scenario s
Time to serve the district d in scenario s, hours.
Time to drive from district d1 to d2 in scenario s, hours.
Cost to serve the unit of demand with third-party services in district d
Binary decision variable indicating if vehicle k is used
Binary decision variable assigning vehicle k to district d
Binary decision variable indicating if vehicle k passes from district d1 to d2 in scenario s
Continuous decision variable indicating extra capacity used in district d in scenario s
Continuous decision variable indicating extra working time for vehicle k in scenario s
wsk
d1 d2 ≤ |R| − 1, ∀R ⊂ D, 2 ≤ |R| ≤ |D| − 1, ∀k ∈ K, ∀s ∈ S,
(9)
d1 ∈R d2 ∈R
yk ∈ {0, 1}, ∀k ∈ K,
esk ∈ [0, emax −Tkmax ], ∀k ∈ K, ∀s ∈ S,
(10)
xkd ∈ {0, 1},
∀k ∈ K, ∀d ∈ D,
(11)
∀k ∈ K, ∀(d1 , d2 ) ∈ A, ∀s ∈ S,
(12)
wsk
d1 d2 ∈ {0, 1},
θds ∈ R+ ,
∀d ∈ D, ∀s ∈ S.
(13)
The objective function (2) aims to minimize the sum of the costs of the vehicles used and the
expected costs of the delivery time plus the eventual extra capacity. Constraints (3) ensure that
the assignment is defined just for vehicles that are used and that at most one vehicle must serve a
given district. Notice that these constraints do not depend on the scenario, thus ensuring service
consistency. Constraints (4) model the capacity usage enforcing that the sum of the capacity of the
vehicle plus the extra capacity θds that can be rented should be greater than the requested capacity
of each district in each scenario. Constraints (5) force the weight of the deliveries to be not greater
than the capacity of the vehicle. This constraint is not linear since it involves the product between
s
∈ R+
the variables θds and xkd . Nevertheless, it can be easily linearized by adding extra variables φkd
such that
s
φkd
≤ Mxkd ,
s
φkd
≤ θds ,
(14)
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
6
7
where M is a sufficiently big constant, a reasonable value is vk . Constraints (6) model the working
time of each driver. Constraints (7) ensure that if a vehicle is assigned to a district, then it must pass
in the district, while constraints (8) and (9) are the subtour elimination constraints, where R is a
possible subset of the set D.
Problem (2)–(13) is an NP-hard problem since it contains the vehicle routing problem as a special case. Therefore, the computational time required to solve this model up to optimality hardly
depends on the number of districts. In the following, we refer to Model (2)–(13), computed given
the district set D as DCAP(D).
3.2. ALNS heuristics for district definition
Given DCAP(D), the districting problem aims to solve
min DCAP(D),
D∈(B)
(15)
where (B) is the set of all possible partitions of the set B defining contiguous regions. To solve
this problem, we implement an ALNS (Ropke and Pisinger, 2006) that, given an initial solution D,
applies destroy and repair operators to improve it and escape from local optima. In other words, the
optimal value of Model (2)–(13) evaluates how much a district solution is good, and we use ALNS
to define the districts.
The initial solution can be defined in several different ways, but it must define a set of connected
districts. We describe some possible algorithms in Section 4.1.
We call the set of destroy operators OD = {di |i = 1, . . . , |D|} and the set of repair operators OR =
{ri |i = 1, . . . , |R|}. Given a valid district definition (i.e., one that defines a partition), the destroy
operators unassign all the basic units from a district. Then, the repair operators reassign them to
one or more districts. We consider the following destroy operators:
• random_destroy: Randomly destroy one district.
• smallest_destroy: Destroy the district having the smallest number of basic units.
• largest_destroy: Destroy the district having the largest number of basic units.
• demand_variance_destroy: Destroy the district having the largest demand variance.
• largest_demand_destroy: Destroy the district having the largest average demand.
• adjacent_destroy: Destroy two random adjacent districts. It first randomly picks a district,
then it randomly picks one of its neighborhoods.
• random_partial_destroy: Destroy the assignment of a set of basic units from the border of a
randomly chosen district. The number of basic units unassigned is chosen randomly.
Apply
the
partial
destroy
procedure
as
in
• largest_partial_destroy:
random_partial_destroy to the district having the largest number of basic units.
Moreover, we consider the following repair operators, all of them act on the unassigned basic
unit:
• closest_distance_repair: Assign the basic units to the closest districts (we measure the distance between basic units and districts considering their centers).
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
• split_basic_units_repair: Randomly choose two basic units and assign them to two new
districts. Then, allocate neighborhood basic units to each newly defined district sequentially from
the remaining free basic units.
• smallest_variance_repair: Assign the basic units to the neighborhood district with minimum
demand variance.
• closest_repair: Assign the basic units to the neighborhood district with the shortest average
visiting time (i.e., S1 Ss=1 Tds ).
• smallest_demand_repair: Assign basic units to the neighborhood district with the smallest
average demand weight, that is, the minimum S1 Ss=1 Vds .
Each operator is associated with a weight ω(di ) ∈ R+ ∀ di ∈ Od and ω(ri ) ∈ R+ ∀ ri ∈ Or for
destroy and repair operators, respectively. These weights are initialized to be all equal and are used
to compute the probability of applying each operator:
P[apply operator di ] =
ω(di )
, P[apply operator ri ] =
d∈OD ω(d )
ω(ri )
.
r∈OR ω(r )
(16)
Starting from D and applying two operators randomly picked according to Equation (16), we
obtain D = r (d(D)), where r ∈ OR and d ∈ OD . To quantify the goodness of D we have to solve
the model DCAP(D ). While the deterministic parameters are the same, we compute the solution of
both DCAP(D ) and DCAP(D) using the same set of scenarios. Each scenario is characterized by the
position of the customers and the volume of demands. The sum of the weights of the deliveries in
a district defines Vds . Instead, the time tds 1 d2 is computed as the time to move from the barycenter of
all the customers in d1 and the barycenter of all the customers in d2 . Moreover, Tds is computed as
the travelling salesperson problem visiting all the customers in d.
Since DCAP is a stochastic model, just comparing their optimal value may lead to false conclusions. Consequently, for each problem, we consider the first stage solution (i.e., the vehicle assignment variables xkd and yk ) and we test them in an out-of-sample fashion by using a set of scenarios
S having a number of scenarios much greater than S (the number of scenarios of the set S used
to solve both DCAP(D ) and DCAP(D)). The scenarios in S are called out of sample because they
are not used for the solution computation. To reduce the computational burden, we define this set
only once, at the beginning of the algorithm and we use this set to evaluate all the new solutions,
thus reducing the estimation variance (Brandimarte, 2014). Therefore, given the first stage solution
of the problem DCAP(D), we compute the second stage solution of DCAP(D) with the deliveries of
scenario s for each s ∈ S and we compute the average cost, called os. If the new solution is better
than the old one (os < os), we update the current solution. Moreover, we also update the current
solution with nonimproving ones with probability e−γ n_iter , where γ is a heuristic parameter and
n_iter counts the progressive number of iterations of the ALNS. If the current solution improves
the best-so-far osbest , we update the best solution of the heuristics. Then, according to the results
obtained by the new solution, the weights of each operator are updated.
The rule for updating them is the standard one: We call u(di ) and u(ri ) the number of times that
the destroy di and the repair operators ri are used. Both u(d ) and u(r ) are initialized to 1. Moreover,
we define s(di ) as the merit of operator ri , and s(ri ) as the merit of operator ri . The merits s(di ) and
s(ri ) are initialized to 0 and are incremented by
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
8
9
Algorithm 1. Districting with ALNS
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
Create the initial district solution D
Generate a big set of scenarios S
Dbest ← D
osbest ← out of sample value of the solution of DCAP(D)
while time < time_limit do
Initialization
u(di ), u(ri ) ← 1, 1 ∀ di ∈ OD , ri ∈ OR
Initialization
s(di ), s(ri ) ← 0, 0 ∀ di ∈ OD , ri ∈ OR
for n_iter = 1, 2, . . . ,MAX_ITER do
Select r ∈ R and d ∈ D according to Equation (16)
u(d), u(r) + = 1
Update the usage of the operators
D ← r(d(D))
os ← out of sample value of the solution of DCAP(D )
if os < os or True with probability exp−γ n_iter then
Update current solution
D←D
if os < osbest then
Update best solution
Dbest ← D
osbest ← os
end if
end if
update s(d), s(r)
end for
Update weights ω(di ) and ω(ri ) according to Equation (17) ∀di ∈ D, ri ∈ R.
end while
• δ1 if D updates Dbest .
• δ2 if D improves the current solution.
• δ3 if D the new solution does not improve the current solution but is accepted by change.
These values are such that δ1 > δ2 > δ3 . Once that u(di ), u(ri ), s(di ), and s(ri ) are computed, the
weights are updated as follows:
ω(di ) = (1 − ρ )ω(di ) + ρ
s(di )
s(ri )
and ω(ri ) = (1 − ρ )ω(ri ) + ρ
,
u(di )
u(ri )
(17)
where ρ ∈ [0, 1] is the reaction factor of the ALNS algorithm. This procedure is iterated MAX_ITER
time. The pseudocode of the procedure is summarized in Algorithm 1.
4. Experimental setting and results
In this section, we present the results obtained by applying the methodology described in the previous section and we compare it against the benchmark techniques used in the field. The code has
been developed in Python. Where needed, the exact solutions of the models have been computed
using Gurobi 9.1.2 (Gurobi Optimization, 2021). All the computations were performed on the machine with the Intel Core i7-9750H CPU @ 2.60 GHz. The instance generation parameters are
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
Fig. 1. Example geographical instance. Each square represents a basic unit and the colors represent a possible district
solution.
Table 2
Instance parameters. Index b represents the basic unit, index k the vehicles, while index d the districts
Parameter
Notation
Expression or value
Number of vehicles
Vehicle capacity (kg)
Vehicle costs (€)
Extra capacity cost (€)
Extra working time cost (€)
Max extra capacity (kg)
Max extra working time (hour)
Cost driver time (€)
basic unit demand (kg)
K
vk
ck
Cˆd
Q
θmax
emax
qk
Db
10 (CB), 5 (EV), 5 (LD)
100 (CB), 300 (EV), 600 (LD)
vk · U (0.5, 1, 5)
U (270, 330)
200
300
3
U (27, 33)
N (8, 1.5)
created following the procedure outlined in Bruni et al. (2023), while the basic units are considered
to form a grid (see Fig. 1). The code for the instance and scenario generation is publicly available1
We consider three types of vehicles: cargo bike (CB), E-van (EV), and light-duty van (LD). The
parameters of the instance are summarized in Table 2, where U (lb, ub) is a uniformly distributed
random variable in [lb, ub].
As the reader can notice, we consider a small fleet of vehicles. The real use case inspires these
numbers. Moreover, they enable solving the DCAP exactly, thus reducing the source of noise in the
analysis of the ALNS.
As done in Schneider et al. (2015), we compare our technique against other benchmark districting techniques used in the field. We present them in Section 4.1. Then, in Section 4.2 we analyze
the characteristic of Model (2)–(13). Finally, in Section 4.3, we report the experimental results of
the ALNS.
1
https://github.com/Stas-Fedorov/instance_dcap
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
10
11
Algorithm 2. Random districting
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
for d = 1, . . . , Ndistricts do
randomly select D[d] from B
B ← B \ C[d]
end for
while B = ∅ do
for d = 1, . . . , Ndistricts do
i∗ ← arg mini∈D[d], j∈B di j
Add i∗ to D[d]
B ← B \ {i∗ }
end for
end while
4.1. Benchmark districting techniques
Several methods are used to define districts. We consider three districting policies: Random,
Deterministic, and K-means. They all require the number of districts as input parameters (called
Ndistricts ).
The Random policy randomly chooses a set of basic units to create the core for each district. Then,
until there are basic units that are not in a district, it adds to each district the closest basic unit. We
report the pseudocode of the procedure in Algorithm 2.
The Deterministic policy aims to distribute basic units evenly among districts. It begins by
estimating the diameter of the set containing all the basic units by calculating max√
i, j∈B di j . The
policy then divides this diameter by the square root of the total number of districts ( Ndistricts ) to
determine the radius of each basic unit, referred to as Distmin .
Subsequently, the policy initializes the first district by selecting one basic unit. The next district
is determined by choosing the first basic unit whose distance from the initial one exceeds Distmin .
This process continues until all basic units are explored. If, after exploring all basic units, the desired
number of districts (Ndistricts ) is not reached, the procedure repeats with Distmin multiplied by 0.9
each time. Finally, once each district has one basic unit, the other basic units are added as in the
Random policy. We report the pseudocode of the procedure in Algorithm 3.
The K-means policy applies the version of the K-means algorithm as proposed by Fadda et al.
(2021). The algorithm considers both geographical information as well as their demand rate to
define a set of districts characterized by a low forecasting error. An example of districts obtained
starting from a grid of 10 × 10 and by using Random, Deterministic, and K-means is shown in
Fig. 2a, 2b, and 2c, respectively.
As the reader can notice, the Random policy generates districts with very irregular shapes. We will
use this policy to test if it is worth investigating ad hoc district policies or not. On the other hand,
the Deterministic policy produces a resulting graph that is very regular. This policy represents
the standard way in which districts are defined by logistic companies. Finally, the K-means produce
districts less regular than the Deterministic since it also considers delivery forecast. This last
method represents the new machine learning techniques that are developed to improve the ones
currently used.
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
Algorithm 3. Deterministic districting
√
1:
Distmin ← maxi, j∈B di j / Ndistricts
2:
d = 1, D[d] ← {1}
3:
while d < Ndistricts do
4:
found ← False
5:
for b = 1, . . . , |B| do
6:
if mini∈D[d] di,b > Distmin then
7:
d = d + 1, D[d] ← {b}
8:
B ← B \ {B}
9:
found ← True, break
10:
end if
11:
end for
12:
if b = |B| and not found then
13:
Distmin ← 0.9 · Distmin
14:
end if
15:
end while
16:
while B!= ∅ do
17:
for d = 1, . . . , Ndistricts do
18:
i∗ ← arg mini∈D[d], j∈B di j
19:
Add i∗ to D[d]
20:
B ← B \ {i∗ }
21:
end for
22:
end while
Fig. 2. Districts obtained with Random (a), Deterministic (b), and K-means (c) on a 10 × 10 grid of basic units.
Please note that we selected these simple policies as benchmarks for two main reasons: On the
one hand, they are fast, simple to implement, and represent benchmarks often used in practice. On
the other hand, our problem’s peculiarity (such as endogenous uncertainty, the possibility to use
third-party logistics, etc.) prevents using several other benchmarks available in the literature.
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
12
13
Fig. 3. Out sample performance of DCAP with Random, Deterministic, and K-means policies.
4.2. DCAP analysis
In this section, we analyze the characteristics of problem DCAP(D). First, we investigate the stability
of the problem for different numbers of scenarios and different types of D. In principle, to solve
Model (2)–(13) in an exact way, we should consider all the possible scenarios. Nevertheless, this
is not feasible, so we resort to Monte Carlo sampling, and we consider just a subset of all the
possible scenarios (called S). In general, we expect that the greater the number of scenarios in
S, the better the out-of-sample performance (Birge and Louveaux, 2011). Therefore, as done in
Bruni et al. (2023), we consider the average out-of-sample gap between the solution obtained using
S scenarios and the one obtained by using 5% more scenarios (i.e., (1 + 0.05)S). In other words,
we are considering the marginal gain from adding 5% more scenarios to the solution. Since this
quantity may depend on the initial district definition D, we show the out-of-sample gain for a
different number of scenarios and for D computed with the Random, Deterministic, and K-means
policy in Fig. 3. All the box plots are obtained by 10 repetitions for an initial grid of basic units
equal to 20 × 20, 30 × 30, and 40 × 40 and an initial number of districts equal to 10, 15, and 20.
Therefore, each boxplot represents 90 observations.
As the reader may notice stability is reached with different speeds for different districting policies. In particular, the Random and Deterministic policies lead to a convergence slower than the
K-means one. This is because the K-means policy defines districts to reduce variance, which leads
to a stochastic behavior that can be defined with a smaller number of scenarios. Moreover, as expected the variance of the solution is much greater when the districts are generated with the Random
policy since it does not consider geographical information nor demand distributions. Luckily, in all
the presented graphs, the out-of-sample gains performance stabilizes after 70 scenarios, reaching
values lower than the 2% gap. Therefore, we set S = 70 in all the following experiments.
The computational time for the exact solution of DCAP(D) is presented in Table 3 for different
numbers of districts and different districting policies. All the quantities are averaged over 10 instances. As it is reasonable, the number of districts strongly affects the computational time that
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
Table 3
Average solution times of DCAP obtained over 10 instances with different numbers of districts (in brackets the standard
deviation). All the values are in seconds
D:
5
10
15
20
25
30
Random
Deterministic
K-means
3 (0.6)
12 (2)
3 (1.2)
23 (4)
70 (32)
162 (18)
565 (32)
246 (37)
127 (12)
376 (309)
557 (432)
205 (105)
1333 (697)
1278 (842)
754 (559)
1110 (953)
1311 (1061)
1533 (1187)
Table 4
VSS and EVPI for DCAP(D) for D obtained with different districting policies
Random
Basic units
Districts
20 × 20
10
20 × 20
15
20 × 20
20
30 × 30
10
30 × 30
15
30 × 30
20
40 × 40
10
40 × 40
15
40 × 40
20
Mean (std.dev):
Deterministic
K-means
EVPI (%)
VSS (%)
EVPI (%)
VSS (%)
EVPI (%)
VSS (%)
39.70
48.86
95.01
11.59
21.86
56.64
21.37
49.29
90.00
48.3(29.2)
4.38
4.38
4.50
5.72
4.22
6.35
4.85
3.82
5.39
4.8(0.8)
46.64
75.04
78.72
19.60
33.64
76.64
6.12
22.52
84.16
49.2(30.0)
6.58
4.15
6.66
8.50
9.25
9.28
5.22
4.68
4.71
6.6(2.0)
3.29
55.15
69.02
12.80
15.03
41.28
5.10
38.69
72.53
34.8(27.0)
4.75
4.19
7.98
4.69
3.28
4.44
3.51
3.66
4.36
4.5(1.4)
reaches values near 20 minutes when the number of districts is 30. Even if this time may seem large,
in the following experiments, solutions with more than 15 districts are rarely reached, enabling us
to solve exactly DCAP(D).
Other important characteristics of stochastic models are the expected value of perfect information (EV PI) and the value of stochastic solution (V SS) (Kall and Wallace, 1994). We compute
both measures using relative quantities:
EV PI =
W S − RP
,
WS
V SS =
EEV − RP
,
EEV
(18)
where RP is the out-of-sample value of the first-stage solutions of the DCAP problem, W S is the
wait-and-see solution computed on the out-of-sample scenarios, and EEV is the out-of-sample
value of the expected value problem (Kall and Wallace, 1994). We report the average values of these
two indicators for 10 different instances, districting policies, and initial configurations in Table 4.
As the reader can notice, EV PI increases as the number of districts increases. This is reasonable
since with more districts, the variance of the demand is greater, thus increasing the value of future
information. The increment is very big, even for small differences in district numbers, testifying
the impact of the districting decision on the final problem characteristics. Moreover, there is a
significant difference in the mean values of EV PI for different districting solutions. In particular,
if D is generated using the Random policy, the EV PI reaches a higher value than with the other
policies since it may create districts with very different stochastic characteristics.
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
14
15
Table 5
Results of DCAP improvements with ALNS heuristics
Initial solution
Random
Deterministic
K means
Number of ALNS iterations
Starting number of districts
DCAP best OF reduction (%)
DCAP OS OF reduction (%)
Final number of districts
Iterations with new best solution (%)
500
15
28.22
44.42
10.33
18.95
500
15
15.47
29.88
10.33
7.95
500
15
20.90
18.41
10.33
11.20
Instead, V SS has average values of 4–6% without a clear trend with respect to the number of
basic units. Even if the V SSs seem low, it is important to notice that they are computed for a
single delivery day since the DCAP is a two-stage model. Therefore, since the districting decision is
just taken once while the deliveries are performed per several days, the results imply that using the
expected value to compute the solution of DCAP, the decision maker is going to lose 4% each day,
thus leading to huge losses in the long run.
Finally, we can note that neither the EV PI nor the V SS are influenced by the original number
of basic units. The reason is that DCAP(D) depends just on D, and not on the initial number of
basic units. This interesting characteristic frees the decision-maker from the burden of making good
choices when she defines the basic unit. Moreover, this claim makes the assumption of working on
a grid of basic units very mild.
4.3. Experimental results of ALNS
In this section, we present the experiment results of applying the ALNS for district optimization.
We set a time limit for the ALNS of three hours. Moreover, we consider a starting solution of 15
districts and a city divided into a grid of 20 × 20 basic units (i.e., a total of 400 basic units) and
we simulate the delivery demand in each basic unit using independently and identically distributed
normal distributions (as in Table 2). We set the stopping criteria of ALNS to be 500 iterations.
We report the average results of the application of ALNS for different initial clustering strategies
in Table 5. The results are averaged over the same 10 instances for all the methods to reduce the
variance of the estimations.
As the reader can notice, starting from an initial number of districts equal to 15, ALNS returns
a solution with 10 to 11 districts. Interestingly, ALNS is robust with respect to the initial solution
ending, always with the same number of districts (this justifies the same value of the Final number
of districts in the last row of Table 5). The percentage cost reduction of ALNS against the starting
solution is reported in the row DCAP best OF reduction (%). As the reader can notice, it reaches
values close to 28% when the initial solution is generated with Random, around 21% when it is
generated with K-means, and around 15% when it is generated with Deterministic. These results
highlight that Random is the worst technique, justifying the research in intelligent districting policies.
Nevertheless, all the techniques produce a nonnegligible loss with respect to the ALNS solution,
meaning that the impact of the district decision on the final decision must be considered.
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
Since this gap is influenced by the number of districts that the policies consider, we tune it by selecting the Ndistricts in {1, . . . , 15} leading to the lowest DCAP(D) for each policy. Then, we compare
the out-of-sample cost difference between these solutions and the one computed by the ALNS. We
report these values in the row DCAP OS OF reduction (%). It is interesting to see that this tuning
greatly impacts the DCAP robustness, which ranges up to 45% in the case of Random initial districting and around 30% for Deterministic districting. Nevertheless, the K Means initial solution
receives the least impact in terms of out-of-sample cost reduction (18%), which is still a positive
impact leading to lower costs.
By analyzing the performance of the ALNS, it is interesting to notice that the evolution is
strongly different for the different initial solutions. Considering the percent number of iterations
leading to a new best solution (row Iterations with new best solution in Table 5), we can note that,
by using the Random policy, the execution is characterized by a great number of iterations leading to
an improving solution (around the 19% of the iteration improved the Dbest ). Each one of these improvements usually decreases by a small quantity osbest . Instead, using the Deterministic policy,
the execution is characterized by a smaller amount of improving iterations (around 8%) but with a
much greater decrease. Finally, when using the K-means policy, we have an intermediate behavior
closer to the Deterministic policy than to the Random one.
4.3.1. Realistic instance
In this section, we test the proposed methods on a set of realistic instances by changing the type
of topology of the customers, demand volume, and dimensions of the initial grid of basic units. In
particular, we consider two customers topologies:
• Uniform: The positions of the customers are generated using a multivariate uniform distribution.
This describes deliveries in highly populated city centers.
• Monopolar: The positions of the customers are distributed according to a multivariate normal
distribution with average (0,0) and covariance matrix equal to the identity matrix. Therefore, it
describes a wider urban area in which the probability of deliveries closer to the city center is
higher.
Moreover, we explore different starting grid size (5 × 5, 10 × 10, and 20 × 20) and different demand
volumes (N (μ, 0.5σ ), N (μ, σ ), and N (μ, 2σ ), with μ = 8 and σ = 1.5). All the other parameters
are set according to Table 2. We compute the starting solution using the Deterministic policy
since as observed in the previous section, the choice of the initial policy does not affect the final
results. On the other, it is the policy characterized by the shortest computational time. The average
percentage cost reductions of ALNS against the starting solution (DCAP OS OF reduction (%))
computed out of sample and averaged over 10 repetitions for the various settings are outlined in
Table 6.
As the reader can notice, all the values increase as the number of basic units increases. This proves
that the more basic units are considered, the wider the solution space and, thus, the improvement
provided by the ALNS with respect to the initial solution. Moreover, the greater the standard deviation of the demand, the greater is the improvement. Proving that wisely merging basic units is
more beneficial when uncertainty has more effect. Here, it is interesting to notice that for the value
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
16
17
Table 6
Comparison of ALNS performance in terms of DCAP OS OF reduction (%) percentage with different demand generation
distribution, topology and base units grid size
Demand:
N (μ, 0.5σ )
Topology:
Grid 5 × 5
Grid 10 × 10
Grid 20 × 20
Uniform
18.34
20.08
36.09
N (μ, σ )
Monopolar
21.45
26.69
30.44
Uniform
29.98
34.01
39.48
N (μ, 2σ )
Monopolar
38.12
42.52
42.77
Uniform
33.18
35.01
36.98
Monopolar
42.84
45.75
46.55
Table 7
Results of DCAP improvements with ALNS heuristics and nonuniform demand
Initial solution
Random
Deterministic
K-means
DCAP best OF reduction (%)
DCAP OS OF reduction (%)
Final number of districts
46.55
70.62
9
23.54
51.79
9
20.43
52.77
9
of standard deviation equal to 2σ , the least possible amount of out-of-sample improvement is much
greater than the 30%, justifying the need for stochastic approaches even more.
Comparing the results for Uniform and Monopolar instances, we can observe that the greatest
DCAP best OF reduction (%) values are achieved by the Monopolar instances. This is due to the
usage of the Deterministic policy to generate the initial solution, which defines better solutions
for the Uniform instance than for the Monopolar ones. Moreover, the differences in DCAP OS OF
reduction (%) increase as the standard deviation of the demand increases. This effect is generated
by the topology, which enables greater optimization when demand is not uniformly generated.
4.3.2. Real use case
Finally, we apply the proposed methodology in a realistic environment in which the delivery demand is provided by the industry. The data are the same as used in Perboli et al. (2021a, 2021b) and
Bruni et al. (2023). The case study tackles a set of deliveries (characterized by delivery locations
and parcel weight) within the Turin city center area (2.805 × 2.447 km2 ), using a heterogeneous
fleet of three types of vehicles: CBs, EVs, and LDs (with the characteristics presented in Table 2).
Figure 4a displays the service area with a depot (red square) and a possible scenario of the delivery
demand (blue circles). The company area into a grid of 10 × 10 basic units which correspond to
small city regions (each one has an area of approximately 0.4 km2 ). Deliveries weights are between
10 and 100 kg. We consider 100 service days, each one with around 500 deliveries. Therefore, the
real use case validates our approach when considering up to 500 random customers. We used these
data as possible second-stage scenarios. By making the same analysis as in Section 4.2, we decide
to consider S = 50 scenarios for the set S (needed for the solution of DCAP(D). The remaining 50
scenarios, together with a set of 5000 new scenarios obtained by randomly sampling 500 deliveries
from the 100 service days, are used for the set of out-of-sample scenarios S .
We apply the same procedure as in Section 4.3 on the real data, and we present the results in
Table 7. As above, we set the time limit for the ALNS to three hours (a time compatible with the
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
Fig. 4. Possible scenario of demand delivery 4(a) and resulting district 4(b).
decision process) and we initialize it with the district obtained with Random, Deterministic, and
K-means considering 15 districts.
As the reader can notice, the final number of districts is smaller than in the previous example,
but it is still independent of the initial districts. The reduction of cost using ALNS is around 50%
against the starting solution computed by Deterministic, K-means, and 70% against the solution
computed with Random. Finally, even if we improve the performance of Random, Deterministic,
and K-means by tuning the number of districts, the gap is still very high being at least equal to 20%.
In the final solution, the fleet is composed of five CBs and four EVs, and no LD is used. Each
vehicle is assigned to just one district. From a workload point of view, the results are also good:
The extra time is 0 in the vast majority of the out-of-sample scenarios (leading to an expected value
of 7.10 €). The same holds for the usage of third-party logistics which achieves an average cost of
120.25 due to the high spot price of this service. Finally, the number of hours worked for each driver
is almost the same: The average working time for the CB and the EV is 7.73, and 7.56, respectively.
This effect is due to the fixed cost for ci that the decision-maker has to pay to use vehicle i which is
dampened by the vehicle usage.
Finally, it is interesting to observe the final solution, shown in Fig. 4b, where the depot is contained in District 2. Here the CBs are used for districts 1, 2, 3, 5, and 6 which contain a smaller
number of deliveries due to both their extension and the density. Instead, districts 4, 7, 8, and 9 are
served by the EV since they contain more deliveries.
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
18
19
5. Conclusions and future work
In this paper, we tackled last-mile logistics applications using a territory-based routing approach
consisting of defining a set of districts to divide the city and assigning them to a set of drivers.
In contrast with the available literature, we modeled this problem using an endogenous stochastic
optimization problem in which we considered the effect that the decision on the district had on the
demand scenarios, and thus on the final logistic decisions. Since the resulting problem was difficult
to solve, we addressed this problem using an ALNS. We compared it against several techniques
used in real settings to investigate its efficiency in both simulated and realistic instances. We found
that using ALNS it was possible to save up to 44% in the simulated instances and up to 46%
in the stochastic ones. Despite we presented results on last-mile deliveries, since the mainstream
of the literature related to districting addressed this application, it is important to point out that
the proposed techniques can be applied to other business cases such as waste collection, pickup
activities, street cleaning, and many others. Finally, a real use case enables us to state that the
method can be effectively used in the real field in a medium-sized city.
Future studies will further generalize the approach to deal with bigger cities and consider time
windows for deliveries.
Acknowledgments
We want to express our sincere gratitude to the anonymous referees and journal editors for their
valuable feedback and guidance throughout the review process. Their insightful comments and
support have greatly contributed to the improvement of this paper.
While working on this article, Guido Perboli was the Head of the Urban Mobility and Logistics
Systems (UMLS) initiative of the interdepartmental Center for Automotive Research and Sustainable Mobility (CARS) at the Politecnico di Torino, Turin, Italy. This work was partially supported
by the NOUS project funded by the European Commission, Program Horizon, Call HORIZONCL4-2023-DATA-01, grant agreement No. 101135927.
Open access publishing facilitated by Politecnico di Torino, as part of the Wiley - CRUI-CARE
agreement.
References
Beardwood, J., Halton, J.H., Hammersley, J.M., 1959. The shortest path through many points. Mathematical Proceedings
of the Cambridge Philosophical Society 55, 299–327.
Bender, M., Kalcsics, J., Meyer, A., 2020. Districting for parcel delivery services—a two-stage solution approach and a
real-world case study. Omega 96, 102283.
Birge, J.R., Louveaux, F., 2011. Introduction to Stochastic Programming. Springer, New York.
Brandimarte, P., 2014. Handbook in Monte Carlo Simulation: Applications in Financial Engineering, Risk Management,
and Economics. John Wiley & Sons, Hoboken, NJ.
Brandimarte, P., Zotteri, G., 2007. Introduction to Distribution Logistics. John Wiley & Sons, Hoboken, NJ.
Bruni, M.E., Fadda, E., Fedorov, S., Perboli, G., 2023. A machine learning optimization approach for last-mile delivery
and third-party logistics. Computers & Operations Research 157, 106262.
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
M. E. Bruni et al. / Intl. Trans. in Op. Res. 0 (2024) 1–20
Carlsson, J.G., 2012. Dividing a territory among several vehicles. INFORMS Journal on Computing 24, 4, 565–577.
Daganzo, C.F., 1984a. The length of tours in zones of different shapes. Transportation Research Part B: Methodological
18, 2, 135–145.
Daganzo, C.F., 1984b. The distance traveled to visit N points with a maximum of C stops per vehicle: an analytic model
and an application. Transportation Science 18, 4, 331–350.
Ducret, R., Lemarié, B., Roset, A., 2016. Cluster analysis and spatial modeling for urban freight. Identifying homogeneous urban zones based on urban form and logistics characteristics. Transportation Research Procedia 12, 301–313.
Fadda, E., Fedorov, S., Perboli, G., Barbosa, I.D.C., 2021. Mixing machine learning and optimization for the tactical
capacity planning in last-mile delivery. In 2021 IEEE 45th Annual Computers, Software, and Applications Conference
(COMPSAC), IEEE, Piscataway, NJ, pp. 1291–1296.
Gurobi Optimization, 2021. Gurobi optimizer reference manual. Gurobi Optimization, Beaverton, OR.
Haugland, D., Ho, S.C., Laporte, G., 2007. Designing delivery districts for the vehicle routing problem with stochastic
demands. European Journal of Operational Research 180, 3, 997–1010.
Kalcsics, J., Ríos-Mercado, R.Z., 2019. Districting Problems, Springer International, Cham, pp. 705–743.
Kall, P., Wallace, S.W., 1994. Stochastic Programming. Wiley Interscience Series in Systems & Optimization. John Wiley
& Sons, Chichester.
Kovacs, A.A., Parragh, S.N., Hartl, R.F., 2013. A template-based adaptive large neighborhood search for the consistent
vehicle routing problem. Networks 63, 1, 60–81.
Lei, H., Laporte, G., Guo, B., 2012. Districting for routing with stochastic customers. EURO Journal on Transportation
and Logistics 1, 1–2, 67–85.
Lei, H., Wang, R., Laporte, G., 2016. Solving a multi-objective dynamic stochastic districting and routing problem with
a co-evolutionary algorithm. Computers & Operations Research 67, 12–24.
Li, Y., Zhou, C., Yuan, P., Ngo, T.T.A., 2023. Experience-based territory planning and driver assignment with predicted
demand and driver present condition. Transportation Research Part E: Logistics and Transportation Review 171,
103036.
Liu, C., Lin, S., Shen, Z.J.M., Zhang, J., 2023. Stochastic service network design: the value of fixed routes. Transportation
Research Part E: Logistics and Transportation Review 174, 103118.
Newell, G.F., 1986. Design of multiple-vehicle delivery tours—III valuable goods. Transportation Research Part B:
Methodological 20, 5, 377–390.
Newell, G.F., Daganzo, C.F., 1986. Design of multiple vehicle delivery tours—II other metrics. Transportation Research
Part B: Methodological 20, 5, 365–376.
Ouyang, Y., 2007. Design of vehicle routing zones for large-scale distribution systems. Transportation Research Part B:
Methodological 41, 10, 1079–1093.
Ouyang, Z., Leung, E.K., Cai, Y., Huang, G.Q., 2023. Dynamic community partitioning for e-commerce last mile delivery
with time window constraints. Computers & Operations Research 160, 106394.
Perboli, G., Brotcorne, L., Bruni, M.E., Rosano, M., 2021a. A new model for last-mile delivery and satellite depots
management: the impact of the on-demand economy. Transportation Research Part E: Logistics and Transportation
Review 145, 102184.
Perboli, G., Rosano, M., Wei, Q., 2021b. A simulation-optimization approach for the management of the on-demand
parcel delivery in sharing economy. IEEE Transactions on Intelligent Transportation Systems 23, 8, 10570–10582.
Ropke, S., Pisinger, D., 2006. An adaptive large neighborhood search heuristic for the pickup and delivery problem with
time windows. Transportation Science 40, 4, 455–472.
Ríos-Mercado, R.Z., 2020. Optimal Districting and Territory Design. Springer International, Cham.
Sandoval, M.G., Álvarez-Miranda, E., Pereira, J., Ríos Mercado, R.Z., Díaz, J.A., 2022. A novel districting design approach for on-time last-mile delivery: an application on an express postal company. Omega 113, 102687.
Schneider, M., Stenger, A., Schwahn, F., Vigo, D., 2015. Territory-based vehicle routing in the presence of time-window
constraints. Transportation Science 49, 4, 732–751.
Wong, K., Beasley, J.E., 1984. Vehicle routing using fixed delivery areas. Omega 12, 6, 591–600.
© 2024 The Author(s).
International Transactions in Operational Research published by John Wiley & Sons Ltd on behalf of International Federation
of Operational Research Societies.
14753995, 0, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/itor.13572 by CochraneItalia, Wiley Online Library on [27/02/2025]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
20
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )