Next Article in Journal
Latency-Aware DU/CU Placement in Convergent Packet-Based 5G Fronthaul Transport Networks
Next Article in Special Issue
The Deep 3D Convolutional Multi-Branching Spatial-Temporal-Based Unit Predicting Citywide Traffic Flow
Previous Article in Journal
Multifrequency Impedance Method Based on Neural Network for Root Canal Length Measurement
Previous Article in Special Issue
Camera Geolocation Using Digital Elevation Models in Hilly Area
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Efficient Delivery Services Sharing with Time Windows

School of Computer Science and Engineering, Southeast University, Nanjing 211189, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2020, 10(21), 7431; https://doi.org/10.3390/app10217431
Submission received: 16 September 2020 / Revised: 15 October 2020 / Accepted: 20 October 2020 / Published: 22 October 2020
(This article belongs to the Special Issue Future Intelligent Transportation System for Tomorrow and Beyond)

Abstract

:
Delivery service sharing (DSS) has made an important contribution in the optimization of daily order delivery applications. Existing DSS algorithms introduce two major limitations. First, due to computational reasons, most DSS algorithms focus on the fixed pickup/drop-off time scenario, which is inconvenient for real-world scenarios where customers can choose the pickup/drop-off time flexibly. On the other hand, to address the intractable DSS with the flexible time windows (DSS-Fle), local search-based heuristics are widely employed; however, they have no theoretical results on the advantage of order sharing. Against this background, this paper designs a novel algorithm for DSS-Fle, which is efficient on both time complexity and system throughput. Inspired by the efficiency of shareability network on the delivery service routing (DSR) variant where orders cannot be shared and have the fixed time window, we first consider the variant of DSR with flexible time windows (DSR-Fle). For DSR-Fle, the order’s flexible time windows are split into multiple virtual fixed time windows, one of which is chosen by the shareability network as the order’s service time. On the other hand, inspired by efficiency of local search heuristics, we further consider the variant of DSS with fixed time window (DSS-Fix). For DSS-Fix, the beneficial sharing orders are searched and inserted to the shareability network. Finally, combining the spitting mechanism proposed in DSR-Fle and the inserting mechanism proposed in DSS-Fix together, an efficient algorithm is proposed for DSS-Fle. Simulation results show that the proposed DSS-Fle variant algorithm can scale to city-scale scenarios with thousands of regions, orders and couriers, and has the significant advantage on improving system throughput.

1. Introduction

The popularization of smartphones has made people increasingly connected, and has provided the great convenience for daily order delivery service. For example, by using the ride-ordering apps, such as DiDi Chuxing (www.didiglobal.com) and Uber (www.uber.com), customers can be picked up by the private car or taxi at any time, and, by using the food-ordering apps, such as Meituan (www.meituan.com), Eleme (www.ele.me), and Freshhema (www.freshhema.com), food can be delivered to customers’ homes within a very short time. During July 2019, the average daily ride orders of DiDi Chuxing broke 24 million, and the average daily food orders of Meituan broke 30 million. Delivery service routing (DSR), which routes the cars/couriers to deliver orders, has made such an important contribution of serving these millions of orders. To improve customer experience, a significant characteristic of the ordering apps is to provide the flexible pickup or drop-off windows [1,2]. For example, in the food-ordering apps, the customer has the flexibility to choose the food drop-off time, e.g., during the lunch time, it is feasible to drop off the food from 11:30 a.m. to 12:30 p.m. Moreover, to improve the system throughput (i.e., the number of orders served), multiple orders can be shared and served by the same car/courier at a time [3,4,5]. For example, in the food-ordering scenarios, this food ordered from the same shop can be packed by a courier and delivered to the customers in a sharing fashion. Due to its potential in real-world applications, this paper mainly focuses on delivery service sharing variant with flexible pickup/drop-off time windows (DSS-Fle), where orders can be shared and served at a time.
Recently, many efforts have been devoted to addressinng two variants of DSS problem-DSR with flexible time windows (DSR-Fle) and DSS with a fixed time window (DSS-Fix). In the DSR-Fle literature, where orders cannot be shared, Vazifeh et al. [6] first propose a shareability network to model the special DSR variant with fixed pickup window (DSR-Fix), which can be addressed by the polynomial Hopcroft–Karp maximum-matching algorithm. Bertsimas et al. [7] extend to the NP-hard DSR-Fle, and propose an iterative heuristic algorithm of removing the undesirable edges in the shareability network in each iteration. Although the heuristic algorithm can scale to real-world city-scale scenarios, it has no theoretical guarantee on system throughput. On the other hand, a mixed integer program is used to formulate the DSS-Fix variant, and the time-consuming Lagrangian decomposition approach is proposed for the exact solution [8]. To reduce the computation complexity, a bipartite matching based approximation algorithm is proposed for matching a delivery resource with two orders [9], which might be inefficient for system throughput maximization. Ma et al. [10] propose a heuristic algorithm to generate the order sharing path, which works by finding and inserting the nearby orders into a current partial sharing path. The constructed sharing path might be efficient on system throughput and computation time; however, neither considers the flexible time windows nor provides any systemic analysis on the advantage of order sharing.
Against this background, the main contribution of this paper is to design a time-efficient algorithm for DSS-Fle, and to theoretically guarantee the advantage of order sharing. We extend the seminal shareability network mechanism (that is used in DSR-Fix), to DSR-Fle and DSS-Fix, respectively. For DSR-Fle, we split the flexible time windows into multiple virtual fixed times, carefully choosing one of these fixed times as the order’s service time, and employ the DSR-Fix mechanism to generate the routing plan. The DSR-Fle variant algorithm can provide the theoretical 1 κ approximation ratio with respect to system throughput, where κ is the maximum time window of orders. For DSS-Fix, we first search the orders that can be shared, and insert these shared orders into the shareability network of DSR-Fix. Compared to the DSR-Fix variant without considering order sharing, DSS-Fix can improve the system throughput. Finally, we combine the flexible time windows spitting mechanism (proposed for DSR-Fle) and shareability network updating mechanism (proposed for DSS-Fix) to design an efficient algorithm for DSS-Fle. Besides the time efficiency, we systemically guarantee that order sharing is beneficial on maximizing system throughput, i.e., DSS-Fix ≻ DSR-Fix, and DSS-Fle ≻ DSR-Fle; the symbol ≻ indicates the prior relation on maximizing system throughput. More specifically, this paper advances the state of the art in the following ways. Compared with the most related DSR-Fle studies, which employ the local search heuristic, we propose the approximate algorithm with system throughput guarantee. Compared with most related DSS-Fix studies, which do not take the flexible time windows into account, we propose a time-efficient algorithm for DSS-Fle and systematically analyze the advantage of sharing on maximizing system throughput. Finally, we conduct a series of experiments on synthetic datasets to validate the proposed algorithms.
The remainder of this paper is organized as follows. In Section 2, we provide a review of the related literature on DSR with fixed/flexible time windows, and with/without sharing. In Section 3, we formulate the DSS-Fle problem and propose the algorithm framework. In Section 4, we propose four algorithms for the DSR-Fix, DSR-Fle, DSS-Fix, and DSS-Fle four variants, respectively. In Section 5, we conduct a series of experiments on synthetic datasets to validate the proposed algorithms efficiency and effectiveness. Finally, we conclude our paper in Section 6.

2. Related Work

In this section, we categorize the related work into two groups: delivery service routing (DSR) and delivery service sharing (DSS). The latter is further categorized into vehicle-oriented sharing and customer-oriented sharing two subgroups.

2.1. Delivery Service Routing (DSR)

The DSR problem is a combinatorial optimization problem seeking to serve a number of customers with a fleet of vehicles [1,2]. Let G = V , C denote a graph, where V denotes the nodes, say customers that need service, c i j C denotes the time distance between nodes v i and v j . Each customer v i has a time window specified by an interval [ e i , l i ] , corresponding to the earliest and latest possible serving times, respectively. A vehicle route starts at the depot v 0 , serving some number of customers at most once within their windows. Solomon [1] proposes a heuristic of inserting a new un-routed customer into the current partial route, between two adjacent customers with the minimum insertion cost. To further improve routing efficiency, Potvin and Roussea [11] propose a 2-opt exchange heuristic where the initial route is improved by exchanging two existing route links for another two new route links—being aware that some lateness customers can be tolerated, and the soft time window is introduced and a tabu search heuristic of swapping sequences of consecutive customers between two routes is proposed in [12]. To minimize the number of vehicles and traveling cost, a two-stage hybrid algorithm is proposed in [13], in which the simulated annealing heuristic is used to minimize the number of vehicles, and the neighborhood search is used to minimize travel costs. Considering the necessity of visiting recharging stations in electric DSR problem, meta-heuristic search [14] and branch-price-and-cut-based exact algorithms [15] are proposed to minimize the route cost. To minimize the average distance traveled per customer, the weighted DSR is introduced [16]. For weighted DSR, the regret-insertion heuristic is proposed to construct the initial solution and iterative local link exchange heuristics is proposed to improve the routing efficiency. In the above DSR literature, customers have the same pickup location (i.e., the depot), and each drop-off location is modeled as a node, which can be served successfully once it is visited by a vehicle. In contrast to the existing DSR with the same pickup location, this paper studies the delivery service sharing (DSS) variant where the customer is specified by the origin, destination, and flexible pickup/drop-off time windows, and the customer can be served successfully if and only if he is picked up from its origin and delivered to its destination with the time window.

2.2. Delivery Service Sharing (DSS)

For the DSS group, we mainly focus on vehicle-oriented DSS and two customer-oriented DSS subgroups. For vehicle-oriented DSS, some customers are served in sequence by the same vehicle, and for customer-oriented DSS some customers can be shared and served by the same vehicle at the same time.

2.2.1. Vehicle-Oriented DSS

Each customer c can be represented by a tuple ( v c p , v c d , [ t c e , t c l ] ) , where v c p denotes the pick-up location, v c d denotes the drop-off location, and the time window [ t c e , t c l ] represents its minimal and maximal possible pickup/drop-off times [17]. In the vehicle-based DSS, each vehicle can only serve one customer at a time, and customers are served in sequence. For the special scenario with the fixed pickup/drop-off time, i.e., t c e = t c l = t j , the vehicle-shareability network is constructed in [18]. In the shareability network, each node represents a customer, and there is an directed edge between customers c and c if and only if c can be served immediately after c , i.e., t c + t c c t c , where t c c denotes the time distance of traveling from c’s destination to the origin of c and delivering c to its destination. Given the constructed shareability network, the Hopcroft–Karp algorithm [19] is utilized to maximize the number of customers served with n vehicles [6]. Considering the flexible pickup windows [ t c e , t c l ] , Bertsimas et al. [7] propose an iterative Backbone algorithm, and, at each iteration, the fixed time is chosen randomly within the time window and the desirable edges are remained. The optimal mixed integer programming is used to return the optimal solution within the remained shareability network. Being aware of the soft constraints of minimizing the delay of the fixed time window, a linear programming-based approximation algorithm is proposed in [20], and a heuristic local search strategy with a diversification updating strategy is used to improve the solution quality iteratively [21]. Compared with existing heuristics for vehicle-oriented DSS with flexible time windows, we propose an approximation algorithm which has theoretical performance guarantee on system throughput. Moreover, we also systemically analyze the customer-oriented sharing scenarios, where multiple customers can be served by a vehicle at the same time.

2.2.2. Customer-Oriented DSS

Customer-oriented sharing has been proposed as a promising means for improving DSS applications (e.g., ridesharing), where multiple customer requests can be shared and severed by a vehicle simultaneously [3,4,5]. A mixed integer programming can be used to model the static customer-oriented DSS where the customer requests are known in advance, and a time-consuming Lagrangian decomposition approach is used to return the exact solution [8]. To scale up the customer-oriented DSS, Bei et al. [9] propose a bipartite matching-based approximation algorithm. By considering the advantage of tip sharing with partners locating in proximal locations, a community-based trip-sharing paradigm is proposed, where customers are first clustered into local communities and optimal intra community trip sharing can be found by the integer programming [22]. By utilizing the offline partial paths, online nearby customer requests can be constructed and inserted by a local search in a real-time manner [23,24,25]. On the other hand, in ridesharing, the sharing paths should also satisfy the monetary constraints where passengers will not pay more compared with the scenario without ridesharing and taxi drivers will also make money for all the detour distance due to ridesharing [10]. Compared to the above customer-oriented DSS scenarios where customers have the fixed pickup/drop-off window, we study the more practical and flexible DSS variant where customers have time windows. Moreover, we design customer-oriented DSS algorithms with the systemic understanding of the power of customer sharing.

3. Model and Algorithm Framework

In this section, we first model the problem of delivery service sharing with flexible time windows, and outline the algorithm framework. Table 1 summarizes the notations used throughout the paper.

3.1. The Model

Food-Ordering Delivery Applications. The model is mainly motivated by food-ordering applications, such as Meituan, Eleme, and Freshhema. There are a set of n couriers A = { a 1 , a 2 , , a n } available for food delivery services. Each courier a i has a capacity c N + , indicating the maximum number of customer orders that can serve at a time (Here, we assume that each courier has the homogeneous delivery capacity, which can be easily extended to heterogeneous capacity scenario by making a match between the courier and delivery plans). Each day is discretized into periods; each period includes δ minutes (e.g., 5 min). The daily horizon T = { 1 , 2 , , T = 24 × 60 δ } , and the parameter δ can be tuned such that 24 × 60 δ is an integer.
City Network. Let G = V , E , W , D denote the weighted city network, where V = { v 1 , v 2 , , v m } indicates m regions in the city and each e i j E indicates the edge between regions v i and v j . The time distance on edges W = { w i j } e i j E indicates that it will take w i j periods to travel from v i to v j , and w i i = 0 , v i . Let D = { d i j } v i , v j V denote the time distance of the shortest path from v i to v j . The time distance matrix D satisfies the triangle inequality, i.e., d i k d i j + d j k , v i , v j and v k .
Customer Orders. Let R = { r 1 , r 2 , , r l } be a collection of customer orders. Each r j R is defined as a tuple ( v j p , v j d , [ t j e , t j l ] ) , where v j p V denotes the pick-up region of r j , and v j d V denotes the drop-off region. Each r j has a flexible drop-off time window [ t j e , t j l ] [ 1 , T ] , during which a customer wishes to finish her order. For example, [ t j e , t j l ] = [16:30, 17:30] indicates that the food delivery order r j must be delivered to customer home between the time 4:30 p.m. and 5:30 p.m.
Delivery Service Sharing with Flexible Time Windows (DSS-Fle). A delivery sharing plan P is a temporally-ordered route of pickup and drop-off regions of orders. Let R P R denote the subset of orders served in P , and for each r j R P , v j p should precede v j d , and the drop-off time should be within its flexible windows [ t j e , t j l ] . A courier is responsible for a plan, and for each plan, there are at most c orders in service at a time. DSS-Fle is formally defined as follows: given the set of n couriers A and the set of l customer orders R, find the n order-disjoint delivery sharing plans with the objective of optimizing order service rate, i.e., maximizing the number of orders served.

3.2. The Algorithm Framework

Before presenting the algorithm for DSS-Fle, we first study the following three special DSS-Fle variants:
  • Delivery service routing with the fixed window (DSR-Fix). We first consider the DSR-Fix variant where orders have the fixed drop-off window and there is no order sharing in routing plan. In terms of the fixed drop-off window, we mean that each order r j has a fixed drop-off time window, i.e., t j e = t j l = t j , and each order can only be finished at its fixed window t j . In terms of without order sharing, we mean that orders are served in sequence and each courier can only serve one order at a time.
  • Delivery service routing with the flexible windows (DSR-Fle). In DSR-Fle, each order has a flexible drop-off time window [ t j e , t j l ] , but they are still cannot be shared by a courier in the same service time.
  • Delivery service sharing with the fixed window (DSS-Fix). In DSS-Fix, multiple orders can be shared and served at a time, but each order r j has the fixed drop-off time window t j .
Inspired by the efficiency of a shareability network (proposed in [6,18]) on addressing DSR-Fix, we propose an approximation algorithm and a time efficient heuristic algorithm for DSR-Fle and DSS-Fix, respectively. Combining DSR-Fle and DSS-Fix algorithms together, we finally propose the DSS-Fle algorithm, which is efficient on both computation complexity and order service rate. The algorithm framework for DSS-Fle is outlined in Figure 1.

4. The Algorithms

In this section, we propose four algorithms for DSR-Fix, DSR-Fle, DSS-Fix, and DSS-Fle variants, respectively, and theoretically analyze these algorithms’ properties.

4.1. The DSR-Fix Variant Algorithm

In DSR-Fix, each order r j has the fixed drop-off window, i.e., t j e = t j l = t j , i.e., a courier must deliver r j to the drop-off region v j d before t j and wait until t j to drop off it. Moreover, orders cannot be shared and must be served in sequence. For any two orders r j and r k , they can be served consecutively if one courier can pick up the order r k immediately after finishing the order r j . There must be a long enough period of time between drop-off periods of r j and r k such that t j + τ j k t k , where τ j k = d v j d v k p + d v k p v k d denotes the time distance of traveling from the drop-off region of r j to the pickup region of r k and delivering r k to its drop-off region v k d . For such a DSR-Fix problem, an efficient courier-shareability network (CSN)-based algorithm is proposed in [6].
Definition 1.
Courier-shareability network (CSN). The CSN is a directed network CSN= ( V , E ) , where each node v j V corresponds to an order r j . The directed edge ( v j , v k ) E if and only if r j and r k can be served consecutively, i.e., t j + τ j k t k .
The existence of an edge ( v j , v j ) in the CSN indicates that the two orders r j and r k can be served consecutively, and a delivery plan in CSN corresponds to a sequence of orders that can be served by a courier. Solving the DSR-Fix problem is equivalent to finding n node-disjoint paths in such a way to maximize the cover of V in the constructed CSN [18]. The problem of finding the maximum n node-disjoint paths cover on directed acyclic graphs can be solved efficiently by using the Hopcroft–Karp maximum-matching algorithm [26]. Algorithm 1 describes the CSN-based DSR-Fix algorithm, in which the Hopcroft–Karp maximum matching algorithm is shown in Algorithm 2. In Algorithm 2, Steps 1–2, for each order r j , we create an in-order r j 1 and an out-order r j 2 in the bipartite graph G β . In Steps 3–5, for each directed edge ( r j , r k ) in the CSN, we create an edge between the in-order r k 1 and out-order r j 2 in the bipartite graph G β . Given the bipartite graph G β , the Hopcroft–Karp algorithm is utilized to return the maximum matchings M . In Algorithm 1, top n node-disjoint delivery plans correspond to top n longest consecutive matchings. Figure 2 shows a toy example on how to construct the CSN and how the optimal delivery path can be found by the Hopcroft–Karp maximum-matching algorithm.
Algorithm 1: CSN-based DSR-Fix (CSN-DSR-Fix).
Input: Customer Orders R.
Output: Served orders R R .
1 Construct the CSN G ( R , E ) ;
2 Invoke Algorithm 2 to find top n node-disjoint delivery plans;
3 Return the served orders R ;
Algorithm 2: Hopcroft–Karp Maximum Matching Algorithm.
Applsci 10 07431 i001

4.2. The DSR-Fle Variant Algorithm

In this section, we formulate the DSR-Fle problem where orders have flexible drop-off time windows, prove that the DSR-Fle problem is NP-hard, and propose an approximation algorithm for the DSR-Fle.

4.2.1. Problem Formulation

We use an integer programming (IP) to formulate the DSR-Fle problem where each order r j has flexible drop-off time windows [ t j e , t j l ] . The following decision variables are necessary:
  • x i j { 0 , 1 } , set to 1 if order r j is served by the courier a i as a first order;
  • y k j { 0 , 1 } , set to 1 if order r j is served immediately after r k ;
  • z j { 0 , 1 } , set to 1 if order r j is served by a courier;
  • θ j [ t j e , t j l ] , the drop-off period of order r j .
The following IP can be used to formulate the DSR-Fle.
max r j R a i A x i j + r k , r j R y k j
z j = a i A x i j + r k y k j , r j ,
r j R y k j z k , r k ,
r j R x i j 1 , a i ,
t j e θ j t j l , r j , θ j θ k ( t j e t k l ) + ( τ k j ( t j e t k l ) ) y k j , r j , r k , θ j t j e + ( τ i j t j e ) x i j , a i , r j .
Equation (1) is the object of maximizing the number of orders served. Constraint (2) ensures that the order r j is served (i.e., z j = 1 ) if and only if a courier a i serves him as the first customer order (i.e., x i j = 1 ) or after another order r k (i.e., y k j = 1 ). Constraint (3) ensures that the order r j that can be served after the order r k iff r k is served ( i . e . , z k = 1 ). Constraint (4) ensures that each courier can only serve one request as the first customer order. Finally, we enforce the drop-off time window constraints in Constraint (5): the first constraint ensures that the drop-off period θ j must lie in the window [ t j e , t j l ] ; the second constraint ensures that r j can be served immediately after r k iff there are long enough periods between θ j and θ k such that the courier can travel from the drop-off region of r k to the pickup region of r j and deliver r j to its drop-off region, the third constraint ensures that the courier a i can serve the order r j as the first order iff there are long enough periods for a i to travel from his region to the pickup and drop-off regions of r j and τ i j = d v a i v j p + d v j p v j d , a i , r j , where v a i indicates the region where a i starts from.
Theorem 1.
The DSR-Fle problem is NP-hard.
Proof. 
We show a reduction from the three-dimensional perfect matching problem (3DM), which is known to be NP-hard [27]. Recall that 3DM is as follows: given three finite and disjoint sets I, J and K, each of size n, and a subset T I × J × K with size m n (i.e., T consists of triples ( i , j , k ) such that i I , j J , and k K ), the 3DM problem asks if there exists a perfect matching with a subset M T with n triples, such that every element in I J K occurs in exactly one triple of M.
For any 3DM instance, I = I , J , K , T . We construct a corresponding DSR-Fle instance as follows: for each element i I , we create an order r i with the fixed drop-off window t i . For each element j J , we create an order r j , and, for each tuple ( · , j , · ) T , we create an available drop-off time t ( · , j , · ) for r j . For each element k K , we create an order r k with the fixed drop-off window t k . For each tuple ( i , j , k ) T , we create a directed edge from the order r i to the order r j , and a directed edge from r j to the order r k . The directed edge from r i to r j indicates that it is feasible to travel from r i ’s drop-off region (at the period t i ) to r j ’s pickup and drop-off region before the period t ( i , j , k ) . The edge directed from r j to r k indicates that it is feasible to travel from r j ’s drop-off region (at the period t ( i , j , k ) ) to r k ’s pickup and drop-off region before the period t k . The region of the orders r i , r j and r k and time distance among orders can be easily constructed to satisfy the shareability requirements. Moreover, there are n couriers in the DSR-Fle problem. The construction can be done in the polynomial time. We will show that the DSR-Fle can serve 3n orders iff 3DM has a perfect matching.
The ‘if’ direction: Assume that 3DM has a perfect matching M T with n triples. In the DSR-Fle, for each courier, it can serve three orders r i , r j , and r k consecutively, where ( i , j , k ) M . For each r i and r k , it is only served exactly once. This is because the drop-off windows of r i and r k are fixed, and, for r j , it is only served once since element j occurs exactly in one triple of M.
The ‘only if’ direction: Assume that these n couriers can serve 3n orders in the DSR-Fle problem, where each courier’s delivery plan is r i , r j , r k . Then, in 3DM, the n delivery plans correspond to the n triples ( i , j , k ) , which is a perfect matching. This is because each element in i I , j J , and k K occurs exactly once. □

4.2.2. The Approximation Algorithm

The main idea behind the approximation algorithm is that, for the order r j , we split its flexible windows [ t j e , t j l ] into κ j = t j l t j e + 1 virtual orders r ˜ j = { r ˜ j 1 , r ˜ j 2 , , r ˜ j κ j } , each virtual order r ˜ j h has the fixed drop-off window t j e + h 1 , 1 h κ j . For DSR-Fix with the set of virtual orders R ˜ = { r ˜ 1 , r ˜ 2 , , r ˜ m } , we can adopt Algorithm 1 to optimize the order service. Let R ˜ R ˜ denote the set of virtual orders served by Algorithm 1. For these virtual orders { r ˜ j 1 , r ˜ j 2 , , r ˜ j κ j } that are served in R ˜ and belong to the same real order r j , randomly choosing one virtual order r ˜ j h ( 1 h κ j ) as the real order r j ’s drop-off period, i.e., t j e + h 1 . The details of the approximation algorithm are presented in Algorithm 3. In Steps 2–3, each real order r j R is split into κ j virtual orders, and the set of virtual orders is denoted by R ˜ . In Step 4, Algorithm 1 is utilized to return the served orders R ˜ R ˜ . Finally, in Steps 5–6, one of these virtual orders r ˜ j h that belongs to the same real order r j is chosen such that r j is finished at the drop-off period t j h = t j e + h 1 .
Algorithm 3: Splitting-Based Approximation Algorithm for DSR-Fle (Spl-DSR-Fle).
Applsci 10 07431 i002
Theorem 2.
Let κ = max r j R κ j denote the maximum window length of orders R, then the number of orders achieved from the Algorithm 3 at least 1 κ of the optimal value returned by Equations (1)–(5).
Proof. 
Let O p t denote the optimal number of orders served in DSR-Fle, O p t s p l denote the optimal number of orders served in the “split” DSR-Fle variant, where each order r j is split into κ j virtual orders, and A l g s p l denotes the number of orders served by Algorithm 3. When no ambiguity is possible, we let O p t , O p t s p l and A l g s p l denote the number of orders served as well the order delivery plan. In the following, we will prove that O p t O p t s p l and A l g s p l O p t s p l κ , respectively.
O p t O p t s p l . Let O p t = { O p t 1 , O p t 2 , , O p t n } , where O p t i denotes the order delivery plan of the courier a i . It should be noted that O p t is also a feasible delivery plan in the “split” DSR-Fle variant. On the other hand, virtual orders served in O p t s p l might belong to the same real orders, and a feasible delivery plan of O p t s p l does not necessarily correspond to a feasible delivery plan of O p t . Therefore, we have O p t O p t s p l .
A l g s p l O p t s p l κ . Let O p t s p l = { O p t s p l 1 , O p t s p l 2 , , O p t s p l n } , where O p t s p l i denotes the order delivery plan as well as the orders served by a i in the “split” DSR-Fle. For any delivery plan O p t s p l i , and any consecutive three virtual orders r ˜ j o , r ˜ k p and r ˜ h q served by a i , it is feasible for a i to serve any two virtual orders of r ˜ j o , r ˜ k p and r ˜ h q . This is because the triangle inequality τ j o k p + τ k p h q τ j o h q , where j o , k p , and h q are the virtual orders with the drop-off period t j e + o 1 , t k e + p 1 and t h e + q 1 , respectively. This indicates that, for any delivery plan O p t s p l i , removing any number of virtual orders does not break the shareability of other remained virtual orders. Therefore, in Algorithm 3, for each real order r j (with κ j virtual orders) that are served in the “split” DSR-Fle variant, at least one of its virtual orders r ˜ j h remains. Therefore, we have A l g s p l = r j 1 r j R r j ˜ r ˜ j h r j ˜ 1 r ˜ j h R ˜ κ j O p t s p l κ , where the function 1 f ( · ) returns value 1 when the function f ( · ) is true; otherwise, it returns zero, R ˜ is the set of orders served in O p t s p l , and R is the set of orders served in A l g s p l .
Combining the above two conclusions, we have that A l g s p l O p t A l g s p l O p t s p l 1 κ . □
Theorem 2 generalizes the DSR-Fix variant (i.e., κ = 1 ) that Algorithm 1 can achieve the optimal solution [6].

4.2.3. Improvement on the Spl-DSR-Fle Algorithm

We extend Algorithm 3 and propose an iterative algorithm to further improve system throughput. At each iteration g, let R g f i x denote “fixed” orders, i.e., the set of orders whose drop-off period is determined and fixed, and R g f l e denote the “flexible” orders, i.e., the set of orders whose drop-off period is flexible within windows [ t j e , t j l ] . For each flexible order r j R g f l e , we split its flexible time windows into κ j = t j l t j e + 1 virtual orders r ˜ j = { r ˜ j 1 , r ˜ j 2 , , r ˜ j κ j } , and each r ˜ j h has the fixed drop-off period t j e + h 1 , 1 h κ j . At each iteration g, let R ˜ g f l e denote the virtual orders split from R g f l e and R ˜ g = R g f i x R ˜ g f l e denote all of the orders. Given R ˜ g , we construct the corresponding CSN G ( R ˜ g , E ) and invoke Algorithm 3 to return the fixed orders R g f i x that are served at the current iteration g. The details of the iterative DSR-Fle are proposed in Algorithm 4. In Step 3, the set of orders R ˜ g is constructed, which includes the set of fixed orders R g f i x whose drop-off period is fixed, and the set of virtual orders R ˜ g f l e split from R g f l e . In Step 4, the CSN G = ( R ˜ g , E ) is constructed with respect to R ˜ g . In Step 5, Algorithm 3 is invoked to return the fixed orders served, R g f i x . In Step 6, the set of flexible orders R g f l e is updated by removing the fixed orders R g f i x whose drop-off period has been determined. The iteration terminates until there is no improvement over previous iteration g 1 on the number of orders served.
Lemma 1.
Algorithm 4 can always converge within finite iterations.
Proof. 
Assume that, at the iteration g, if there is no improvement in the number of orders over that of the previous iteration g 1 , Algorithm 4 terminates and converges. Otherwise, it will always increase at least one order at each iteration; this is because each iteration generates a feasible solution of serving a set of real orders. On the other hand, there are at most | R | orders to be served, thus, Algorithm 4 can always converge within at most | R | iterations. □
Algorithm 4: Iterative Improvement over Spl-DSR-Fle (Ite-DSR-Fle).
Applsci 10 07431 i003

4.3. The DSS-Fix Variant Algorithm

In this section, we formulate the DSS-Fix problem, prove the DSS-Fix problem is NP-hard, and propose an efficient heuristic algorithm for DSS-Fix.

4.3.1. Problem Formulation and Complexity Analysis

In DSS-Fix, each order r j has the fixed drop-off time window t j , but multiple orders can be shared and served by a courier at a time. For example, orders r j and r k with proximal pickup regions can be picked up consecutively by a courier, and the sharing delivery plan can be v j p v k p v j d v k p . We say such a sharing plan is feasible if and only if (1) at any region, the number of orders in service is smaller than the courier capacity c, and (2) the courier can drop-off the order r j (resp. r k ) at v j d (resp. v k d ) no later than t j (resp. t k ), but can before t j (resp. t k ) while waiting until t j (resp. t k ). The DSS-Fix problem is to find the optimal n sharing delivery plans to maximize the order service rate.
Theorem 3.
The DSS-Fix problem is NP-hard.
Proof. 
We show a reduction from the metric Traveling Salesman Problem (TSP), which is known to be NP-hard. Recall that a metric TSP problem is as follows: given a weighted complete graph G = ( V , W ) , where v i V ( | V | = n ) is the vertex and w i j N + is the non-negative cost associated with the edge e i j between v i and v j , the TSP asks if there exists a Hamiltonian path (i.e., a path visiting each vertex exactly once) with a cost equal to K. For any metric TSP instance I = G , K , we construct a DSS-Fix instance as follows. For each vertex v i V , we create an order r i = ( v i , v , K ) , where v i indicates the pickup region, v is the created auxiliary region indicating the drop-off region of r i , and K indicates the drop-off period. The weight of the edge w i j corresponds to the time distance between the pickup regions of r i and r j . Moreover, for each order r i , the time distance between its pickup region v i and its fixed drop-off region v is zero. In DSS-Fix, there is only one courier with capacity n. The courier stats from the depot region v 0 and the time distance between v 0 and any other region is zero. This construction can be done in polynomial time. We can conclude that the DSS-Fix can serve n orders within the period horizon K iff TSP has a Hamiltonian path with cost K. □

4.3.2. The Heuristic Algorithm

The main idea behind the heuristic algorithm for DSS-Fix is that we first search these orders that can be shared, then package the shared orders as a virtual order, and finally insert the virtual order into the DSR-Fix CSN.
Order Sharing Search. For two orders r j and r k whose pickup (resp. drop-off) regions that are proximal, it will be beneficial to pick up (resp. drop off) r j and r k consecutively. Imposing a bound of c implies that at most c orders can be shared and served by a courier at a time. In the following, we consider the case c = 2 , i.e., search 2-order sharing where two orders can be served in a sharing manner.
Definition 2.
2-order sharing r j , r k . Given two orders r j and r k with fixed time window t j and t k , and assuming that t j t k without loss of generality, it is beneficial for serving the two orders in a sharing manner if these two orders satisfy the following two properties: (1) it is not feasible to serve r j and r k consecutively, i.e., t j + τ j k > t k , and (2) it is feasible to execute one of the following two sharing delivery plans v j p , v k p , v j d , v k d and v k p , v j p , v j d , v k d . In particular, property (2) requires that a courier can start from certain period t s and certain region v s , and one of the following inequations should satisfy:
t s + d v s v j p + d v j p v k p + d v k p v j d t j , t s + d v s v j p + d v j p v k p + d v k p v j d + d v j d v k d t k .
t s + d v s v k p + d v k p v j p + d v j p v j d t j , t s + d v s v k p + d v k p v j p + d v j p v j d + d v j d v k d t k .
Equation (6) corresponds to the sharing plan v j p , v k p , v j d , v k d , and Equation (7) corresponds to the sharing plan v k p , v j p , v j d , v k d . The motivation of the property (1) is shown as follows. In DSS-Fix, for two orders r j and r k that can be served consecutively, it does not take any advantage of sharing them by picking them up (resp. dropping off) consecutively. This is because, with the fixed drop-off period t j and t k , the sharing plan cannot finish r j and r k earlier, but might need the earlier pick up period. For example, for the sharing plan v j p , v k p , v j d , v k d , after picking up r j at v j p , the courier needs to travel to the pick-up region v k p of r k and the drop-off region v j d of r j . However, a courier can travel directly from v j p to v j d in the routing plan v j p , v j d , v k p , v k d without sharing, which needs fewer periods to finish r j than that of the sharing plan. For values of c > 2 , there are up to c orders that can be shared and served at a time. Because of the computational reasons, the capacity parameter c has a substantial impact on the feasibility of solving the DSS-Fix problem. Here, we mainly consider the case c = 2 . However, as we show in the experiments, even the minimum possible number of order sharing (i.e, 2-order sharing) can provide immense benefits to DSS-Fix variants.
Iterative DSS-Fix Algorithm. For any 2-order sharing r j , r k , we package them as a whole and construct two virtual orders r j k s and r k j s for the shared plans (if any) v j p , v k p , v j d , v k d and v k p , v j p , v j d , v k d , respectively. Let R ˜ s denote all of the virtual shared orders. Given the sharing orders R ˜ s and the real orders R, we construct the “sharing” CSN G s ( R R ˜ s , E ) . The directed edge ( r j , r k ) E indicates the (real/virtual) orders r j and r k can be served consecutively. For the CSN G s , we invoke Algorithm 2 to return the set of served orders R . Given the optimal solution R that might include virtual sharing orders, the CSN can be updated and screen out the real orders as follows.
Definition 3.
CSN Update Rule. The solution R includes virtual sharing and real orders, which might involve the same order, and the CSN G s should be updated to delete the undesirable orders, such as
  • For the virtual order r j k s (resp. r k j s ), if it is not served in the solution R , r j k s (resp. r k j s ) will be deleted from the CSN G s .
  • For the virtual orders r j k s and r k j s that belong to the same 2-order sharing r j , r k , if they are both served in R , one of the them will be deleted from the CSN G s .
  • For the virtual order r j k s (resp. r k j s ), if it is served in R , and both of the real orders r j and r k are also served in R , r j k s (resp. r k j ) will be deleted from the CSN G s .
  • For the virtual order r j k s (resp. r k j s ), if it is served in R , however, only one of the real orders r j and r k is served in R , both r j and r k will be deleted from the CSN G s .
After updating the CSN, Algorithm 2 is invoked again to derive the orders served in the next iteration. The details of the iterative DSS-Fix algorithm are proposed in Algorithm 5. In Step 2, the set of virtual sharing orders R ˜ s is constructed. Based on the constructed R ˜ s and the real orders R, the CSN graph G s is constructed in Step 3. Steps 4–8 are the iterative process of finding the set of orders R g and updating the CSN G g s at each iteration g. The iterative process terminates until there is no improvement over the previous iteration on the number of real orders served.
Algorithm 5: Iterative Algorithm for DSS-Fix (Ite-DSS-Fix).
Applsci 10 07431 i004
Lemma 2.
Algorithm 5 can always converge within finite iterations.
The proof is similar to that in Lemma 1 and is omitted here for space limitation.
Lemma 3.
Given the set of customer orders R, the number of orders served by the DSS-Fix algorithm (i.e., Algorithm 5) is not less than that served by the DSR-Fix algorithm (i.e., Algorithm 1).
Proof. 
In DSS-Fix, the CSN G s = ( R R ˜ s , E ) not only includes the real orders R, but also includes the virtual shared orders R ˜ s . Therefore, the number of orders served in the DSR-Fix variant CSN G = ( R , E ) must not be larger than that in the DSS-Fix variant CSN G s = ( R R ˜ s , E ) . Moreover, the CSN update rule always deletes the real order r j that has been served in the virtual shared orders r j k s (resp. r k j s ), which will not reduce the number of orders served in G = ( R , E ) . In other words, for each served order r j in G = ( R , E ) that is not served in G s = ( R R ˜ s , E ) , there must be another one real order r k or virtual orders r j k s (resp. r k j s ) replacing r j in G s = ( R R ˜ s , E ) . Therefore, we have this conclusion. □
Lemma 3 theoretically guarantees the advantage of delivery sharing plan over delivery routing plan.

4.4. The DSS-Fle Variant Algorithm

On one hand, the DSS-Fle problem, where the order has flexible drop-off time windows, is a general variant of the DSS-Fix problem. On the other hand, the DSS-Fle problem, where orders can be served in a sharing manner, is also a general variant of the DSR-Fle problem. To solve such an NP-hard DSS-Fle problem, we can combine the DSR-Fle variant algorithm (i.e., Algorithm 4) and the DSS-Fix variant algorithm (i.e., Algorithm 5).
The main idea of the DSS-Fle variant algorithm is that we first employ Ite-DSR-Fle algorithm (i.e., Algorithm 4) to return “fixed” orders whose drop-off periods are determined and fixed. Given the “fixed” orders, we then employ the Ite-DSS-Fix algorithm (i.e., Algorithm 5) to search the order-sharing and generate the sharing delivery plan. The details of the DSS-Fle algorithm are shown in Algorithm 6. In Step 2, the Ite-DSR-Fle algorithm is employed to determine the fixed drop-off period of each order (For the order whose drop-off period cannot determined, a greedy heuristic of choosing its latest drop-off period is employed). Let R f i x denote the set of “fix” orders. In Step 3, the Ite-DSS-Fix algorithm is employed to optimize the set of fixed orders R f i x .
Algorithm 6: The DSS-Fle Variant Algorithm (DSS-Fle).
Input: Customer orders R.
Output: Served orders R R .
1 Initialize R f i x = Ø ;
2 Invoke the Ite-DSR-Fle algorithm (i.e., Algorithm 4) to generate “fixed” orders R f i x with fixed drop-off periods;
3 Invoke the Ite-DSS-Fix( R f i x ) algorithm (i.e, Algorithm 5) to return the served orders R ;
4 Return R .
Lemma 4.
Algorithm 6 can always converge within finite iterations.
This proof can be derived from the convergence results of Algorithms 4 and 5.

5. Experimental Evaluation

We generate synthetic datasets to validate the performance of proposed algorithms. All computations are performed on a 64-bit PC with 16 GB RAM and a Dual core 3.5 GHz processor. All records are averaged over 40 instances, and each record is statistically significant at a 95% confidence level. Existing public delivery datasets such as the New York City taxi-trip dataset (https://www1.nyc.gov/site/tlc/about/tlc-trip-record-data.page) only includes the order’s pick-up region, drop-off region, and request time, and does not include the flexible drop-off time windows. Thus, we use the synthetic data to validate the proposed algorithms.
Comparison Metrics. We mainly compare the running time and the order service rate (OSR) of the algorithms. The OSR is computed as follows: we compare the number of orders served with the total number of orders | R | , e.g., the OSR of the algorithm A l g is computed as N o S ( A l g ) | R | , where N o S ( A l g ) is the number of orders served by the algorithm A l g .

5.1. Validate the Ite-DSR-Fle Variant Algorithm

In this section, we mainly focus on the DSR variant without considering order sharing and validate the efficiency of the proposed Ite-DSR-Fle approximation algorithm.
Experimental Setup. Each period consists of 5 min and the horizon T = 36 , which might represent the food-delivery peak-hour at noon ranging from 10:30 a.m. to 1:30 p.m. The city network consists of 100 regions; each region has four neighbors, connected by a small-world network [28]. The traveling period between adjacent neighbors follows U ( 1 , 4 ) , where U ( a , b ) indicates the uniform distribution between a and b. The time distance between two regions can be computed by the shortest path. There are 200 couriers starting routing with uniformly distributed initial regions. Customer orders are randomly generated as a Poisson process P ( λ ) with a fixed arrival rate λ . The origin and destination of each order is uniformly drawn across the regions. By setting the arrival rate of the Poisson process so that the expectation of the total number of orders is 200, 500, 1000, respectively, these three levels of customer order demand correspond to the low, medium, and high demands. We give all customers a constant time window around their preferred drop-off period (that follows U ( 1 , T ) ), from one to five periods.
Comparison Methods. We compare the proposed approximation Ite-DSR-Fle with the following two benchmarks.
  • The integer-programming-based optimal solution (IPopt): We use the CPLEX (version 12.6) to solve this IPopt (i.e., Equations (1)–(5)) to return the optimal solution.
  • Greedy: Each customer order r j is assigned with its latest drop-off period t j * = t j l as its fixed drop-off period, based on which the CSN-DSR-Fix (i.e., Algorithm 1) is employed to return the solution.
Experiment Results.Table 2 shows the OSR and running time of these algorithms with varying order demands and window lengths. From Table 2, we can observe that (1) the proposed Ite-DSR-Fle can perform close to the optimal IPopt with respect to maximizing OSR. For example, in the worst scenario with high order demand and the five periods flexible time window, Ite-DSR-Fle finishes ∼5% less OSRs than that of the optimal IPopt. This result is consistent with the theoretical approximation of the Ite-DSR-Fle algorithm. (2) Ite-DSR-Fle achieves nearly ∼6% more OSRs than that of the greedy heuristic in average. The potential reason is that the orders’ drop-off periods should be coordinated rather than chosen by their latest period independently. Considering that there are thousands of customer orders, such an improvement is desirable. (3) Since IPopt needs to solve the IP Equations (1)–(5), the running time prevents it from scaling to large instances. For example, in the scenario with high demand, it will take a couple of minutes (e.g., 80.4 s) to return the routing plan. However, the Ite-DSR-Fle can generate the routing plan within about 1.4 s. (4) The more flexible time windows, the more OSR will be achieved by the Ite-DSR-Fle. For example, in the scenario of high order demand, the OSR of Ite-DSR-Fle(#1) is 0.435, while the OSR of Ite-DSR-Fle(#5) increases to 0.484, where #1 and #5 indicate that the lengths of time windows are 1 and 5, respectively. This can be explained by the fact that, the longer the time window, the more feasible routing plans can be generated, and the more orders can be finished.
In summary, in the DSR-Fle variant, the proposed Ite-DSR-Fle can achieve nearly the optimal OSR, while the running time is significantly reduced over the optimal solution.

5.2. Validate the DSS-Fle Variant Algorithm

In this section, we will validate the DSS-Fle variant algorithm, such as the advantage of order sharing over DSR variant algorithms, the advantage of flexible time selection mechanism over traditional fixed time selection heuristics, and the scalability on city-scale applications.
Experimental Setup. We consider that the city-scale network consists of 1000 regions, connected by a small-world like network, and each node has on average six neighbors. We consider that there are 1000 couriers with uniformly distributed depot regions. Each customer order has a fixed time window of three periods around their preferred drop-off period. The other settings are similar to that in Section 5.1.

5.2.1. Validate the Advantage of Order Sharing and Scalability

Comparison Methods and Metrics. We compare the proposed DSS-Fle, Ite-DSS-Fix, Ite-DSR-Fle and DSR-Fix algorithms on running time and OSR.
Experimental Results.Table 3 shows the OSR and running time of these algorithms with varying customer order demands. From Table 3, we can observe that (1) the DSS-Fle can always produce the highest OSR, which is followed by Ite-DSR-Fle, Ite-DSS-Fix, and DSR-Fix. This result is consistent with the theoretical analysis that DSS-Fle ≻ Ite-DSS-Fix, and Ite-DSR-Fix ≻ DSR-Fix. This can be explained by the fact that taking the flexible time windows and order sharing (though 2-order sharing) into consideration is beneficial for improving OSRs. The experimental order-sharing advantage is consistent with the theoretical results of Lemma 3. (2) For the large-scale instances with 10,000 orders, although DSS-Fle will take about 2 min to return the delivery plans, considering its benefit of improving ∼200 orders over DSR-Fix, DSS-Fle is still a good option for food ordering apps. In food-ordering apps, customers are more concerned with whether their food can be dropped off in time or not, and the response time is tolerable within several minutes [20]. (3) With the constant couriers (e.g., 1000 in this experiment), the more customer order demands, the more number orders that can be served. For example, in the case of 2000 orders, 1140 (= 2000 × 0.572) orders are served on average, while, in the case of 10,000 orders, nearly 1720 (= 10,000 × 0.172) orders will be served. This can be explained by the fact that more customers will generate more feasible delivery plans, thereby improving the number of orders served.

5.2.2. Validate the Advantage over Existing Heuristics

Comparison Methods and Metrics. We compare the proposed DSS-Fle with the following two existing heuristics:
  • Greedy: Each customer order r j is assigned with its latest drop-off period t j * = t j l as its fixed drop-off period, based on which the CSN-DSR-Fix (i.e., Algorithm 1) is employed to return the solution.
  • Insertion-based Heuristics (Insert-Heu): The Greedy algorithm is first employed to derive a solution of n delivery sharing plans P = { P 1 , P 2 , , P n } . For any order r j R that is not served in P , a re-optimization of inserting r j into a sharing plan P i P is elaborated. Given the delivery plan P i = v 1 p , v 1 d , v h p , v h d of a temporally-ordered route of pickup and drop-off regions of h orders, the insertion heuristic attempts to insert r j pick-up region v j p and drop-off region v j p into these 2 h regions. A feasible insertion of r j into P i must satisfy (1) without violating the order service in the rest of the plan P i , and (2) the number of on-board orders is smaller than the courier’s capacity c ( c = 2 in this experiment). There are O ( l 2 ) possible ways of insertion for each order and each plan, where l is the number of orders. Given these n delivery plans and l orders in total, there are O ( n l 3 ) insertion computations.
Experimental Results.Figure 3 shows the OSRs of these algorithms with varying customer order demands. From Figure 3, we can observe that DSS-Fle can always serve the most orders, which is followed by Insert-Heu and Greedy. This result can validate (1) the advantage of flexible drop-off time selection mechanism (i.e., Algorithm 3) over a fixed drop-off time selection mechanism (i.e., Insert-Heu and Greedy), and (2) the advantage of insertion mechanism (i.e., Insert-Heu) over the one-short Greedy solution on improving OSR. Moreover, inspired by the advantage of Insert-Heu, it is interesting for the future work to combine the proposed DSR-Fle with the insertion mechanism for the online delivery services’ applications.
In summary, the proposed DSS-Fle can maximize system throughput in the tolerable time in the city-scale order delivery applications with thousands of couriers and customers. Moreover, the more computation time available, the larger system throughput that will be achieved.

6. Conclusions

This paper studies the practical DSS-Fle problem, where customer orders have flexible drop-off time windows and can be served in a sharing manner. To address such a NP-hard problem, we first study the special DSR-Fix variant, which can be addressed by the CSN and Hopcroft–Karp maximum matching algorithm. By extending the DSR-Fix variant algorithm, we further propose an approximation algorithm (i.e., Ite-DSR-Fle) for the DSR-Fle problem and a heuristic algorithm (i.e., Ite-DSS-Fix) for the DSS-Fix problem. The Ite-DSR-Fle algorithm splits the flexible time windows into multiple fixed time windows, and the DSR-Fix variant algorithm can then be employed to serve orders at the desirable drop-off period. The Ite-DSS-Fix algorithm searches and inserts the sharing orders, and the DSR-Fix variant algorithm then can be employed to generate the desirable sharing plan. Finally, using Ite-DSR-Fle to generate the “fixed” orders and using Ite-DSS-Fix to search order sharing together yield the polynomial time DSS-Fle algorithm for order service rate optimization. Simulation results show that the proposed DSS-Fle algorithm is efficient both on improving order service rate and applying to city-scale scenarios with thousands of regions and customer orders.

Author Contributions

W.W. proposed the problem; W.W. and H.T. designed the algorithms and performed the simulation; W.W. and Y.J. contributed in analyzing the performance and writing this paper. All authors have read and agreed to the published version of the manuscript.

Funding

This research is supported by the National Key Research and Development Project of China (2019YFB1405000), the National Natural Science Foundation of China (61932007, 61806053 and 61807008), the Natural Science Foundation of Jiangsu Province of China (BK20171363, BK20180356, and BK20180369), and the “Zhishan Young Scholar” Program of Southeast University.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Solomon, M.M. Algorithms for the Vehicle Routing and Scheduling Problems with Time Window Constraints. Oper. Res. 1987, 35, 254–265. [Google Scholar] [CrossRef] [Green Version]
  2. Bent, R.; Hentenryck, P.V. Waiting and Relocation Strategies in Online Stochastic Vehicle Routing. In Proceedings of the 20th International Joint Conference on Artificial Intelligence, IJCAI 2007, Hyderabad, India, 6–12 January 2007; pp. 1816–1821. [Google Scholar]
  3. Kamar, E.; Horvitz, E. Collaboration and Shared Plans in the Open World: Studies of Ridesharing. In Proceedings of the 21st International Joint Conference on Artificial Intelligence, IJCAI 2009, Pasadena, CA, USA, 11–17 July 2009; p. 187. [Google Scholar]
  4. Ota, M.; Vo, H.; Silva, C.; Freire, J. STaRS: Simulating Taxi Ride Sharing at Scale. IEEE Trans. Big Data 2017, 3, 349–361. [Google Scholar] [CrossRef]
  5. Jiang, S.; Chen, L.; Mislove, A.; Wilson, C. On Ridesharing Competition and Accessibility: Evidence from Uber, Lyft, and Taxi. In Proceedings of the 2018 World Wide Web Conference on World Wide Web, WWW 2018, Lyon, France, 23–27 April 2018; pp. 863–872. [Google Scholar]
  6. Vazifeh, M.M.; Santi, P.; Resta, G.; Strogatz, S.H.; Ratti, C. Addressing the minimum fleet problem in on-demand urban mobility. Nature 2018, 557, 534–538. [Google Scholar] [CrossRef] [PubMed]
  7. Bertsimas, D.; Jaillet, P.; Martin, S. Online Vehicle Routing: The Edge of Optimization in Large-Scale Applications. Oper. Res. 2019, 67, 143–162. [Google Scholar] [CrossRef]
  8. Hosni, H.; Naoum-Sawaya, J.; Artail, H. The shared-taxi problem: Formulation and solution methods. Transp. Res. Part B Methodol. 2014, 70, 303–318. [Google Scholar] [CrossRef]
  9. Bei, X.; Zhang, S. Algorithms for Trip-Vehicle Assignment in Ride-Sharing. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, (AAAI-18), New Orleans, LA, USA, 2–7 February 2018; pp. 3–9. [Google Scholar]
  10. Ma, S.; Zheng, Y.; Wolfson, O. Real-Time City-Scale Taxi Ridesharing. IEEE Trans. Knowl. Data Eng. 2015, 27, 1782–1795. [Google Scholar] [CrossRef]
  11. Potvin, J.Y.; Rousseau, J.M. An Exchange Heuristic for Routeing Problems with Time Windows. J. Oper. Res. Soc. 1995, 46, 1433–1446. [Google Scholar] [CrossRef]
  12. Taillard, É.D.; Badeau, P.; Gendreau, M.; Guertin, F.; Potvin, J.Y. A Tabu Search Heuristic for the Vehicle Routing Problem with Soft Time Windows. Transp. Sci. 1997, 31, 170–186. [Google Scholar] [CrossRef] [Green Version]
  13. Bent, R.; Van Hentenryck, P. A Two-Stage Hybrid Local Search for the Vehicle Routing Problem with Time Windows. Comput. Oper. Res. 2006, 33, 875–893. [Google Scholar] [CrossRef]
  14. Schneider, M.; Stenger, A.; Goeke, D. The Electric Vehicle-Routing Problem with Time Windows and Recharging Stations. Transp. Sci. 2014, 48, 500–520. [Google Scholar] [CrossRef]
  15. Desaulniers, G.; Errico, F.; Irnich, S.; Schneider, M. Exact Algorithms for Electric Vehicle-Routing Problems with Time Windows. Oper. Res. 2016, 64, 1388–1405. [Google Scholar] [CrossRef]
  16. Xinyu, W.; Shuai, S.; Jiafu, T. Iterative Local-Search Heuristic for Weighted Vehicle Routing Problem. IEEE Trans. Intell. Transp. Syst. 2020, in press. [Google Scholar]
  17. Berbeglia, G.; Cordeau, J.F.; Laporte, G. Dynamic pickup and delivery problems. Eur. J. Oper. Res. 2010, 202, 8–15. [Google Scholar] [CrossRef]
  18. Santi, P.; Resta, G.; Szell, M.; Sobolevsky, S.; Strogatz, S.H.; Ratti, C. Quantifying the benefits of vehicle pooling with shareability networks. Proc. Natl. Acad. Sci. USA 2014, 111, 13290–13294. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  19. Hopcroft, J.E.; Karp, R.M. An n 5/2 Algorithm for Maximum Matchings in Bipartite Graphs. SIAM J. Comput. 1973, 2, 225–231. [Google Scholar] [CrossRef]
  20. Das, A.; Gollapudi, S.; Kim, A.; Panigrahi, D.; Swamy, C. Minimizing Latency in Online Ride and Delivery Services. In Proceedings of the 2018 World Wide Web Conference on World Wide Web, WWW 2018, Lyon, France, 23–27 April 2018; pp. 379–388. [Google Scholar]
  21. Xiang, Z.; Chu, C.; Chen, H. A fast heuristic for solving a large-scale static dial-a-ride problem under complex constraints. Eur. J. Oper. Res. 2006, 174, 1117–1139. [Google Scholar] [CrossRef]
  22. Hasan, M.H.; Hentenryck, P.V.; Budak, C.; Chen, J.; Chaudhry, C. Community-Based Trip Sharing for Urban Commuting. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, (AAAI-18), New Orleans, LA, USA, 2–7 February 2018; pp. 6589–6597. [Google Scholar]
  23. Santos, D.O.; Xavier, E.C. Dynamic Taxi and Ridesharing: A Framework and Heuristics for the Optimization Problem. In Proceedings of the Twenty-Third International Joint Conference on Artificial Intelligence, IJCAI’13, Beijing, China, 3–9 August 2013; pp. 2885–2891. [Google Scholar]
  24. Lowalekar, M.; Varakantham, P.; Jaillet, P. ZAC: A Zone Path Construction Approach for Effective Real-Time Ridesharing. In Proceedings of the Twenty-Ninth International Conference on Automated Planning and Scheduling, ICAPS 2018, Berkeley, CA, USA, 11–15 July 2019; pp. 528–538. [Google Scholar]
  25. Zhu, M.; Liu, X.; Wang, X. An Online Ride-Sharing Path-Planning Strategy for Public Vehicle Systems. IEEE Trans. Intell. Transp. Syst. 2019, 20, 616–627. [Google Scholar] [CrossRef]
  26. Boesch, F.T.; Gimpel, J.F. Covering Points of a Digraph with Point-Disjoint Paths and Its Application to Code Optimization. J. ACM 1977, 24, 192–198. [Google Scholar] [CrossRef]
  27. Garey, M.R.; Johnson, D.S. Computers and Intractability: A Guide to the Theory of NP-Completeness. In Mathematical Sciences; W.H.Freeman: New York, NY, USA, 1990. [Google Scholar]
  28. Watts, D.J.; Strogatz, S.H. Collective dynamics of ’small-world’ networks. Nature 1998, 393, 440–442. [Google Scholar] [CrossRef] [PubMed]
Figure 1. The algorithm framework for DSS-Fle. Derived from DSR-Fix, we first propose DSR-Fle and DSS-Fix algorithms, and derived from DSR-Fle and DSS-Fix together, we propose the DSS-Fle algorithm.
Figure 1. The algorithm framework for DSS-Fle. Derived from DSR-Fix, we first propose DSR-Fle and DSS-Fix algorithms, and derived from DSR-Fle and DSS-Fix together, we propose the DSS-Fle algorithm.
Applsci 10 07431 g001
Figure 2. An illustration on how CSN works. (a) The directed edge ( r j , r k ) indicates that the order r k can be finished immediately after r j ; (b) the Hopcroft–Karp maximum-matching (red arrows); (c) the optimal delivery plans r 1 r 4 and r 2 r 3 r 5 .
Figure 2. An illustration on how CSN works. (a) The directed edge ( r j , r k ) indicates that the order r k can be finished immediately after r j ; (b) the Hopcroft–Karp maximum-matching (red arrows); (c) the optimal delivery plans r 1 r 4 and r 2 r 3 r 5 .
Applsci 10 07431 g002
Figure 3. Order service rates of algorithms.
Figure 3. Order service rates of algorithms.
Applsci 10 07431 g003
Table 1. Useful notations.
Table 1. Useful notations.
NotationDescription
A = { a 1 , a 2 , , a n } the set of n couriers available for food delivery services
V = { v 1 , v 2 , , v m } the set of m regions of a city
R = { r 1 , r 2 , , r l } the set of l customer orders need in service
[ t j e , t j l ] [ 1 , T ] the time window of the order r j
v j p the pickup region of the order r j
v j d the drop-off region of the order r j
τ j k the time distance of traveling from the drop-off region of r j to the pickup region of r k and delivering r k to its drop-off region
Table 2. OSR and running time on small-scale instances. To make the table clear, we omit the statistical errors, and each cell is statistically significant at a 95% confidence level.
Table 2. OSR and running time on small-scale instances. To make the table clear, we omit the statistical errors, and each cell is statistically significant at a 95% confidence level.
Time WindowDemandOrder Service Rate (OSR)Runtime (Second)
IPoptIte-DSR-FleGreedyIPoptIte-DSR-FleGreedy
One periodLow0.5280.5020.45926.40.210.05
Medium0.4710.4510.40544.40.340.07
High0.4510.4350.38560.10.440.09
Three periodsLow0.5300.5060.47327.80.300.06
Medium0.5140.4870.43743.80.550.07
High0.4810.4540.38963.40.640.07
Five periodsLow0.5760.5430.48833.00.450.07
Medium0.5340.5000.44254.00.900.07
High0.5290.4840.43380.41.070.08
Table 3. Order Service Rate (OSR) and running time on large-scale instances. To make the table clear, we omit the statistical errors, and each cell is statistically significant at a 95% confidence level.
Table 3. Order Service Rate (OSR) and running time on large-scale instances. To make the table clear, we omit the statistical errors, and each cell is statistically significant at a 95% confidence level.
DemandOrder Service Rate (OSR)Runtime (Second)
DSS-FleIte-DSS-FixIte-DSR-FleDSR-FixDSS-FleIte-DSS-FixIte-DSR-FleDSR-Fix
20000.5720.5540.5630.5443.200.383.020.36
40000.3260.3070.3130.30218.41.8316.21.33
60000.2390.2220.2270.21944.64.0143.93.67
80000.1960.1840.1890.18095.49.4875.16.78
10,0000.1720.1590.1630.155134.619.73124.512.9
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Wang, W.; Tao, H.; Jiang, Y. Efficient Delivery Services Sharing with Time Windows. Appl. Sci. 2020, 10, 7431. https://doi.org/10.3390/app10217431

AMA Style

Wang W, Tao H, Jiang Y. Efficient Delivery Services Sharing with Time Windows. Applied Sciences. 2020; 10(21):7431. https://doi.org/10.3390/app10217431

Chicago/Turabian Style

Wang, Wanyuan, Hansi Tao, and Yichuan Jiang. 2020. "Efficient Delivery Services Sharing with Time Windows" Applied Sciences 10, no. 21: 7431. https://doi.org/10.3390/app10217431

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop