())]}
Computational Approaches for Grocery Home Delivery Services
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 -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).
-
•
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.
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 , with corresponding order weight function , and a service time function . In the considered AHD service the individual items of an order are consolidated into several boxes of fixed size. The number of required boxes defines the corresponding order weight .
Secondly, the VRPTW consists of a set of time windows , where each time window is defined through the times of its begin and end . We assume that the time windows are unique, i.e., there do not exist time windows with and . We consider overlapping and non-overlapping time windows. Two time windows and are non-overlapping if and only if or . Further, a function 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 . The travel time between all points is given by a function , where we set the travel time from a customer to itself to , i.e., .
Each vehicle has an assigned tour. A tour contains customers in the order they are visited by the vehicle and has an assigned capacity . Furthermore, each tour has assigned start and end times that we denote as startA and endA, respectively. Hence, the vehicle assigned to tour can leave from the depot no earlier than startA and must return to the depot no later than endA. A schedule consists of 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 , where and are equal to the depot and are the customers assigned to the tour. We use the concept of earliest and latest arrival time and , as in [9], which give the earliest (latest) time at which the vehicle may arrive at customer , while not violating time window and travel time constraints on the remaining tour:
Here, we assume .
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 is feasible if all its tours are feasible. A tour is feasible if it satisfies both of the following conditions:
While TFEAS() ensures that the arrival times at each customer assigned to tour are within their assigned time windows, CFEAS() guarantees that the capacity of is not exceeded. Note that we do not need to check for TFEAS() if as this is ensured by the definition of .
3.3.2 Insertion Points
The set is required for the approaches applied in the Get TWs Step and defines after which customers we try to insert customer into during its (pre)assigned time slot. Accordingly, we define:
where | ||||
The index defines the first customer (or the depot) on tour after which customer could potentially be inserted. Likewise, defines the last customer (or the depot). Clearly, if , the insertion of during is infeasible.
3.3.3 Feasibility of an Insertion
The feasibility of the possible insertion points can be checked easily with earliest and latest arrival times, e.g., see [9]. Similar to the definitions above and with the help of and , we define the earliest and latest arrival time and for inserting a new customer after within the (pre)assigned time window as follows.
Thus, customer can be inserted between customers and , such that and all subsequent customers of can be served within their assigned time windows if and only if the following condition holds.
We refer to Figure 2 for an illustration.
Additionally, we must check if the sum of the weights of the customer orders assigned to tour does not exceed the capacity . The insertion of into tour is feasible with respect to capacity if the following condition holds:
Assuming that all earliest (latest) arrival times and the sum of order weights on a tour have already been calculated, TFEAS() and CFEAS() allow to check the feasibility of a possible insertion into a given time window in time provided that the sequence of (except for ) stays the same. If the feasibility check was successful and we decide to insert , we obtain a new tour . Customer is then assigned to index , 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 time [7].
In general, there exist cases where a feasible insertion of is only possible when the order of is changed, which makes the problem -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 containing all scheduled customers , a new customer , and the given set of time slots . Then, the SOP asks for the largest set of time slots such that can be serviced during each delivery slot 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 .
In more detail, the SOP aims to find at least one feasible schedule for each of the VRPTW instances consisting of scheduled customers and the new customer being temporarily assigned to one of the time windows . 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 -hard [23] also the SOP is strongly -hard and consists of several feasibility problems that are all strongly -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 , a tour , and tries to insert into the temporarily assigned time window . It stops as soon as it finds a feasible insertion point , i.e., when TFEAS() and CFEAS() hold. Note, since the order of customers is not altered, the procedure has a linear run time .
We iteratively apply the Simple Insertion to all time windows and all tours to calculate the set of time windows that can be offered to the new customer . defines the set of tours including time window , i.e., if and only if . 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.
The 1move neighborhood moves a customer from a tour to another tour , .
If at least one feasible insertion position for in is found, i.e., TFEAS() and CFEAS() hold, which additionally decreases the total travel time of the delivery schedule, we denote the 1move as improving. -
2.
The 1swap neighborhood exchanges two customers between two different tours, e.g., switch with . 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 , , 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 we define the first and last customer belonging to a given time slot as
If above sets are empty, then the indices are not defined, i.e., .
In case of non-overlapping time slots and if is not empty, i.e., there is at least one customer assigned to , the following statement holds:
4.3.2 Neighborhoods
Our ANS heuristic considers two different neighborhoods for a time window and a tour .
-
•
Inside includes all operations with customers inside :
-
•
Outside represents operations with customers outside :
The inside of consists of customers that are
-
•
assigned to time window ,
-
•
assigned to a time window that is included in : ,
-
•
or, captured by customers of (or its included time windows), e.g., there exist two customers with such that and .
Clearly, is dependent on the actual tour sequence. However, in case of non-overlapping time windows, the customers inside are exactly those who are assigned to , i.e., . In Figure 3, we illustrate the definitions that have been introduced so far.
4.3.3 Loss and Free Time
For a tour and a new customer who has to be inserted into time slot , we define
The corresponds to the amount of time that is “lost” at the beginning of time slot . This can be caused by the service time required for the last customer order before (outside) or the travel time needed for going from that customer to the first customer inside . Similarly, corresponds to the loss of time at the end of time slot caused by the time required for traveling to the first customer after (outside) or the service time at the last customer inside .
Further, we denote as the loss time of time window . In case that , the loss time is given by
Figure 4 illustrates the and on a tour with non-overlapping time windows. Clearly, if , then a violation of TFEAS() for can only be repaired by removing (exchanging) customers that are inside .
Furthermore, we want to quantify the amount of service and travel time that is needed for inserting during time window . For a given tour the free time of time slot is defined as
where is the length of and is the amount of service and travel time that must be handled within . In case that the indices and are not defined, i.e., , term is set to . In Figure 5, we provide an illustration of the free time.
Considering non-overlapping time windows, the insertion of customer after a customer requires an additional amount of (travel and service) time that must be handled within time window and can be calculated by . This assumes that all customers between and can be moved arbitrarily (while maintaining their sequence) within time slot , i.e., all customers assigned to can be seen as one consecutive block which length is given by . Hence, the above statement is weakened in the case of overlapping time windows as some customers inside 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 may be required for tour after the insertion of customer .
4.3.4 Feasibility and Infeasibility Conditions
The insertion of into is infeasible if the following holds:
(1) |
We note that Condition (1) solely depends on the customers inside . Hence, in case of non-overlapping time windows, it is only dependent on the customers assigned to time slot .
Moreover, in case of non-overlapping time slots, the insertion of into is feasible for at least one insertion position if the following inequality holds:
(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 to each time window For each tour we apply the steps described below, which try to insert into within its assigned time window . If this is possible, is added to the set of available time windows .
-
•
Step 1 ensures that the current tour fulfills CFEAS(). . If holds, then customer cannot be feasibly inserted into tour . In this case, we have to reduce the overall weight of . 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 to insert , i.e., holds. If we do not succeed in modifying such that CFEAS() holds, we terminate.
-
•
In Step 2 we aim to increase the free time through local search operations within Inside until the Infeasibility Condition (1) does not hold anymore. is increased by applying as few operations as possible. That way, the previously optimized schedule 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 of time slot 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 , 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 is possible or a local optimum (of the free time objective) is reached and hence, we are not able to insert within time slot .
Note that we apply local search operations during Steps 2-4 only if CFEAS() still holds. Further, we apply local search operations during Step 3 only if the Infeasibility Condition (1) does not hold for the resulting tour .
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 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.
A general model that can be applied to any TSPTW instance (having asymmetric travel times) regardless of the structure of the defined time windows .
-
2.
A second model that is tailored to the TSP with structured Time Windows (TSPsTW). It is assumed that the time windows are pair-wise non-overlapping and that the number of customers is much larger than the number of time windows , i.e., , 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 during which a new customer 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 and for each .
4.5.2 Set TW step
Once customer has selected a time window , we double-check its availability in the same way as in the Get TWs step and then immediately insert into 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 , 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 km 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 of the customer locations have been sampled from a two-dimensional uniform distribution, while the remaining of the customer locations have been randomly assigned to clusters. The center (location) of each cluster is sampled from a two-dimensional uniform distribution. The shape of each cluster is defined by the covariance matrix , where and both follow a uniform distribution. Furthermore, the clusters have been rotated by a random angle between and . Customer locations have been sampled from the multivariate normal distribution 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 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 km/h during the day, km/h at peak times, and 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 [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 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 .
-
•
For all our experiments we consider the following three sets of delivery time windows :
-
–
Set : non-overlapping time windows having length of hour each, e.g., 08:00-09:00, 09:00-10:00, etc.
-
–
Set : overlapping time windows having length of hours each (except for the last time window, which has hour length), where each window overlaps the preceding time window by minutes, e.g., 08:00-09:30, 09:00-10:30, etc.
-
–
Set : overlapping time windows, consisting of windows having length of hour each, 08:00-09:00, 10:00-11:00,…, 16:00-17:00 and (as used by Köhler et al. [24]) time windows of 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 instances and report average values. Note that the absence of overlapping time windows allows using a more efficient MILP formulation of the TSPTW for than for and (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 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 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 . We consider 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.
In the first scenario, we perform no optimization between the insertion steps.
-
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 of a schedule is defined as the ratio between the number of customers in the schedule and the maximal number of customers that can be inserted into the schedule. For benchmarking at a given fill level we select the schedule that was generated during above described process, containing 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 (, , ), instance sizes, and fill levels. Hence, we run tests on benchmark instances with tours (vehicles) and consider fill levels of , , , and .
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 in Table 1, for in Table 2, and for 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 , the number of customers at 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 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 and 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 – . However, a significant improvement can be observed when it is applied to non-optimized schedules at fill level. TSP(s)TW Insertion shows acceptable run times for . In contrast, run times for and are between seconds and nearly 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 and . Similar behavior can be observed on optimized schedules at . The run times of the ANS stay below second for nearly all experiments with up to fill level. The ANS clearly performs best in terms of solution quality on instances having fill level resulting in up to times more available delivery time windows than Simple Insertion. However, on those instances its run time reaches up to 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 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.
(10 windows) - 60 vehicles | ||||||||
---|---|---|---|---|---|---|---|---|
non-optimized schedules | optimized schedules | |||||||
Avg. | 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 |
(10 windows) - 60 vehicles | ||||||||
---|---|---|---|---|---|---|---|---|
non-optimized schedules | optimized schedules | |||||||
Avg. | 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 |
(12 windows) - 60 vehicles | ||||||||
---|---|---|---|---|---|---|---|---|
non-optimized schedules | optimized schedules | |||||||
Avg. | 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 customers that are served by vehicles having capacity of 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 vehicles results in accepting nearly all 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 seconds, which is very reasonable for instances of this size. Further, a reduction of our objective function by to 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 to . 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 and worst on instances with . 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 (+) between and . Hence, allowing overlapping time windows accounts for a small benefit concerning the degree of capacity utilization. Similarly, in case of overlapping time windows ( and ) the travel time reduction is slightly larger than for .
5.3.2 Dealing with large Problem instances - Improvement step only every th 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 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 th successful Insertion step, instead of after each.
We want to validate this idea by running computational experiments. We consider instances with customers (the largest number we encountered in practice) and vehicles for these experiments and report the results in Table 5. Each column shows results for different values of . 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 : 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 . 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 th successful insertion is a viable option. While 1move stays below seconds for , its runtime increases up to seconds for . The runtimes of 1move + 1swap are between minute and 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 customers carry over to this experiments. Again we notice shorter runtimes for than for and . However, we observe less significant differences than for the experiments with 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.
Average-sized grocery home delivery problems | |||||||||
---|---|---|---|---|---|---|---|---|---|
Tours: | 16 | 18 | 20 | 16 | 18 | 20 | 16 | 18 | 20 |
Avg. | 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 |
Large-scale problem instances - 80 vehicles | |||||||||
---|---|---|---|---|---|---|---|---|---|
i: | 10 | 20 | 30 | 10 | 20 | 30 | 10 | 20 | 30 |
Avg. | 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 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 (at most 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 ( and ), especially for the 1move + 1swap + TSP(s)TW approach where a reduction of the run time of up to 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.
Average-sized grocery home delivery problems | |||||||||
---|---|---|---|---|---|---|---|---|---|
Tours: | 16 | 18 | 20 | 16 | 18 | 20 | 16 | 18 | 20 |
Get TWs: Simple Insertion, Improvement: 1move | |||||||||
Avg. | 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. | 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. | 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. | 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.