This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

\xspaceaddexceptions

())]}

Computational Approaches for Grocery Home Delivery Services

Christian Truden Corresponding author: Christian Truden, Email: christian.truden@aau.at Department of Mathematics, Universität Klagenfurt, Klagenfurt, Austria Lakeside Labs GmbH, Klagenfurt, Austria Kerstin Maier MANSIO Karl Popper Kolleg, Universität Klagenfurt, Klagenfurt, Austria Department of Mathematics, Universität Klagenfurt, Klagenfurt, Austria Anna Jellen MANSIO Karl Popper Kolleg, Universität Klagenfurt, Klagenfurt, Austria Philipp Hungerländer Department of Mathematics, Universität Klagenfurt, Klagenfurt, Austria
Abstract

Grocery home delivery services require customers to be present when their deliveries arrive. Hence, the grocery retailer and the customer must mutually agree on a time window during which the delivery can be guaranteed. This concept is referred to as the Attended Home Delivery (AHD) problem. The phase during which customers place orders, usually through a web service, constitutes the computationally most challenging part of the logistical processes behind such services. The system must determine potential delivery time windows that can be offered to incoming customers and incrementally build the delivery schedule as new orders are placed. Typically, a Vehicle Routing Problem with Time Windows forms the underlying optimization problem. This work is concerned with the use case given by an international grocery retailer’s online shopping service. We present an analysis of efficient solution methods that can be employed to AHD services. We provide several heuristic approaches for tackling the steps mentioned above. However, the basic framework can be easily be adapted to be used for many similar Vehicle Routing applications. We provide a comprehensive computational study comparing several algorithmic strategies, combining heuristics utilizing Local Search operations and Mixed-Integer Linear Programs, tackling the booking process. Finally, we analyze the scalability and suitability of the approaches.

Keywords: attended home delivery, grocery home delivery, vehicle routing problem with time windows

1 Introduction

Due to the rapid digitalization of the retailing sector, Attended Home Delivery (AHD) services [8] have increased in importance within the e-commerce sector. AHD services come into play whenever a retailing company offers an online shopping service that requires its customers to be present when their deliveries arrive. Hence, the retailing company and the customer must mutually agree on a delivery time slot during which the arrival of the delivery as well as the presence of the customer can be assured.

This work focuses on the online shopping service of one of the world’s leading grocery chains. Grocery home delivery services are prime examples of AHD services as temperature-sensitive goods cannot be dropped off at the door. Therefore, the customer must be present to receive their order. However, there are many more applications that follow the same principle, such as maintenance and repair services [6], on-demand mobility services [28], or patient home health care services [14].

AHD services come along with several benefits for the customers, such as nonstop opening hours of the online store, the avoidance of traveling to the brick-and-mortar stores, almost no interruptions of the cold chain when buying groceries, and no carrying of heavy or bulky items. Despite the huge potential and benefits for customers, online grocery shopping services pose several interrelated logistics and optimization challenges to the operator. Basically, all actions an e-grocery retailer has to perform throughout the planning and fulfillment process can be split into four phases. We briefly discuss these different phases and kindly refer to Cwioro et al. [11] for a detailed description of the overall logistics process behind AHD services. The first phase is called Tactical Planning Phase, it appears several months/weeks before delivery. During this period, the fleet of delivery vehicles is defined and drivers are assigned to them. As next, speaking of several weeks up to days/hours before delivery comes the Ordering Phase, in which the grocery chain accepts orders. Once all orders are placed, usually days/hours before delivery, the company prepares the accepted orders for delivery during the Preparation Phase. See [31] for a model that describes the order picking at a central warehouse. Finally, during the Delivery Phase the delivery vehicles execute the orders according to the delivery schedule.

The interaction with customers through the online store holds several computational challenges. From a computational point of view, the runtime requirements for the optimization problems occurring in the Ordering Phase are much more challenging than in the other phases. Thus, this work is concerned with the challenges of the Ordering Phase.

The Ordering Phase is the phase during which customers place their grocery orders online on the company’s website. Meanwhile, the provider is challenged with solving an online variant of a Vehicle Routing Problem with Time Windows (VRPTW), which is known to be 𝒩𝒫\mathcal{NP}-hard [26]. Clearly, the website should respond to the customer requests with as little delay as possible to ensure a smooth booking process. Due to the tight restrictions concerning the runtime, the naive approach of solving a new VRPTW instance from scratch for each new customer order is far from being applicable in an online environment, even when using fast Meta-heuristics. We propose to split the Ordering Phase into the following four steps (summarized in Figure 1).

1. Tactical Planning Phase 2. Ordering Phase 3. Preparation Phase 4. Delivery Phase Tactical Planning Phase Initialize Web Service new customer Get TWs Set TW no yes Insertion possible? Improvement End Ordering Preparation Phase Delivery Phase

Figure 1: Depiction of the AHD system with focus on the Ordering Phase.
  • Initialization step. In this step, the web service is being prepared to accept customer requests. Therefore, a VRPTW is set up, including all available vehicles with corresponding operation times. Since no orders have been placed yet, this results in an empty delivery schedule with a fixed fleet of vehicles.

  • Get TWs step - The system determines available delivery time windows. When a new customer wants to place an order, the system has to provide all available delivery time windows. This process has to be performed in milliseconds as customers are usually impatient when they have to wait for technical reasons. Note that for calculating availabilities of time windows, the routing service has to calculate the travel times between all pairs of customers based on their provided addresses. The underlying mathematical problem of this step is denoted as Slot Optimization Problem (SOP) [19]. The SOP aims to determine the maximal number of available delivery time windows for a new customer.

    Optionally, for reasons of profit-maximizing, some available time windows can be hidden from the customer or be offered at different rates. In this work, we do not consider any (dynamic) slotting and pricing because the policy of our partnering grocery chain is to offer available time slots on a first-come-first-served basis, and each customer is accepted if possible. Nevertheless, we refer to Subsection 2.3, which provides a brief literature review about this topic.

  • Set TW step - Customer books a delivery time window. Given the list of time slots (determined in the previous phase), the customer now chooses his or her preferred one. As it can take some time for the customer to decide on a time window or because many customers are booking simultaneously, the system must double-check if the selected time slot is still available. If the answer is yes, the customer can be added to the working schedule. If the answer is no, the system calls the Get TWs step again to find an updated set of available time windows for the customer. This must be done every time a customer wants to place an order. Note that we do not allow any simultaneous processing of the schedule to avoid queuing issues.

  • Improvement step. In the last step, optimization techniques are applied to improve the schedule. These are important for two reasons: a) offer as many time windows as possible to the customers; b) serve as many customers as possible. This can be achieved by changing the assignments of customers to vehicles and, further, by improving the routes of the delivery vehicles. As objective function we choose to minimize the total travel time as this has proven to be reasonable in practice. During very busy times, the Improvement step can also be skipped or only invoked after a certain number of Set TW steps to further improve the runtime. At any time of the process, we allow to have exactly one working schedule in the system.

We provide several heuristic approaches for tackling the steps mentioned above. Although the approach is based on the partnering retailing companies’ requirements, it can be easily be adapted to be used for many similar Vehicle Routing applications.

The rest of this paper is organized as follows. In Section 2, we review relevant literature. Formal definitions of the underlying mathematical problems and descriptions of how we conduct feasibility checks can be found in Section 3. We propose our approaches based on Local Search operations and Mixed-Integer Linear Program (MILP) formulations in Section 4 and further, give suggestions on how to combine them for conducting the Get TWs, the Set TW, and the Improvement step. In Section 5, we present the set-up of our computational experiments and discuss the corresponding results. Finally, Section 6 concludes the paper.

2 Related Work

In this section, we briefly review relevant literature concerning AHD systems as well as solution methods for the underlying mathematical problems.

2.1 Attended Home Delivery

Campbell and Savelsbergh [8] describe an (Attended) Home Delivery system that decides if a new customer order is accepted. Furthermore, the system assigns accepted orders to a time window under consideration of the opportunity costs of the orders. In contrast to that, in our setup the customer takes the decision to which delivery time window her or his order is assigned to, which requires a different setup and imposes different challenges. Campbell and Savelsbergh describe the fulfillment process by the following three phases: (1) order capture and promise, (2) order sourcing and assembly, and (3) order delivery. From an algorithmic point of view, the authors propose a two-step insertion heuristic to tackle the order capture and promise phase: in the first step, they employ a construction heuristic, where, starting from an empty schedule, all already accepted requests are inserted into the schedule, beginning with the “heaviest” requests. The second step evaluates if the new request can be inserted into the constructed schedule in one of its acceptable time windows. Furthermore, the authors approximate the expected profit of accepting an incoming request. In their experimental evaluation, the heuristic provides good results, however, only on instances with up to 100 customers, which is much smaller than the instances we consider in our application (500 to 2000 customers).

Agatz et al. [1] present issues and solution approaches for the AHD problem where customers select the time window during which delivery shall take place in a very similar setup to our problem. Their particular focus is on supermarkets that sell groceries online. They discuss the tactical planning issues related to the design of a time slot schedule, i.e., which time slots to offer to customers. Furthermore, the paper covers dynamic time slotting (see Subsection 2.3 for more details) as well as using penalties and incentives to smoothen customer demands. This work is related to our application, however, it covers tactical considerations rather than operational difficulties and the corresponding optimization approaches.

Han et al. [16] discuss an AHD problem that emerges as an operational problem at the depots of express courier companies. The problem combines a single-depot VRPTW and an appointment scheduling problem. In this setting, the couriers must arrange an appointment (via phone) to handover the delivery to the customer. Hence, uncertain customer behavior in responding to the arranged appointment, e.g., no-show, or random response times, are considered. Three main questions are addressed by the authors: (1) The allocation of the customers to the limited number of couriers, (2) the sequences in which the couriers visit the customers, and (3) the time to meet the next customer and the maximal time to wait for the customer to show. Consequently, the authors propose an integrated approach that tries to balance the customers’ inconvenience and the depot’s operational cost. However, although directly related to our problem, many assumptions of this work do not carry over to our problem setting. In general, the preparation of grocery deliveries requires longer lead times. Hence, the arrangement of delivery time windows takes place much earlier. Moreover, random customer behavior is neglectable in our application. Pan et al. [27] describe a data driven two-stage approach that focuses on predicting the absence probability of customers for a grocery home delivery service. Moreover, the authors provide an excellent literature review of the online grocery shopping process and the corresponding logistical operations. Ehmke [12] gives an overview of the logistical challenges of AHD systems.

As a result of a cooperation with a supermarket chain, Vazquez-Noguerol et al. [30], present a MILP model for store-based e-fulfillment strategies with multiple picking locations. The case where the orders are picked at a central warehouse is also elaborated by Vazquez-Noguerol et al. [31].

2.2 Determining Feasible Time Slots

Most approaches in the literature [34, 15, 8, 24] follow Savelsbergh’s forward time slack approach [29], which we refer to as Simple Insertion, for validating the feasibility of all possible delivery time windows for each incoming order. The advantages of this approach lie in its simplicity and very short run times (see Subsection 4.1 for more details).

Hungerländer et al. [19] introduce the SOP. They suggest an Adaptive Neighborhood Search (ANS) to free up time during time windows in order to enable the insertion of new customers. In a computational study they compare their ANS with two heuristics, the Simple Insertion and a heuristic based on MILP formulations for a subproblem of the TSPTW, and showed that the ANS is able to find much more time slots while still fast enough for most online delivery services. Note that their approach is restricted to non-overlapping time windows. However, to the best of our knowledge, this is the only available paper, which deals with a more efficient feasibility check than the Simple Insertion.

In this work, we adapt all mentioned heuristics such that they are able to handle the Get TWs step in our AHD considered. As this work is not restricted to non-overlapping time windows, this results in major adaptions for the ANS.

2.3 Slotting & Pricing

Agatz et al. [3] discuss how proven revenue management concepts can be translated to AHD services. The authors differentiate into static methods, i.e., forecast-based methods that are applied off-line before the actual orders come in, and dynamic methods, i.e., order-based methods that are applied in real-time as new demand comes in. Moreover, capacity allocation or slotting (which time slots are made available to which customers), and pricing (using delivery fees to manage customer demand), are distinguished. Hence, this results in the following four categories of demand management.

Differentiated (static) slotting: Defining the collection of delivery time windows based on geographical regions or the preferences of customer groups. Hence, the concentration of customer orders in a given area can be increased by limiting the availability of delivery options, see [2, 17].

Differentiated (static) pricing: Differentiating between different delivery options (on a tactical level) offered to customers by charging different delivery fees. Offering off-peak time discounts or peak time premiums allows to smoothen the demand over the day, see [22].

Dynamic slotting: Deciding which delivery time slots to offer an incoming customer based on the currently available capacity. More sophisticated approaches may hide delivery time slots from unprofitable customers in order to reserve capacity for highly profitable future customers (that are predicted to arrive later on), see [10, 13, 25, 24].

Dynamic pricing: Allows for finer levels of gradation of incentives than (dynamic) slotting. Offering price incentives can be used to increase the attractiveness of time slots during which the order can be delivered more efficiently, see [4, 34, 21, 33].

In contrast to the presented works in this subsection, we investigate the acceptance of new customer requests in terms of improving the chances of finding feasible insertions (given an incomplete delivery schedule) rather than developing new acceptance criteriums for improving revenue management.

3 Problem Description

In this section, we provide a detailed description of the problems we solve. Before we state a mathematical problem description, we recall the tasks that must be performed in the different steps of the Ordering Phase.

In the Get TWs step we aim to identify all available time windows. The underlying optimization problem is called the Slot Optimization Problem (SOP). Then, in the Set TW step we insert the customer into his or her chosen time window. Finally, in the Improvement step we re-optimize the schedule. While in the Get TWs and the Set TW step one must solve a feasibility version of the VRPTW, the classic optimization version of the VRPTW must be solved in the Improvement step.

Thus, we start with a formal description of the VRPTW in Section 3.1, continue with definitions for arrival times and feasible points of insertion in Section 3.3, and state the SOP finally in Section 3.4.

3.1 Vehicle Routing Problem with Time Windows

The vehicle routing problem with time windows (VRPTW) is concerned with finding optimal tours for a fleet of vehicles with given capacity constraints to deliver goods to customers within assigned time windows. A VRPTW instance is typically defined by a set of customers 𝒞,|𝒞|=p\mathcal{C},~\lvert\mathcal{C}\lvert=p, with corresponding order weight function c:𝒞>0c\colon\mathcal{C}\to\mathbb{R}^{>0}, and a service time function s:𝒞>0s\colon\mathcal{C}\to\mathbb{R}^{>0}. In the considered AHD service the individual items of an order a𝒞a\in\mathcal{C} are consolidated into several boxes of fixed size. The number of required boxes defines the corresponding order weight c(a)c(a).

Secondly, the VRPTW consists of a set of time windows 𝒲={1,,q}\mathcal{W}=\left\{1,\dots,q\right\}, where each time window u𝒲u\in\mathcal{W} is defined through the times of its begin and end (Bu,Eu)(B_{u},E_{u}). We assume that the time windows are unique, i.e., there do not exist time windows u,v𝒲,uvu,v\in\mathcal{W},\ u\neq v with Bu=BvB_{u}=B_{v} and Eu=EvE_{u}=E_{v}. We consider overlapping and non-overlapping time windows. Two time windows uu and vv are non-overlapping if and only if EuBvE_{u}\leq B_{v} or EvBuE_{v}\leq B_{u}. Further, a function w:𝒞𝒲w\colon\mathcal{C}\to\mathcal{W} is given that assigns to each customer a time window, during which the delivery vehicle has to arrive at the customer. All vehicles depart from and return to a depot dd. The travel time between all points aV=𝒞{d}a\in V=\mathcal{C}\cup\{d\} is given by a function t:V×V0t\colon V\times V\to\mathbb{R}^{\geq 0}, where we set the travel time from a customer aa to itself to 0, i.e., t(a,a)=0,aVt(a,a)=0,~a\in V.

Each vehicle has an assigned tour. A tour 𝒜=(1,2,,n)\mathcal{A}=(1,2,\dots,n) contains nn customers in the order they are visited by the vehicle and has an assigned capacity C𝒜C_{\mathcal{A}}. Furthermore, each tour 𝒜\mathcal{A} has assigned start and end times that we denote as startA and endA, respectively. Hence, the vehicle assigned to tour 𝒜\mathcal{A} can leave from the depot dd no earlier than startA and must return to the depot no later than endA. A schedule 𝒮={𝒜,,}\mathcal{S}=\left\{\mathcal{A},\mathcal{B},\dots\right\} consists of |𝒮|=m\lvert\mathcal{S}\rvert=m tours.

3.2 Objective Function

During the Ordering Phase we aim to accept as many customers as possible, while offering each customer the largest possible selection of delivery time windows. New customer orders are accepted if at least one feasible insertion into the current delivery schedule can be found. Ideally, the working schedule would contain few large chunks of idle time rather than many short ones. As this is intractable to model in practice, we alternatively choose the total travel time as objective function to avoid introducing an unnecessarily complicated model. Minimizing the total travel time has proven to be a reasonable choice in practice. Although Bent and Van Hentenryck [5] show that the use of a consensus function in their Multiple-Scenario Approach results in more robust schedules and the acceptance of more customers, their approach is not applicable to our problem, as maintaining several scenarios would introduce additional complexity and require too much computational effort.

3.3 Arrival Times & Feasibility

For the insertion of a new customer into an existing schedule we first need to define the feasibility of an insertion. We are going to use common concepts that we briefly describe in the following.

3.3.1 Earliest & Latest Arrival Times

We consider a fixed tour 𝒜=(0,1,,n,n+1)\mathcal{A}=(0,1,\dots,n,n+1), where 0 and n+1n+1 are equal to the depot dd and (1,,n)(1,\ldots,n) are the customers assigned to the tour. We use the concept of earliest and latest arrival time eie_{i} and i\ell_{i}, as in [9], which give the earliest (latest) time at which the vehicle may arrive at customer ii, while not violating time window and travel time constraints on the remaining tour:

e0:=start𝒜,\displaystyle e_{0}:=start_{\mathcal{A}},~ ej+1:=max{Bw(j+1),ej+s(j)+t(j,j+1)},j[n1]0,\displaystyle e_{j+1}:=\max\left\{B_{w(j+1)},~e_{j}+s(j)+t(j,j+1)\right\},j\in[n-1]_{0},
en+1:=en+s(n)+t(n,n+1),\displaystyle e_{n+1}:=e_{n}+s(n)+t(n,n+1),
n+1:=end𝒜,\displaystyle\ell_{n+1}:=end_{\mathcal{A}},~ j1:=min{Ew(j1),jt(j1,j)s(j1)},j[n]{1},\displaystyle\ell_{j-1}:=\min\left\{E_{w(j-1)},~\ell_{j}-t(j-1,j)-s(j-1)\right\},j\in[n]\setminus\{1\},
0:=1t(0,1).\displaystyle\ell_{0}:=\ell_{1}-t(0,1).

Here, we assume s(0)=s(n+1)=0s(0)=s(n+1)=0.
Following the definitions, vehicles always leave as early as possible from the depot. This generates unnecessary idle time before serving the first customer of a tour. Hence, once the delivery schedule is finalized, we alter the start times of the vehicle in order to avoid this.

A schedule 𝒮\mathcal{S} is feasible if all its tours are feasible. A tour 𝒜\mathcal{A} is feasible if it satisfies both of the following conditions:

eiEw(i),i[n]en+1end𝒜,\displaystyle e_{i}\leq E_{w(i)},~i\in[n]\quad\wedge\quad e_{n+1}\leq end_{\mathcal{A}},\qquad TFEAS(𝒜),\displaystyle\text{{{TFEAS($\mathcal{A}$)}}},
i[n]c(i)C𝒜,\displaystyle\sum\limits_{i\in[n]}c(i)\leq C_{\mathcal{A}},\qquad CFEAS(𝒜).\displaystyle\text{{{CFEAS($\mathcal{A}$)}}}.

While TFEAS(𝒜\mathcal{A}) ensures that the arrival times at each customer assigned to tour 𝒜\mathcal{A} are within their assigned time windows, CFEAS(𝒜\mathcal{A}) guarantees that the capacity of 𝒜\mathcal{A} is not exceeded. Note that we do not need to check for TFEAS(𝒜\mathcal{A}) if Bw(i)ei,i[n],B_{w(i)}\leq e_{i},\ i\in[n], as this is ensured by the definition of eie_{i}.

3.3.2 Insertion Points

The set Θ(j,𝒜)\Theta(j,\mathcal{A}) is required for the approaches applied in the Get TWs Step and defines after which customers we try to insert customer jj into 𝒜\mathcal{A} during its (pre)assigned time slot. Accordingly, we define:

Θ(j,𝒜):=[Θ(j,𝒜),Θ+(j,𝒜)],\displaystyle\Theta(j,\mathcal{A}):=[\Theta^{-}(j,\mathcal{A}),\Theta^{+}(j,\mathcal{A})],
where
Θ(j,𝒜):=mini[n]0{i:Bw(j)+s(j)i},\displaystyle\Theta^{-}(j,\mathcal{A}):=\min\limits_{i\in[n]_{0}}\{i\colon B_{w(j)}+s(j)\leq\ell_{i}\},
Θ+(j,𝒜):=maxi[n]0{i:ei+s(i)Ew(j)}.\displaystyle\Theta^{+}(j,\mathcal{A}):=\max\limits_{i\in[n]_{0}}\{i\colon e_{i}+s(i)\leq E_{w(j)}\}.

The index Θ(j,𝒜)\Theta^{-}(j,\mathcal{A}) defines the first customer (or the depot) on tour 𝒜\mathcal{A} after which customer jj could potentially be inserted. Likewise, Θ+(j,𝒜)\Theta^{+}(j,\mathcal{A}) defines the last customer (or the depot). Clearly, if Θ(j,𝒜)>Θ+(j,𝒜)\Theta^{-}(j,\mathcal{A})>\Theta^{+}(j,\mathcal{A}), the insertion of jj during w(j)w(j) is infeasible.

3.3.3 Feasibility of an Insertion

The feasibility of the possible insertion points Θ(j,𝒜)\Theta(j,\mathcal{A}) can be checked easily with earliest and latest arrival times, e.g., see [9]. Similar to the definitions above and with the help of eie_{i} and i,i𝒜\ell_{i},\ i\in\mathcal{A}, we define the earliest and latest arrival time e~j,i\tilde{e}_{j,i} and ~j,i\tilde{\ell}_{j,i} for inserting a new customer j𝒜j\notin\mathcal{A} after iΘ(j,𝒜)𝒜i\in\Theta(j,\mathcal{A})\subseteq\mathcal{A} within the (pre)assigned time window w(j)w(j) as follows.

e~j,i:=max{Bw(j),ei+s(i)+t(i,j)},\displaystyle\tilde{e}_{j,i}:=\max\left\{B_{w(j)},~e_{i}+s(i)+t(i,j)\right\},
~j,i:=min{Ew(j),i+1t(j,i+1)s(j)}.\displaystyle\tilde{\ell}_{j,i}:=\min\left\{E_{w(j)},~\ell_{i+1}-t(j,i+1)-s(j)\right\}.

Thus, customer jj can be inserted between customers ii and i+1i+1, such that jj and all subsequent customers of 𝒜\mathcal{A} can be served within their assigned time windows if and only if the following condition holds.

e~j,i~j,i,\displaystyle\tilde{e}_{j,i}\leq\tilde{\ell}_{j,i}, TFEAS(j,i,𝒜),\displaystyle\texttt{{TFEAS($j,{i},\mathcal{A}$)}},

We refer to Figure 2 for an illustration.

BwB_{w}EwE_{w}iii+1i+1jjjjt(i,j)\quad t(i,j)t(j,i+1)\quad t(j,i+1)s(j)s(j)s(i)s(i)e~j,i\tilde{e}_{j,i}~j,i\tilde{\ell}_{j,i} eie_{i}i+1\ell_{i+1}\leqTimeBwB_{w}EwE_{w}iii+1i+1jjjjt(i,j)\quad t(i,j)t(j,i+1)\quad t(j,i+1)s(j)s(j)s(i)s(i)e~j,i\tilde{e}_{j,i} ~j,i\tilde{\ell}_{j,i} eie_{i}i+1\ell_{i+1}\nleqTime
Figure 2: On the left TFEAS(j,i,𝒜j,i,\mathcal{A}) holds, on the right it does not.

Additionally, we must check if the sum of the weights of the customer orders assigned to tour 𝒜\mathcal{A} does not exceed the capacity C𝒜C_{\mathcal{A}}. The insertion of jj into tour 𝒜\mathcal{A} is feasible with respect to capacity if the following condition holds:

i[n]c(i)+c(j)C𝒜,\displaystyle\sum\limits_{i\in[n]}c(i)+c(j)\leq C_{\mathcal{A}}, CFEAS(j,𝒜).\displaystyle\texttt{{CFEAS($j,\mathcal{A}$)}}.

Assuming that all earliest (latest) arrival times and the sum of order weights on a tour 𝒜\mathcal{A} have already been calculated, TFEAS(j,i,𝒜j,i,\mathcal{A}) and CFEAS(j,𝒜j,\mathcal{A}) allow to check the feasibility of a possible insertion into a given time window in 𝒪(1)\mathcal{O}(1) time provided that the sequence of 𝒜\mathcal{A} (except for jj) stays the same. If the feasibility check was successful and we decide to insert jj, we obtain a new tour 𝒜~=𝒜+ij=(0,1,,i,j,i+1,,n,n+1)\mathcal{\tilde{A}}=\mathcal{A}+_{i}j=(0,1,\dots,i,j,i+1,\dots,n,n+1). Customer jj is then assigned to index i+1i+1, and all indices of succeeding customers are incremented by one. Clearly, the earliest and latest arrival times and the sum of order weights of the modified tour must be updated. This requires 𝒪(n)\mathcal{O}(n) time [7].

In general, there exist cases where a feasible insertion of jj is only possible when the order of 𝒜\mathcal{A} is changed, which makes the problem 𝒩𝒫\mathcal{NP}-hard.

3.4 Slot Optimization Problem

With the introduced notation, we can recall the formal definition of the (SOP) [19], which arises in the Get TWs step. We are given a feasible schedule 𝒮\mathcal{S} containing all scheduled customers 𝒞\mathcal{C}, a new customer j,j𝒞j,\ j\notin\mathcal{C}, and the given set of time slots 𝒲\mathcal{W}. Then, the SOP asks for the largest set of time slots 𝒯j𝒲\mathcal{T}_{j}\subseteq\mathcal{W} such that jj can be serviced during each delivery slot u𝒯ju\in\mathcal{T}_{j} by at least one vehicle of the fleet, while assuring that all other scheduled orders stay within their assigned time slot. Hence, the objective is to maximize |𝒯j|\lvert\mathcal{T}_{j}\rvert.

In more detail, the SOP aims to find at least one feasible schedule for each of the VRPTW instances consisting of scheduled customers 𝒞\mathcal{C} and the new customer jj being temporarily assigned to one of the time windows u𝒲u\in\mathcal{W}. Choosing one delivery slot for a new customer order makes the SOP equivalent to the feasibility version of an appropriate VRPTW instance. As the VRPTW is strongly 𝒩𝒫\mathcal{NP}-hard [23] also the SOP is strongly 𝒩𝒫\mathcal{NP}-hard and consists of several feasibility problems that are all strongly 𝒩𝒫\mathcal{NP}-complete.

4 Mathematical Approaches

We start with introducing the algorithms that we use to tackle our proposed AHD system in Sections 4.1 - 4.4. Then, in Subsection 4.5 we describe how they are combined and applied to the different steps of the Ordering Phase.

4.1 Simple Insertion Heuristic

The Simple Insertion, based on [29], takes a new customer jj, a tour 𝒜\mathcal{A}, and tries to insert jj into the temporarily assigned time window w(j)𝒲w(j)\in\mathcal{W}. It stops as soon as it finds a feasible insertion point iΘ(j,𝒜)i\in\Theta(j,\mathcal{A}), i.e., when TFEAS(j,i,𝒜j,i,\mathcal{A}) and CFEAS(j,𝒜j,\mathcal{A}) hold. Note, since the order of customers is not altered, the procedure has a linear run time 𝒪(|𝒜|)\mathcal{O}(\lvert\mathcal{A}\rvert).

We iteratively apply the Simple Insertion to all time windows u𝒲u\in\mathcal{W} and all tours 𝒜𝒮u\mathcal{A}\in\mathcal{S}_{u} to calculate the set of time windows that can be offered to the new customer jj. 𝒮u\mathcal{S}_{u} defines the set of tours including time window uu, i.e., 𝒜𝒮u\mathcal{A}\in\mathcal{S}_{u} if and only if start𝒜Bu<Euend𝒜start_{\mathcal{A}}\leq B_{u}<E_{u}\leq end_{\mathcal{A}}. A time window is considered as being available if at least one feasible insertion point can be found.

4.2 Local Search Heuristic

We apply a Local Search heuristic that uses the following neighborhoods for exchanging customer orders between two tours.

  1. 1.

    The 1move  neighborhood moves a customer jj from a tour 𝒜\mathcal{A} to another tour \mathcal{B}, 𝒜\mathcal{A}\neq\mathcal{B}.
    If at least one feasible insertion position for jj in \mathcal{B} is found, i.e., TFEAS(j,i,j,i,\mathcal{B}) and CFEAS(j,j,\mathcal{B}) hold, which additionally decreases the total travel time of the delivery schedule, we denote the 1move  as improving.

  2. 2.

    The 1swap  neighborhood exchanges two customers between two different tours, e.g., switch j𝒜j\in\mathcal{A} with ii\in\mathcal{B}. Again, if a feasible swap with decreased total travel time is found, we denote the 1swap  as improving.

Savelsbergh [29] uses similar neighborhoods calling them Relocate and Exchange. Clearly, if no improving 1move (1swap) could be found for a pair of tours (𝒜,)𝒮(\mathcal{A},\mathcal{B})\in\mathcal{S}, 𝒜\mathcal{A}\neq\mathcal{B}, and both tours have not been modified meanwhile, then there is no need to perform those operations for this pair of tours again. Preliminary experiments showed that the computation times are reduced by a third by storing this information during the updates.

4.3 Adaptive Neighborhood Search Heuristic

We extend the ANS for solving the SOP proposed by Hungerländer et al. [19] such that it can also be applied to overlapping time windows. This results in different interdependencies between time windows as well as slightly weaker (in)feasibility conditions. In the following, we state all definitions required to describe our ANS.

4.3.1 First/Last Customer

For a given tour 𝒜\mathcal{A} we define the first and last customer belonging to a given time slot u𝒲u\in\mathcal{W} as

f(u):=mini[n]{i:BuBw(i)Ew(i)Eu},\displaystyle f(u):=\min_{i\in[n]}\left\{i:B_{u}\leq B_{w(i)}\leq E_{w(i)}\leq E_{u}\right\},
l(u):=maxi[n]{i:BuBw(i)Ew(i)Eu}.\displaystyle l(u):=\max_{i\in[n]}\left\{i:B_{u}\leq B_{w(i)}\leq E_{w(i)}\leq E_{u}\right\}.

If above sets are empty, then the indices are not defined, i.e., [f(u),l(u)]=[f(u),l(u)]=\emptyset.

In case of non-overlapping time slots and if w(j)=u,j𝒜,w(j)=u,\ j\notin\mathcal{A}, uu is not empty, i.e., there is at least one customer i𝒜i\in\mathcal{A} assigned to uu, the following statement holds:

Θ(j,𝒜){f(u)1,,l(u)}.\Theta(j,\mathcal{A})\subseteq\{f(u)-1,\ldots,l(u)\}.

4.3.2 Neighborhoods

Our ANS heuristic considers two different neighborhoods for a time window u𝒲u\in\mathcal{W} and a tour 𝒜𝒮\mathcal{A}\in\mathcal{S}.

  • Inside includes all operations with customers inside uu :
    in(u,𝒜):={i𝒜:i[f(u),l(u)]}.in(u,\mathcal{A}):=\{i\in\mathcal{A}:i\in[f(u),l(u)]\}.

  • Outside represents operations with customers outside uu :
    out(u,𝒜):=𝒜(in(u,𝒜){0,n+1}).out(u,\mathcal{A}):=\mathcal{A}\setminus(in(u,\mathcal{A})\cup\{0,n+1\}).

The inside of uu consists of customers i𝒜i\in\mathcal{A} that are

  • assigned to time window u=w(i){u}=w(i),

  • assigned to a time window that is included in uu : susw(i)ew(i)eus_{u}\leq s_{w(i)}\leq e_{w(i)}\leq e_{u},

  • or, captured by customers of uu (or its included time windows), e.g., there exist two customers j,k𝒜j,k\in\mathcal{A} with w(j)=w(k)=uw(j)=w(k)=u such that j<i<kj<i<k and i,j,k[n]i,j,k\in[n].

Clearly, in(u,𝒜)in(u,\mathcal{A}) is dependent on the actual tour sequence. However, in case of non-overlapping time windows, the customers inside uu are exactly those who are assigned to uu, i.e., in(u,𝒜)={i𝒜:w(i)=u}in(u,\mathcal{A})=\{i\in\mathcal{A}:w(i)=u\}. In Figure 3, we illustrate the definitions that have been introduced so far.

BuB_{{u}}EuE_{{u}}Eu1E_{{u-1}}Bu+1B_{{u+1}}Eu+1E_{{u+1}}Bu+2B_{{u+2}}f(u){f({u})}f(u)+1{f({u})+1}f(u)+2{f({u})+2}l(u)1{l(u)-1}l(u){l(u)}l(u)+1{l(u)+1}u1u-1: 08:00-09:30u+1u+1: 09:00-09:45uu: 09:00-11:00u+2u+2: 10:00-11:30Θ(j,𝒜)\Theta^{-}(j,\mathcal{A})Θ+(j,𝒜)\Theta^{+}(j,\mathcal{A})Time

Figure 3: Illustration of the first f(u)f(u) and last customer l(u)l(u) of uu in case of overlapping time windows. Moreover, we indicate the positions of the insertion points Θ(j,𝒜)\Theta^{-}(j,\mathcal{A}) and Θ+(j,𝒜)\Theta^{+}(j,\mathcal{A}) (vertical lines). We notice that Θ(j,𝒜)\Theta(j,\mathcal{A}) and {f(u)1,,l(u)}\{f(u)-1,\ldots,l(u)\} differ as also the insertion of jj after customer l(u)+1{l(u)+1} must be considered. Further, we observe that customer f(u)+2{f(u)+2} is inside uu although being assigned to time window u1u-1.

4.3.3 Loss and Free Time

For a tour 𝒜\mathcal{A} and a new customer jj who has to be inserted into time slot uu, we define

χu(j,𝒜)\displaystyle\chi_{u}^{-}(j,\mathcal{A}) :=max(ef(u),maxiΘ(j,𝒜),if(u)e~j,i)Bu,\displaystyle:=\max\bigg{(}e_{f(u)},~\max_{i\in\Theta(j,\mathcal{A}),~i\leq f(u)}\tilde{e}_{j,i}\bigg{)}-B_{u},
χu+(j,𝒜)\displaystyle\chi_{u}^{+}(j,\mathcal{A}) :=Eumin(l(u),miniΘ(j,𝒜),il(u)~j,i).\displaystyle:=E_{u}-\min\bigg{(}\ell_{l(u)},~\min_{i\in\Theta(j,\mathcal{A}),~i\geq l({u})}\tilde{\ell}_{j,i}\bigg{)}.

The χu\chi_{u}^{-} corresponds to the amount of time that is “lost” at the beginning of time slot u{u}. This can be caused by the service time required for the last customer order before (outside) uu or the travel time needed for going from that customer to the first customer inside uu. Similarly, χu+\chi_{u}^{+} corresponds to the loss of time at the end of time slot u{u} caused by the time required for traveling to the first customer after (outside) uu or the service time at the last customer inside uu.

Further, we denote χu(j,𝒜):=χu(𝒜,j)+χu+(j,𝒜)\chi_{u}(j,\mathcal{A}):=\chi_{u}^{-}(\mathcal{A},j)+\chi_{u}^{+}(j,\mathcal{A}) as the loss time of time window u{u}. In case that [f(u),l(u)]=[f(u),l(u)]=\emptyset, the loss time is given by

χu(j,𝒜)=maxiΘ(j,𝒜)((e~j,isu)+(eu~j,i)).\chi_{u}(j,\mathcal{A})=\max_{i\in\Theta(j,\mathcal{A})}\big{(}(\tilde{e}_{j,i}-s_{u})+(e_{u}-\tilde{\ell}_{j,i})\big{)}.

Figure 4 illustrates the χu(j,𝒜)\chi_{u}^{-}(j,\mathcal{A}) and χu+(j,𝒜)\chi_{u}^{+}(j,\mathcal{A}) on a tour with non-overlapping time windows. Clearly, if χu(j,𝒜)=0\chi_{u}(j,\mathcal{A})=0, then a violation of TFEAS(𝒜\mathcal{A}) for jj can only be repaired by removing (exchanging) customers that are inside uu.

f(u)1{f(u)-1}f(u){f({u})}jjl(u){l({u})}l(u)+1{l({u})+1}χu(j,𝒜)\chi_{u}^{-}(j,\mathcal{A})χu+(j,𝒜)\chi_{u}^{+}(j,\mathcal{A})BuB_{{u}}EuE_{{u}}ef(u)1e_{f({u})-1}ef(u)e_{f({u})}l(u)\ell_{l({u})}l(u)+1\ell_{l({u})+1}u{u}Time

Figure 4: Illustration of the loss time χu(j,𝒜)\chi_{u}(j,\mathcal{A}). Here, the case that the new customer jj is inserted into a tour, with non-overlapping time windows, between two other customers assigned to time slot u{u}, is considered.

Furthermore, we want to quantify the amount of service and travel time that is needed for inserting jj during time window u{u}. For a given tour 𝒜\mathcal{A} the free time of time slot u{u} is defined as

λu(𝒜):=(EuBu)(I)i=f(u)l(u)1(s(i)+t(i,i+1))(II),\displaystyle\lambda_{{u}}(\mathcal{A}):=\underbrace{\left(E_{u}-B_{u}\right)}_{(I)}-\underbrace{\sum\limits_{i=f({u})}^{l({u})-1}\big{(}s(i)+t(i,i+1)\big{)}}_{(II)},

where (I)(I) is the length of u{u} and (II)(II) is the amount of service and travel time that must be handled within u{u}. In case that the indices f(u)f({u}) and l(u)l({u}) are not defined, i.e., in(u,𝒜)=in(u,\mathcal{A})=\emptyset, term (II)(II) is set to 0. In Figure 5, we provide an illustration of the free time.

f(u){f({u})}f(u)+1{f({u})+1}l(u)1{l({u})-1}l(u){l({u})}λu(𝒜)\lambda_{u}(\mathcal{A})u{u}BuB_{{u}}EuE_{{u}}Time

Figure 5: Illustration of free time λu(𝒜)\lambda_{u}(\mathcal{A}) for a single time window.

Considering non-overlapping time windows, the insertion of customer jj after a customer i{f(u)1,,l(u)}i\in\{{f({u})-1},\allowbreak\ldots,l({u})\} requires an additional amount of (travel and service) time that must be handled within time window u{u} and can be calculated by λu(𝒜)λu(𝒜+ij)\lambda_{u}(\mathcal{A})-\lambda_{{u}}(\mathcal{A}+_{i}j). This assumes that all customers between f(u){f({u})} and l(u){l({u})} can be moved arbitrarily (while maintaining their sequence) within time slot u{u}, i.e., all customers assigned to uu can be seen as one consecutive block which length is given by (II)(II). Hence, the above statement is weakened in the case of overlapping time windows as some customers inside uu may be restricted by their assigned time windows such that no consecutive block of customers can be formed. Therefore, a larger amount of time than (II)(II) may be required for tour 𝒜\mathcal{A} after the insertion of customer jj.

4.3.4 Feasibility and Infeasibility Conditions

The insertion of jj into 𝒜\mathcal{A} is infeasible if the following holds:

maxiΘ(j,𝒜)λu(𝒜+ij)<0.\displaystyle\max\limits_{i\in\Theta(j,\mathcal{A})}~\lambda_{{u}}(\mathcal{A}+_{i}j)<0. (1)

We note that Condition (1) solely depends on the customers inside uu. Hence, in case of non-overlapping time windows, it is only dependent on the customers assigned to time slot uu.

Moreover, in case of non-overlapping time slots, the insertion of jj into 𝒜\mathcal{A} is feasible for at least one insertion position if the following inequality holds:

maxiΘ(j,𝒜)λu(𝒜+ij)χu(𝒜,j)0.\displaystyle\max\limits_{i\in\Theta(j,\mathcal{A})}~\lambda_{{u}}(\mathcal{A}+_{i}j)-\chi_{u}(\mathcal{A},j)\geq 0. (2)

Note that the statement does not hold in the case of overlapping time windows.

4.3.5 Algorithm

Finally, we can concisely describe the details of our ANS for the SOP as follows. We temporarily assign the new customer jj to each time window u𝒲.u\in\mathcal{W}. For each tour 𝒜𝒮u\mathcal{A}\in\mathcal{S}_{u} we apply the steps described below, which try to insert jj into 𝒜\mathcal{A} within its assigned time window w(j)=uw(j)=u. If this is possible, uu is added to the set of available time windows 𝒯j𝒲\mathcal{T}_{j}\subseteq\mathcal{W}.

  • Step 1 ensures that the current tour 𝒜\mathcal{A} fulfills CFEAS(j,𝒜j,\mathcal{A}). . If i[n]c(i)+c(j)>C𝒜\sum\limits_{i\in[n]}c(i)+c(j)>C_{\mathcal{A}} holds, then customer aa cannot be feasibly inserted into tour 𝒜\mathcal{A}. In this case, we have to reduce the overall weight i[n]c(i)\sum\limits_{i\in[n]}c(i) of 𝒜\mathcal{A}. This is achieved by applying local search operations 1move and 1swap, while as few operations as possible are used. Therefore, as much weight as possible is moved in each step and the operations stop once there is sufficient spare capacity on 𝒜\mathcal{A} to insert jj, i.e., i[n]c(i)+c(j)C𝒜\sum\limits_{i\in[n]}c(i)+c(j)\leq C_{\mathcal{A}} holds. If we do not succeed in modifying 𝒜\mathcal{A} such that CFEAS(j,𝒜j,\mathcal{A}) holds, we terminate.

  • In Step 2 we aim to increase the free time λu(𝒜)\lambda_{u}(\mathcal{A}) through local search operations within Inside until the Infeasibility Condition (1) does not hold anymore. λu(𝒜)\lambda_{u}(\mathcal{A}) is increased by applying as few operations as possible. That way, the previously optimized schedule 𝒮u\mathcal{S}_{u} is not altered more than necessary. If a local optimum is reached, meaning no further improvements can be achieved by local search operations, and (1) is still satisfied, the algorithm stops because the following steps cannot result in a feasible insertion of the new customer.

  • Step 3 is concerned with reducing the loss time χu(j,𝒜)\chi_{u}(j,\mathcal{A}) of time slot uu through local improvement operations within Outside. The operations are applied until either the new customer order can be inserted into the tour, the loss time is equal to zero χu(j,𝒜)=0\chi_{u}(j,\mathcal{A})=0, or a local optimum is reached.

  • Finally, in Step 4 we try to further increase the free time through local search operations within Inside. The free time is increased until either the insertion of customer jj is possible or a local optimum (of the free time objective) is reached and hence, we are not able to insert jj within time slot uu.

Note that we apply local search operations during Steps 2-4 only if CFEAS(j,𝒜j,\mathcal{A}) still holds. Further, we apply local search operations during Step 3 only if the Infeasibility Condition (1) does not hold for the resulting tour 𝒜\mathcal{A}.

4.4 Exact Approach for Solving a Subproblem

In this subsection, we consider the TSPTW, a sub-problem of the VRPTW, which was first introduced by Savelsbergh [29]. The TSPTW is concerned with minimizing the travel time of a single tour 𝒜𝒮\mathcal{A}\in\mathcal{S} of the VRPTW, while all other tours in the schedule are fixed. Hungerländer and Truden [18] give two competitive MILP formulations for the TSPTW that we utilize in our hybrid approaches (described in Subsection 4.5):

  1. 1.

    A general model that can be applied to any TSPTW instance (having asymmetric travel times) regardless of the structure of the defined time windows 𝒲\mathcal{W}.

  2. 2.

    A second model that is tailored to the TSP with structured Time Windows (TSPsTW). It is assumed that the time windows 𝒲\mathcal{W} are pair-wise non-overlapping and that the number of customers |𝒞|=p\lvert\mathcal{C}\rvert=p is much larger than the number of time windows |𝒲|=q\lvert\mathcal{W}\rvert=q, i.e., pqp\gg q, and therefore typically several customers are assigned to the same time window. This allows a simplified MILP formulation that performs significantly better.

We refer the reader to the proceedings paper [18] for details on both MILPs as well as a short computational study that compares both formulations.

In contrast to the VRPTW the TSPTW is concerned with single tours. Hence, it is unnecessary to include a capacity constraint in the MILP models, as the sum of order weights of a tour is independent of the actual sequence of the customers on the tour.

4.5 Solution Approaches

Now we can combine the heuristics and MILPs presented above to conduct sufficiently fast Get TWs, Set TW, and Improvement steps in order to deal with the computational challenges that arise during the Ordering Phase.

4.5.1 Get TWs step

In this step, we aim to quickly identify all time windows 𝒯j𝒲\mathcal{T}_{j}\subseteq\mathcal{W} during which a new customer jj can be inserted into (at least one of) the current tours. We compare to following approaches.

  • Simple Insertion heuristic,

  • ANS heuristic,

  • A feasibility version of the suggested MILPs for solving the TSPTW, which are applied for each time slot u𝒲u\in\mathcal{W} and for each 𝒜𝒯u\mathcal{A}\in\mathcal{T}_{u}.

4.5.2 Set TW step

Once customer jj has selected a time window u𝒯ju\in\mathcal{T}_{j}, we double-check its availability in the same way as in the Get TWs step and then immediately insert jj into uu at the best insertion point found. In contrast to the Get TWs step, we run the Simple Insertion or the ANS over all tours and all insertion points and select the feasible insertion point that results in the least increase of the total travel time of the schedule. Thus, we do not stop the algorithm after the first feasible insertion point is found. In the case of the TSPTW MILPs we apply their standard formulations for finding an optimal tour after the insertion of jj, rather than their corresponding feasibility versions.

4.5.3 Improvement step

In this step we aim to reduce the total travel time of the schedule. We compare the following approaches.

  • 1move + (1swap) improvement. The computationally cheap yet quite effective, Local Search heuristic builds the foundation of the Improvement step. We apply 1move  (and 1swap)   operations, where we focus on the 1move  operations if possible, because they are computationally cheaper and, in general, more effective than 1swap  operations. We stop our Local Search heuristic once we reach a local minimum of the objective function with respect to the selected neighborhood.

  • 1move + 1swap + TSP(s)TW improvement. After applying the Local Search heuristic we additionally run our TSP(s)TW MILP on all tours that have changed since the last Improvement step. We use the current tours of our delivery schedule as the initial solution for TSP(s)TW MILP. While 1move and 1swap exchange customers between different tours, the TSP(s)TW MILP re-orders them within the tours, which makes it a useful complement to the Local Search heuristics. In practice, optimizing the single tours of a schedule to optimality has proven to be critical to ensure driver satisfaction as it guarantees that drivers do not encounter any inefficiencies on their routes.

The above improvement procedures are arranged in ascending order with respect to their computational effort.

During the Ordering Phase the proposed Local Search procedures only perform improving operations. However, the algorithms can be simply altered to a Simulated Annealing approach [20] by allowing also non-improving operations. However, this is more suitable for the Preparation Phase, when more time is available for improving the delivery schedule.

5 Computational Study and Analysis

We want to provide a performance evaluation of the different steps and approaches of the Ordering Phase. First, in Section 5.1, we describe the design of our test instances. In Section 5.2, we analyze how well, in terms of run time and solution quality, do the different Get TWs approaches perform. Then, we compare the different Improvement approaches in Section 5.3. Finally, in Section 5.4, we compare the performance of different combinations of approaches for the Get TWs and the Improvement step.

5.1 Design of the Instances

The benchmark instances are designed to reflect instances as they arise in the online grocery shopping service of an international grocery retailer regarding travel times, length of time windows, duration of service times, customer order weights, and their proportions to vehicle capacities. Our benchmark instances are derived from those originally proposed by [11] and have the following characteristics.

  • Grid Size. We consider a 2020 km ×\times 2020 km square grid. This roughly corresponds to the size of a European capital such as Vienna, Austria. Note that each instance corresponds to one delivery region that is served by one depot, which has its assigned fleet of vehicles.

  • Placing of Customers. When placing the customers on the chosen grid, we tried to recreate urban settlement structures. Typically, these are characterized by varying customer densities. To simulate this behavior, only 20 %20\text{\,}\mathrm{\char 37\relax} of the customer locations have been sampled from a two-dimensional uniform distribution, while the remaining 80 %80\text{\,}\mathrm{\char 37\relax} of the customer locations have been randomly assigned to 1515 clusters. The center (location) of each cluster μ=(μx,μy)\mu=(\mu_{x},\mu_{y}) is sampled from a two-dimensional uniform distribution. The shape of each cluster is defined by the covariance matrix Σ=(σx200σy2)\Sigma=\begin{pmatrix}{\sigma_{x}}^{2}&0\\ 0&{\sigma_{y}}^{2}\end{pmatrix}, where σx2{\sigma_{x}}^{2} and σy2{\sigma_{y}}^{2} both follow a uniform distribution. Furthermore, the clusters have been rotated by a random angle between 0 and 2π2\pi. Customer locations have been sampled from the multivariate normal distribution N(μ,Σ)N(\mu,\Sigma) of the assigned cluster and all coordinates have been rounded to integers. Moreover, the numbering of the customers is randomly permuted.

  • Depot location. We consider two different placements of the depot: At the center of the grid and at the center of the top left quadrant. In each test setup, there are equally many instances for both variants.

  • Travel times. We assume a travel speed of 2020 km/h, see Pan et al. [27]. This number can be further supported by a recent report by Vienna Public Transport [32], where an average travel speed for their fleet of buses of 17.717.7 km/h during the day, 17.217.2 km/h at peak times, and 20.020.0 km/h during evening hours has been reported. The distance between two locations is calculated as the Euclidean distance between them. Travel times are calculated proportionally to the Euclidean distances using the assumed travel speed and are rounded to integer seconds. As the Euclidean distance between two points is in general shorter than the shortest path distance in an underlying road network, we multiply all distances by a correction factor of 1.51.5 [10].

  • Order weights. The order weights of customers have been sampled from a truncated normal distribution with mean of 7 and standard deviation of 2, where the lower bound is 1 and the upper bound is 15. The values are rounded to integers. Each vehicle has a loading capacity of 200200 units.

  • Service times. We assume the service time for each customer to be 5 minutes.

  • Shift patterns. All tours have the same start and end times. The vehicle operation times are chosen such that they do not restrict the actual problem.

  • Customer choice model. Customers are iteratively inserted into the schedule following a simple customer choice model that simulates the decisions that are usually taken by the customers. We have chosen a simple model (following [10]), where every customer has just one desired delivery time window that has been set beforehand in the benchmark instance. If the preferred time window is not offered to the customer, we assume that the customer refuses to place an order. As in reference [2], we assume that all delivery time windows are equally prominent among customers in order to obtain unbiased results that allow for easier identification and clearer interpretation of the key findings. Following a uniform distribution, we simulate this by a random assignment of each customer to one time window out of the defined set of time windows 𝒲\mathcal{W}.

  • For all our experiments we consider the following three sets of delivery time windows 𝒲\mathcal{W}:

    • Set 𝒲NO\operatorname*{\mathcal{W}_{\text{NO}}}: 1010 non-overlapping time windows having length of 11 hour each, e.g., 08:00-09:00, 09:00-10:00, etc.

    • Set 𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}}: 1010 overlapping time windows having length of 1.51.5 hours each (except for the last time window, which has 11 hour length), where each window overlaps the preceding time window by 3030 minutes, e.g., 08:00-09:30, 09:00-10:30, etc.

    • Set 𝒲OV3\operatorname*{\mathcal{W}_{\text{OV}3}}: 1212 overlapping time windows, consisting of 99 windows having length of 11 hour each, 08:00-09:00, 10:00-11:00,…, 16:00-17:00 and (as used by Köhler et al. [24]) 33 time windows of 33 hours length, morning: 08:00-11:00, noon: 11:00-14:00, afternoon: 14:00-17:00.

In summary, our assumptions were chosen in order to find a good compromise between realistic real-world instances and enabling a concise description and interpretation of the experimental setup.

All experiments were performed on an Ubuntu 14.04 machine powered by an Intel Xeon E5-2630V3 @ 2.4 GHz 8 core processor and 132 GB RAM. We implemented all algorithms in Java Version 8 and use Gurobi 8.1.0 as MILP-solver in single-thread mode. Parallelization of the applied methods is not considered. We run each experimental configuration on 100100 instances and report average values. Note that the absence of overlapping time windows allows using a more efficient MILP formulation of the TSPTW for 𝒲NO\operatorname*{\mathcal{W}_{\text{NO}}} than for 𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}} and 𝒲OV3\operatorname*{\mathcal{W}_{\text{OV}3}} (see Section 4.4).

5.2 Comparing Get TWs Approaches

In this section, we evaluate the performance of the proposed Get TWs approaches, i.e., we compare the Simple Insertion heuristic, the ANS heuristic, and the TSP(s)TW Insertion approach in terms of run time and solution quality.

5.2.1 Test Setup

In order to allow a proper comparison of the methods for solving the SOP, we constructed instances which consist of

  • A feasible schedule which contains pp customers, and

  • a new customer order for which the availability of delivery time slots must be decided.

To create SOP instances for benchmarking we had to create feasible delivery schedules that are already filled with orders. Hence, we created delivery schedules by iteratively trying to insert 20002000 customers into each schedule. The Simple Insertion heuristic was used to conduct the feasibility checks. The number of customers that are contained in the resulting schedule is denoted by p^\hat{p}. We consider p^\hat{p} being a sufficiently good approximation of the maximal number that can be inserted into a schedule considering a given configuration. Hence, we distinguish two scenarios.

  1. 1.

    In the first scenario, we perform no optimization between the insertion steps.

  2. 2.

    In the second scenario, the schedule is re-optimized by applying 1move after each customer insertion. This reduces the total travel time of the schedule. We restrict the Improvement step to the most simple approach to avoid unwanted bias when evaluating the Get TWs step.

In general, the schedules in the second scenario contain more orders while utilizing the same number of vehicles. Since the practical hardness of the SOP increases as the schedules get filled up with customers, we consider SOP instances with different fill levels. The fill level ff of a schedule is defined as the ratio between the number of customers pp in the schedule and the maximal number of customers p^\hat{p} that can be inserted into the schedule. For benchmarking at a given fill level ff we select the schedule that was generated during above described process, containing p=fp^p=\lceil f\cdot\hat{p}\rceil orders. For each generated instance we solve the SOP using the Simple Insertion heuristic, the TSP(s)TW Insertion approach, and the proposed ANS heuristic. In order to investigate the differences between the considered methods, we analyze their performance on all three sets of time windows (𝒲NO\operatorname*{\mathcal{W}_{\text{NO}}}, 𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}}, 𝒲OV3\operatorname*{\mathcal{W}_{\text{OV}3}}), instance sizes, and fill levels. Hence, we run tests on benchmark instances with 6060 tours (vehicles) and consider fill levels of 85 %85\text{\,}\mathrm{\char 37\relax}, 90 %90\text{\,}\mathrm{\char 37\relax}, 95 %95\text{\,}\mathrm{\char 37\relax}, and 99 %99\text{\,}\mathrm{\char 37\relax}.

5.2.2 Results

We report the number of feasible time slots found by each method and required run times (mm:ss.zzz) for all scenarios, i.e., optimized and non-optimized schedules. We report the results for 𝒲NO\operatorname*{\mathcal{W}_{\text{NO}}} in Table 1, for 𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}} in Table 2, and for 𝒲OV3\operatorname*{\mathcal{W}_{\text{OV}3}} in Table 3. Moreover, we report the number of feasible time slots that are found by combining the findings of all three methods, denoted as Combined in the tables. Additionally, we report p^\hat{p}, the number of customers at 100 %100\text{\,}\mathrm{\char 37\relax} fill level. All reported numbers are average values over 100 instances each.

As reference to compare against, we select the Simple Insertion heuristic. Both other methods, TSP(s)TW Insertion and ANS, are entitled to find at least the delivery time slots that are determined by the Simple Insertion heuristic. This property is guaranteed due to the construction of those methods. Unfortunately, we can not provide an upper bound for the number of feasible delivery time slots as, to the best of our knowledge, there is no more powerful search method applicable for the SOP in the current literature. In our experiments, we restrict the ANS to 1move operations as preliminary experiments showed that allowing 1swap operations yields unacceptably long run times (up to some minutes). Also the results are only insignificantly better. Primarily, we notice that the Simple Insertion heuristic returns solutions for the SOP in less than one millisecond for all considered instances. At fill level 85 %85\text{\,}\mathrm{\char 37\relax} the instances are still rather easy and hence, already the Simple Insertion heuristic determines nearly all time slots as being feasible. While the Simple Insertion heuristic still performs well at 90 %90\text{\,}\mathrm{\char 37\relax} and 95 %95\text{\,}\mathrm{\char 37\relax} on optimized schedules, it performs poorly on non-optimized schedules with the same fill levels due to the lower quality of the schedules.

Further, we observe that the TSP(s)TW Insertion approach yields a slight improvement over the Simple Insertion heuristic in terms of available time windows at 85 %85\text{\,}\mathrm{\char 37\relax}95 %95\text{\,}\mathrm{\char 37\relax}. However, a significant improvement can be observed when it is applied to non-optimized schedules at 99 %99\text{\,}\mathrm{\char 37\relax} fill level. TSP(s)TW Insertion shows acceptable run times for 𝒲NO\operatorname*{\mathcal{W}_{\text{NO}}}. In contrast, run times for 𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}} and 𝒲OV3\operatorname*{\mathcal{W}_{\text{OV}3}} are between 33 seconds and nearly 44 minutes and thus, unacceptable. Hence, considering these findings, the TSP(s)TW Insertion turns out to be impractical for AHD systems. Moreover, we notice that the ANS yields significantly more feasible time slots than Simple Insertion (and TSP(s)TW Insertion) on non-optimized schedules at 95 %95\text{\,}\mathrm{\char 37\relax} and 99 %99\text{\,}\mathrm{\char 37\relax}. Similar behavior can be observed on optimized schedules at 99 %99\text{\,}\mathrm{\char 37\relax}. The run times of the ANS stay below 11 second for nearly all experiments with up to 95 %95\text{\,}\mathrm{\char 37\relax} fill level. The ANS clearly performs best in terms of solution quality on instances having 99 %99\text{\,}\mathrm{\char 37\relax} fill level resulting in up to 1111 times more available delivery time windows than Simple Insertion. However, on those instances its run time reaches up to 99 seconds. It is worth pointing out that the performance of the ANS is nearly constant over all three sets of time windows showing that it can also deal with instances having overlapping delivery time windows.

In general, we notice a slight performance drop of the ANS (compared to TSP(s)TW Insertion) from optimized schedules to non-optimized schedules. This can be explained by the fact that identifying feasible time windows is less hard for non-optimized schedules as they contain less orders on average. Also there is more potential for improvement when applying TSP(s)TW Insertion as the single tours have not been improved in any way after inserting the customers. Also, we observe that Combined shows only a marginal improvement over the ANS for optimized schedules. On the other hand, we notice a strong improvement of Combined compared to TSP(s)TW Insertion and ANS for non-optimized schedules at 99 %99\text{\,}\mathrm{\char 37\relax} fill level. This can be explained by the fact that TSP(s)TW Insertion has a larger potential of finding a feasible insertion (compared to Simple Insertion) if the tours are of low quality (as there is more room to rearrange the tours) and the already observed performance drop of the ANS.

Our experiments show that the ANS heuristic is capable of finding a larger number of feasible delivery slots than the Simple Insertion heuristic, requiring run times that are suited for AHD services when dealing with moderately sized problem instances. However, to efficiently tackle very large instances, parallelization of the ANS is advised.

In summary, the ANS heuristic is clearly the best method for solving the SOP when being concerned with the solution quality while the Simple Insertion heuristic is the method of choice in case of very tight time restrictions.

Table 1: Summary of the computational experiments concerning the Get TWs approaches for 𝒲NO\operatorname*{\mathcal{W}_{\text{NO}}} considering non-optimized and 1move-optimized schedules.
𝒲NO\operatorname*{\mathcal{W}_{\text{NO}}} (10 windows) - 60 vehicles
non-optimized schedules optimized schedules
Avg. p^\hat{p} 408.0 1907.3
Fill level 85% 90% 95% 99% 85% 90% 95% 99%
Avg. run time
(mm:ss.zzz)
Simple Insertion 00:00.001 00:00.001 00:00.001 00:00.001 00:00.001 00:00.001 00:00.001 00:00.001
TSP(s)TW Insertion 00:00.223 00:00.422 00:01.112 00:01.970 00:00.592 00:00.580 00:00.743 00:00.455
ANS 00:00.024 00:00.089 00:00.468 00:04.031 00:00.049 00:00.052 00:00.077 00:01.377
Avg. number
of feasible slots
Simple Insertion 9.82 9.47 7.67 2.00 9.98 9.98 9.83 4.20
TSP(s)TW Insertion 9.85 9.62 8.60 4.30 9.98 9.98 9.83 4.29
ANS 9.96 9.94 9.93 9.39 9.98 9.98 9.98 9.63
Combined 9.96 9.94 9.93 9.43 9.98 9.98 9.98 9.63
Table 2: Summary of the computational experiments concerning the Get TWs approaches for 𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}} considering non-optimized and 1move-optimized schedules.
𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}} (10 windows) - 60 vehicles
non-optimized schedules optimized schedules
Avg. p^\hat{p} 628.0 1880.0
Fill level 85% 90% 95% 99% 85% 90% 95% 99%
Avg. run time
(mm:ss.zzz)
Simple Insertion 00:00.001 00:00.001 00:00.001 00:00.001 00:00.001 00:00.001 00:00.001 00:00.001
TSP(s)TW Insertion 00:03.505 00:11.182 00:52.761 02:22.804 00:41.024 01:01.611 01:03.537 00:11.598
ANS 00:00.032 00:00.138 00:00.683 00:07.837 00:00.036 00:00.040 00:00.066 00:08.343
Avg. number
of feasible slots
Simple Insertion 9.57 9.05 7.40 0.76 9.98 9.98 9.68 0.72
TSP(s)TW Insertion 9.84 9.68 8.96 5.04 10.00 10.00 9.84 0.70
ANS 9.99 9.95 9.83 8.43 10.00 10.00 9.84 6.36
Combined 9.99 9.95 9.87 8.76 10.00 10.00 10.00 6.36
Table 3: Summary of the computational experiments concerning the Get TWs approaches for 𝒲OV3\operatorname*{\mathcal{W}_{\text{OV}3}} considering non-optimized and 1move-optimized schedules.
𝒲OV3\operatorname*{\mathcal{W}_{\text{OV}3}} (12 windows) - 60 vehicles
non-optimized schedules optimized schedules
Avg. p^\hat{p} 406.0 1897.9
Fill level 85% 90% 95% 99% 85% 90% 95% 99%
Avg. run time
(mm:ss.zzz)
Simple Insertion 00:00.001 00:00.001 00:00.001 00:00.001 00:00.001 00:00.001 00:00.001 00:00.001
TSP(s)TW Insertion 00:02.645 00:15.541 01:27.422 05:20.061 00:56.969 00:54.405 01:04.239 00:17.879
ANS 00:00.012 00:00.112 00:00.847 00:08.412 00:00.052 00:00.057 00:00.073 00:08.981
Avg. number
of feasible slots
Simple Insertion 11.84 11.02 8.54 1.21 12.00 12.00 11.90 0.73
TSP(s)TW Insertion 11.93 11.73 10.78 6.65 12.00 12.00 11.92 0.69
ANS 12.00 11.98 11.94 10.16 12.00 12.00 12.00 7.59
Combined 12.00 11.99 11.97 10.73 12.00 12.00 12.00 7.59

5.3 Comparing Improvement Approaches

To compare the proposed Improvementapproaches. We perform experiments where we iteratively insert new customers into the schedule, simulating customers placing orders online.

Due to the iterative benchmark setup, we can omit the Set TW step and insert the new order without double-checking the availability of the selected delivery time slot. Again, to avoid bias, we stick to the most simple Get TWs approach, the Simple Insertion heuristic. Then, for the Improvement step we compute the following metrics:

  • Average improvement over Insertion step: The average reduction of the objective function when applying the optimization approaches to the schedule after inserting the new customer (given in percentage).

  • Average improvement of the cost of Insertion: The average reduction of the objective function relative to the increase of the objective function caused by inserting the new customer (given in percentage).

  • Average number of MILPs solved for the TSPsTW.

  • Average runtime of each improvement strategy.

Additionally, we report the average total number of customer orders that have been inserted into the final schedules. Note that for the MILPs we set a time limit of 60 seconds.

5.3.1 Average-Sized Grocery Home Delivery Problems

First, we want to analyze the Improvement approaches for instance sizes which we found to appear most commonly in practice. Hence, we consider 500500 customers that are served by 16/18/2016/18/20 vehicles having capacity of 200200 units each. The number of used vehicles corresponds to the practical difficulty of the instances. The numbers are chosen such that the instances are reasonably difficult. In that sense, using 2020 vehicles results in accepting nearly all 500500 customers on average. These instances are designed to reflect the majority of delivery regions as they were encountered during our project with a leading supermarket chain.

The results for these experiments are reported in Table 4. We observe that all approaches considered are applicable in an online service as the average run time per step is below 44 seconds, which is very reasonable for instances of this size. Further, a reduction of our objective function by 0.29 %0.29\text{\,}\mathrm{\char 37\relax} to 0.60 %0.60\text{\,}\mathrm{\char 37\relax} per step is remarkable as between two Improvement steps the schedule is altered only by the insertion of one customer. This can be further underlined by the reported average reduction of the cost of inserting the new customer ranging from 35.82 %35.82\text{\,}\mathrm{\char 37\relax} to 63.48 %63.48\text{\,}\mathrm{\char 37\relax}. These numbers show that our approaches meet the requirements of modern AHD systems. The experiments reveal that 1move + 1swap clearly outperforms 1move in terms of improving the objective function (across all three types of time windows). Also solving the TSPTW afterwards results in further improvement of the objective. Considering different delivery time windows, we notice that the approaches perform best with respect to runtime on instances with 𝒲NO\operatorname*{\mathcal{W}_{\text{NO}}} and worst on instances with 𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}}. While there is a slight difference for the Local Search operations, the difference is nearly 3 seconds when additionally applying the TSPTW MILP. This is due to the fact that the absence of overlapping time windows allows for a more efficient MILP formulation (Section 4.4). Thus, during peak times and in case of overlapping time windows we advise to stick to 1move  (or 1move + 1swap). Further, the average number of customers that can be inserted into the schedule deviates at most by 99 (+1.9 %1.9\text{\,}\mathrm{\char 37\relax}) between 𝒲NO\operatorname*{\mathcal{W}_{\text{NO}}} and 𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}}. Hence, allowing overlapping time windows accounts for a small benefit concerning the degree of capacity utilization. Similarly, in case of overlapping time windows (𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}} and 𝒲OV3\operatorname*{\mathcal{W}_{\text{OV}3}}) the travel time reduction is slightly larger than for 𝒲NO\operatorname*{\mathcal{W}_{\text{NO}}}.

5.3.2 Dealing with large Problem instances - Improvement step only every iith iteration

Large supermarket chains offer their services across the whole country. Caused by the different geographies, the sizes of the delivery regions that are covered by a depot strongly vary ranging from a few hundred up to around 20002000 customers per day. Dealing with such large delivery regions is especially challenging during periods of many customer request coming in within a short time frame. To accommodate these periods of high request frequency, we propose to run the Improvement step only after each iith successful Insertion step, instead of after each.

We want to validate this idea by running computational experiments. We consider instances with 20002000 customers (the largest number we encountered in practice) and 8080 vehicles for these experiments and report the results in Table 5. Each column shows results for different values of ii. For these experiments we can only report the average improvement of the schedule when applying the respective improvement strategy. First, we notice that the runtime of the Improvement step increases with ii: the more often we skip an Improvement step, the longer it takes to improve the schedule’s total travel time. Moreover, we observe an increased improvement per step with increasing ii. Apparently, the improvement that was omitted can be made up (up to a certain extent), by applying the Improvement step at a later point in time. It shows that performing the Improvement step only after every iith successful insertion is a viable option. While 1move stays below 66 seconds for i=10i=10, its runtime increases up to 1313 seconds for i=30i=30. The runtimes of 1move + 1swap are between 11 minute and 22 minutes (overlapping time windows), which is still acceptable. We observe that running the TSPTW MILP does increase the runtimes (on top of Local Search) only insignificantly while still showing some additional improvements of the objective. In general, the observations from the previous experiments with 500500 customers carry over to this experiments. Again we notice shorter runtimes for 𝒲NO\operatorname*{\mathcal{W}_{\text{NO}}} than for 𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}} and 𝒲OV3\operatorname*{\mathcal{W}_{\text{OV}3}}. However, we observe less significant differences than for the experiments with 500500 customers.

In summary, the results show that skipping the Improvement step allows us to deal with temporarily high customer request rates, even for very large schedules with a vast number of customers. Furthermore, we see that applying the Improvement step less often leads to an increased improvement per step at the cost of longer runtimes. Finally, note that triggering the Improvement step dynamically when there are no new requests is also a valid option.

Table 4: Summary of the computational experiments for the Improvement approaches considering instances with 500500 customers.
Average-sized grocery home delivery problems
𝒲NO\operatorname*{\mathcal{W}_{\text{NO}}} 𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}} 𝒲OV3\operatorname*{\mathcal{W}_{\text{OV}3}}
Tours: 16 18 20 16 18 20 16 18 20
Avg. p^\hat{p} 450.80 491.60 498.00 459.60 495.80 499.20 453.00 496.60 499.00
Avg. number of
time windows offered 9.01 9.84 9.97 9.21 9.93 9.98 10.83 11.92 12.00
Avg. run time
(mm:ss.zzz)
1move 00:00.015 00:00.099 00:00.108 00:00.097 00:00.124 00:00.134 00:00.090 00:00.111 00:00.120
1move+1swap 00:00.632 00:00.776 00:00.766 00:00.952 00:01.170 00:01.145 00:00.925 00:01.106 00:01.106
1move+1swap+TSP(s)TW 00:00.678 00:00.833 00:00.821 00:03.481 00:03.757 00:03.655 00:01.314 00:01.478 00:01.485
Avg. improvement
over Insertion (%)
1move 0.30 0.29 0.29 0.37 0.37 0.37 0.34 0.34 0.34
1move+1swap 0.41 0.40 0.39 0.52 0.50 0.50 0.50 0.50 0.49
1move+1swap+TSP(s)TW 0.45 0.43 0.42 0.60 0.57 0.56 0.55 0.54 0.53
Avg. improvement
of cost of Insertion (%)
1move 35.82 38.00 38.76 38.36 40.75 41.66 37.11 39.39 39.58
1move+1swap 49.88 51.34 51.44 53.62 55.37 55.64 54.65 57.62 57.23
1move+1swap+TSP(s)TW 53.83 55.34 55.26 61.80 63.33 63.48 59.53 62.37 61.90
Avg. number of
MILPs solved
1move+1swap+TSP(s)TW 2.01 2.09 2.11 2.36 2.49 2.48 2.32 2.42 2.42
Table 5: Summary of the computational experiments for the Improvement approaches considering instances with 20002000 customers served by 8080 vehicles. The Improvement step is triggered after every iith (i=10,20,30i=10,20,30) successful insertion of a new customer.
Large-scale problem instances - 80 vehicles
𝒲NO\operatorname*{\mathcal{W}_{\text{NO}}} 𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}} 𝒲OV3\operatorname*{\mathcal{W}_{\text{OV}3}}
i: 10 20 30 10 20 30 10 20 30
Avg. p^\hat{p} 1997.20 1998.50 1998.50 1999.40 1999.40 1999.40 1999.80 1999.80 1999.80
Avg. number of
time windows offered 9.99 9.99 9.99 9.99 9.99 9.99 9.99 9.99 9.99
Avg. run time
(mm:ss.zzz)
1move 00:04.303 00:06:907 00:10:578 00:05.360 00:08.930 00:12.587 00:04.939 00:08.126 00:11.208
1move+1swap 00:59.003 01:28:161 01:57.892 01:25.017 02:02.721 02:31.010 01:13.358 01:40.780 02:10.395
1move+1swap+TSP(s)TW 00:59.980 01:29.274 01:59.241 01:40.952 02:25.107 02:56.644 01:16.316 01:50.400 02:14.499
Avg. improvement
over Insertion (%)
1move 1.62 3.27 4.93 1.69 3.54 5.12 1.60 3.29 4.82
1move+1swap 2.29 4.16 5.94 2.46 4.57 6.28 2.33 4.26 5.92
1move+1swap+TSP(s)TW 2.35 4.24 6.05 2.56 4.73 6.48 2.39 4.35 6.03
Avg. number of
MILPs solved
1move+1swap+TSP(s)TW 23.43 30.64 33.58 24.65 31.41 34.48 24.09 31.09 34.22

5.4 Interplay of Get TWs and Improvement Approaches

In this final experiments, we want to find out which combinations of the different approaches for the Get TWs- and the Improvement step are most beneficial and which should be avoided.

From Section 5.2 we learn that Simple Insertion is the fasted method for the Get TWs step showing a solid performance, while ANS is the best method in terms of solution quality having the draw back that it can only be applied when the customer request rate is moderate (or instances are small). In Section 5.3 we observe that 1move is a solid approach for the Improvement step that also scales well for large problem instances. The application of more sophisticated Local Search operations in combination with an exact approach for a selected sub-problem (1move + 1swap + TSP(s)TW improvement) shows the best performance in terms of solution quality at the price of high (but still acceptable) run times.

Further evaluations are based on the average-sized grocery delivery use case (Section 5.3) and will focus on aforementioned Get TWs and Improvement approaches. Hence, we compare the resulting four combinations {Simple Insertion,𝙰𝙽𝚂}\{\textit{Simple Insertion},~{\tt ANS}\} ×\times {1move,1move+1swap+TSP(s)TW improvement}\{\texttt{{1move}},~\texttt{{1move}}~+\texttt{{1swap}}~+\texttt{TSP(s)TW improvement}\} concerning the following key figures:

  • Average run time of the Get TWs- and Improvement step.

  • Average number of offered delivery time windows.

  • Average total number of customer orders that have been inserted into the final schedules.

5.4.1 Results

In Table 6 we report the results of this experiments. First, we notice that now when analyzing the interplay of the get GetTWs step and the Improvement step the differences between ANS and Simple Insertion become less evident. ANS only show little benefit compared to Simple Insertion in terms of the number accepted orders p^\hat{p} (at most 0.4 %0.4\text{\,}\mathrm{\char 37\relax} improvement) and the number of offered time windows. The use of ANS reduces the run time of the Improvement step. This effect is most evident when overlapping time windows are used (𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}} and 𝒲OV3\operatorname*{\mathcal{W}_{\text{OV}3}}), especially for the 1move + 1swap +  TSP(s)TW approach where a reduction of the run time of up to 71.4 %71.4\text{\,}\mathrm{\char 37\relax} is observed. Presumably, ANS creates better schedules when inserting the new customer, and therefore the Improvement approaches have a better starting solution.

In summary, we can conclude that using the ANS for the Get TWs (and Set TWs) step is preferred as long as the instances are sufficiently small (as in our use case) such that the GetTWs step can be performed in accordance with the run time requirements of the considered application of the AHD service. However, the ANS gives a slight improvement compared to Simple Insertion (as already shown in 5.3) and should therefore be utilized if the frequency of incoming orders is sufficiently low, such that the additionally required run times do not cause issues. If the expected time between incoming order requests temporarily increases, e.g., during peak times, one can switch to the 1move heuristic without having to fear major drawbacks.

Table 6: Summary of the computational experiments for different combinations of Get Tws approaches (Simple Insertion,𝙰𝙽𝚂\textit{Simple Insertion},~{\tt ANS}) and Improvement approaches (1move,1move+1swap+TSP(s)TW improvement\texttt{{1move}},~\texttt{{1move}}~+~\texttt{{1swap}}~+~\texttt{TSP(s)TW improvement}) considering instances with 500500 customers.
Average-sized grocery home delivery problems
𝒲NO\operatorname*{\mathcal{W}_{\text{NO}}} 𝒲OV1.5\operatorname*{\mathcal{W}_{\text{OV}1.5}} 𝒲OV3\operatorname*{\mathcal{W}_{\text{OV}3}}
Tours: 16 18 20 16 18 20 16 18 20
Get TWs: Simple Insertion, Improvement: 1move
Avg. p^\hat{p} 453.35 491.80 498.65 455.75 495.10 498.65 451.00 495.50 499.60
Avg. number of
time windows offered 9.07 9.84 9.97 9.15 9.90 9.98 10.81 11.88 11.99
Avg. run time
(mm:ss.zzz)
Get TWs 0:00.001 0:00.001 0:00.001 0:00.001 0:00.001 0:00.001 0:00.001 0:00.001 0:00.001
Improvement 0:00.076 0:00.103 0:00.114 0:00.103 0:00.134 0:00.138 0:00.096 0:00.123 0:00.127
Get TWs: Simple Insertion, Improvement: 1move + 1swap + TSP(s)TW
Avg. p^\hat{p} 454.25 494.00 499.05 456.95 495.95 499.00 452.80 496.00 499.65
Avg. number of
time windows offered 9.09 9.87 9.98 9.15 9.92 9.98 10.86 11.91 12.00
Avg. run time
(mm:ss.zzz)
Get TWs 0:00.001 0:00.001 0:00.001 0:00.001 0:00.001 0:00.001 0:00.001 0:00.001 0:00.001
Improvement 0:00.758 0:00.852 0:00.957 0:03.139 0:03.234 0:03.133 0:01.345 0:01.672 0:01.598
Get TWs: ANS, Improvement: 1move
Avg. p^\hat{p} 455.35 498.50 499.55 458.00 499.05 499.75 453.10 499.44 499.80
Avg. number of
time windows offered 9.11 9.97 9.99 9.16 9.98 9.99 10.88 11.99 12.00
Avg. run time
(mm:ss.zzz)
Get TWs 0:00.098 0:00.022 0:00.017 0:00.090 0:00.014 0:00.012 0:00.120 0:00.020 0:00.017
Improvement 0:00.060 0:00.077 0:00.086 0:00.073 0:00.091 0:00.100 0:00.073 0:00.092 0:00.098
Get TWs: ANS, Improvement: 1move + 1swap + TSP(s)TW
Avg. p^\hat{p} 455.55 498.95 499.65 457.85 499.15 499.75 452.90 499.55 499.80
Avg. number of
time windows offered 9.12 9.98 9.99 9.16 9.99 9.99 10.87 11.99 12.00
Avg. run time
(mm:ss.zzz)
Get TWs 0:00.104 0:00.026 0:00.020 0:00.088 0:00.014 0:00.014 0:00.114 0:00.023 0:00.019
Improvement 0:00.713 0:00.889 0:00.862 0:00.898 0:01.138 0:01.099 0:00.883 0:01.158 0:01.161

6 Conclusion

In this work, we considered an Attended Home Delivery (AHD) system in the context of an online grocery shopping service offered by an international retailer. AHD systems are used whenever the customers must be present when their deliveries arrive. Therefore, the company and the customer must both agree on a time window during which the delivery can be guaranteed.

We focused on the phase during which customers place their orders through a web service. Generally, this is the most challenging phase of an AHD system from a computational point of view. As for most AHD approaches in the literature, we considered a Vehicle Routing Problem with Time Windows (VRPTW) as the underlying optimization problem. The online characteristic of this phase requires that the delivery schedule is built dynamically as new orders are placed. We split the computations into four steps and proposed solution approaches that allow to determine which delivery time windows can be offered to potential customers and to iteratively build the schedule.

Finally, we presented a comprehensive experimental evaluation of the proposed heuristic approaches, which are based on Local Search operations and Mixed-Integer Linear Programming formulations. Our goal was to determine the efficiency of the approaches on benchmark sets motivated by an international supermarket chain’s online grocery shopping service. We elaborated certain aspects of the problem by varying the structure of the time windows, the number of available vehicles, and the number of total customer requests. In particular, we compare different approaches for inserting new customers into the existing delivery schedule and for re-optimizing the schedule once a new customer has been added to the schedule. The computational study shows that the suggested algorithms can solve the considered benchmark instances sufficiently fast to comply with the very strict runtime restrictions arising in AHD systems with high customer request rates.

Statements and Declarations

Acknowledgments

The authors would like to thank Mario Ruthmair for his valuable advice and feedback.

Funding

This work was supported by Lakeside Labs GmbH, Klagenfurt, Austria and funding from the European Regional Development Fund and the Carinthian Economic Promotion Fund (KWF) under grant 20214/31942/45906. Christian Truden is supported by a grant of the Government of Carinthia within the CARINTHIja 2020 project.

Competing interests

The authors have no relevant financial or non-financial interests to disclose.

Availability of data and materials

The benchmark instances are available from https://bit.ly/3doVvve.

References

  • Agatz et al. [2008] Niels Agatz, Ann Melissa Campbell, Moritz Fleischmann, and Martin Savels. Challenges and Opportunities in Attended Home Delivery, pages 379–396. Springer US, Boston, MA, 2008. ISBN 978-0-387-77778-8. doi: 10.1007/978-0-387-77778-8˙17.
  • Agatz et al. [2011] Niels Agatz, Ann Campbell, Moritz Fleischmann, and Martin W. P. Savelsbergh. Time slot management in attended home delivery. Transportation Science, 45(3):435–449, 2011. doi: 10.1287/trsc.1100.0346.
  • Agatz et al. [2013] Niels Agatz, Ann M Campbell, Moritz Fleischmann, Jo van Nunen, and Martin Savelsbergh. Revenue management opportunities for internet retailers. Journal of Revenue and Pricing Management, 12(2):128–138, March 2013. ISSN 1477-657X. doi: 10.1057/rpm.2012.51.
  • Asdemir et al. [2009] Kursad Asdemir, Varghese S. Jacob, and Ramayya Krishnan. Dynamic pricing of multiple home delivery options. European Journal of Operational Research, 196(1):246–257, July 2009. ISSN 0377-2217. doi: 10.1016/j.ejor.2008.03.005.
  • Bent and Van Hentenryck [2004] Russell W. Bent and Pascal Van Hentenryck. Scenario-based planning for partially dynamic vehicle routing with stochastic customers. Operations Research, 52(6):977–987, 2004. doi: 10.1287/opre.1040.0124.
  • Bucur et al. [2021] Paul Alexandru Bucur, Philipp Hungerländer, Anna Jellen, Kerstin Maier, and Veronika Pachatz. Shift planning for smart meter service operators. In Peter Haber, Thomas Lampoltshammer, Manfred Mayr, and Kathrin Plankensteiner, editors, Data Science – Analytics and Applications, pages 8–10, Wiesbaden, 2021. Springer Fachmedien Wiesbaden. ISBN 978-3-658-32182-6. doi: 10.1007/978-3-658-32182-6˙2.
  • Campbell and Savelsbergh [2004] Ann Melissa Campbell and Martin W. P. Savelsbergh. Efficient insertion heuristics for vehicle routing and scheduling problems. Transportation Science, 38(3):369–378, 2004. doi: 10.1287/trsc.1030.0046.
  • Campbell and Savelsbergh [2005] Ann Melissa Campbell and Martin W. P. Savelsbergh. Decision support for consumer direct grocery initiatives. Transportation Science, 39(3):313–327, 2005. doi: 10.1287/trsc.1040.0105.
  • Campbell and Savelsbergh [2006] Ann Melissa Campbell and Martin W. P. Savelsbergh. Incentive schemes for attended home delivery services. Transportation Science, 40(3):327–341, 2006. ISSN 0041-1655. doi: 10.1287/trsc.1050.0136.
  • Cleophas and Ehmke [2014] Catherine Cleophas and Jan Fabian Ehmke. When are deliveries profitable? Business & Information Systems Engineering, 6(3):153–163, June 2014. ISSN 1867-0202. doi: 10.1007/s12599-014-0321-9.
  • Cwioro et al. [2019] Günther Cwioro, Philipp Hungerländer, Kerstin Maier, Jörg Pöcher, and Christian Truden. An optimization approach to the ordering phase of an attended home delivery service. In Louis-Martin Rousseau and Kostas Stergiou, editors, Integration of Constraint Programming, Artificial Intelligence, and Operations Research, pages 208–224, Cham, 2019. Springer International Publishing. doi: 10.1007/978-3-030-19212-9˙14.
  • Ehmke [2012] Jan Fabian Ehmke. Attended Home Delivery. In Integration of Information and Optimization Models for Routing in City Logistics, pages 23–33. Springer US, Boston, MA, 2012. ISBN 978-1-4614-3628-7. doi: 10.1007/978-1-4614-3628-7˙3.
  • Ehmke and Campbell [2014] Jan Fabian Ehmke and Ann Melissa Campbell. Customer acceptance mechanisms for home deliveries in metropolitan areas. European Journal of Operational Research, 233(1):193–207, 2014. ISSN 0377-2217. doi: 10.1016/j.ejor.2013.08.028.
  • Fikar and Hirsch [2017] Christian Fikar and Patrick Hirsch. Home health care routing and scheduling: A review. Computers & Operations Research, 77:86–95, 2017. ISSN 0305-0548. doi: 10.1016/j.cor.2016.07.019.
  • Gendreau et al. [1998] Michel Gendreau, Alain Hertz, Gilbert Laporte, and Mihnea Stan. A generalized insertion heuristic for the traveling salesman problem with time windows. Operations Research, 46(3):330–335, 1998. doi: 10.1287/opre.46.3.330.
  • Han et al. [2017] Shuihua Han, Ling Zhao, Kui Chen, Zong wei Luo, and Deepa Mishra. Appointment scheduling and routing optimization of attended home delivery system with random customer behavior. European Journal of Operational Research, 262(3):966 – 980, 2017. ISSN 0377-2217. doi: 10.1016/j.ejor.2017.03.060.
  • Hernandez et al. [2017] Florent Hernandez, Michel Gendreau, and Jean‐Yves Potvin. Heuristics for tactical time slot management: a periodic vehicle routing problem view. International Transactions in Operational Research, 24(6):1233–1252, 2017. doi: 10.1111/itor.12403.
  • Hungerländer and Truden [2018] Philipp Hungerländer and Christian Truden. Efficient and easy-to-implement mixed-integer linear programs for the traveling salesperson problem with time windows. Transportation Research Procedia, 30:157 – 166, 2018. ISSN 2352-1465. doi: 10.1016/j.trpro.2018.09.018. EURO Mini Conference on ”Advances in Freight Transportation and Logistics”.
  • Hungerländer et al. [2017] Philipp Hungerländer, Andrea Rendl, and Christian Truden. On the slot optimization problem in on-line vehicle routing. Transportation Research Procedia, 27:492–499, 2017. ISSN 2352-1465. doi: 10.1016/j.trpro.2017.12.046.
  • Kirkpatrick et al. [1983] S. Kirkpatrick, C. D. Gelatt, and M. P. Vecchi. Optimization by simulated annealing. Science, 220(4598):671–680, 1983. doi: 10.1126/science.220.4598.671.
  • Klein et al. [2017] Robert Klein, Jochen Mackert, Michael Neugebauer, and Claudius Steinhardt. A model-based approximation of opportunity cost for dynamic pricing in attended home delivery. OR Spectrum, Dec 2017. ISSN 1436-6304. doi: 10.1007/s00291-017-0501-3.
  • Klein et al. [2019] Robert Klein, Michael Neugebauer, Dimitri Ratkovitch, and Claudius Steinhardt. Differentiated time slot pricing under routing considerations in attended home delivery. Transportation Science, 53(1):236–255, 2019. doi: 10.1287/trsc.2017.0738.
  • Kohl and Madsen [1997] Niklas Kohl and Oli B. G. Madsen. An optimization algorithm for the vehicle routing problem with time windows based on lagrangian relaxation. Operations Research, 45(3):395–406, 1997. doi: 10.1287/opre.45.3.395.
  • Köhler et al. [2020] Charlotte Köhler, Jan Fabian Ehmke, and Ann Melissa Campbell. Flexible time window management for attended home deliveries. Omega, 91:102023, 2020. ISSN 0305-0483. doi: 10.1016/j.omega.2019.01.001.
  • Lang et al. [2021] Magdalena A.K. Lang, Catherine Cleophas, and Jan F. Ehmke. Multi-criteria decision making in dynamic slotting for attended home deliveries. Omega, 102:102305, 2021. ISSN 0305-0483. doi: 10.1016/j.omega.2020.102305.
  • Lenstra and Kan [1981] J. K. Lenstra and A. H. G. Rinnooy Kan. Complexity of vehicle routing and scheduling problems. Networks, 11(2):221–227, 1981. doi: 10.1002/net.3230110211.
  • Pan et al. [2017] Shenle Pan, Vaggelis Giannikas, Yufei Han, Etta Grover-Silva, and Bin Qiao. Using customer-related data to enhance e-grocery home delivery. Industrial Management & Data Systems, 117(9):1917–1933, 2017. doi: 10.1108/IMDS-10-2016-0432.
  • Parragh et al. [2008] Sophie N. Parragh, Karl F. Dörner, and Richard F. Hartl. A survey on pickup and delivery problems: Part II: Transportation between pickup and delivery locations. Journal für Betriebswirtschaft, 58(2):81–117, June 2008. ISSN 0344-9327, 1614-631X. doi: 10.1007/s11301-008-0036-4.
  • Savelsbergh [1992] Martin W. P. Savelsbergh. The vehicle routing problem with time windows: Minimizing route duration. ORSA Journal on Computing, 4(2):146–154, 1992. doi: 10.1287/ijoc.4.2.146.
  • Vazquez-Noguerol et al. [2020] Mar Vazquez-Noguerol, Jose Comesaña-Benavides, Raul Poler, and J. Carlos Prado-Prado. An optimisation approach for the e-grocery order picking and delivery problem. Central European Journal of Operations Research, September 2020. ISSN 1613-9178. doi: 10.1007/s10100-020-00710-9.
  • Vazquez-Noguerol et al. [2021] Mar Vazquez-Noguerol, Jose A. Comesaña-Benavides, Sara Riveiro-Sanroman, and J. Carlos Prado-Prado. A mixed integer linear programming model to support e-fulfillment strategies in warehouse-based supermarket chains. Central European Journal of Operations Research, September 2021. ISSN 1613-9178. doi: 10.1007/s10100-021-00778-x.
  • Vienna Public Transport (2018) [Wiener Linien] Vienna Public Transport (Wiener Linien). 2017 - Facts and Figures, 2018. URL https://www.wienerlinien.at/media/files/2018/facts_and_figures_2017_243486.pdf.
  • Yang and Strauss [2017] Xinan Yang and Arne K. Strauss. An approximate dynamic programming approach to attended home delivery management. European Journal of Operational Research, 263(3):935 – 945, 2017. ISSN 0377-2217. doi: 10.1016/j.ejor.2017.06.034.
  • Yang et al. [2016] Xinan Yang, Arne K. Strauss, Christine S. M. Currie, and Richard Eglese. Choice-based demand management and vehicle routing in e-fulfillment. Transportation Science, 50(2):473–488, 2016. doi: 10.1287/trsc.2014.0549.