Research Article | Open Access
Ridesharing Problem with Flexible Pickup and Delivery Locations for App-Based Transportation Service: Mathematical Modeling and Decomposition Methods
App-based transportation service system, such as Uber and Didi, has brought a new transportation mode to users, who are able to make reservations using mobile apps conveniently. However, one of the fundamental challenges in app-based transportation system is the inefficiency and unreliability of the vehicle routing plans caused by complex topology of urban road network and unpredictable traffic conditions. A common way to tackle this problem is repositioning pickup or delivery locations via the coordination between drivers and passengers. This paper studies an on-demand ridesharing problem that determines the optimal ride-share matching strategy and vehicle routing plan with respect to flexible pickup and delivery locations. By introducing the concept of space-time windows, the problem is formulated as the pickup and delivery problem with space-time windows (PDPSW) in space-time network. To solve the model efficiently and accurately, we particularly develop a customized solution approach based on Lagrangian relaxation. Numerical examples are conducted to demonstrate the performance of the proposed framework and draw some managerial insights into the optimal system operation. The results indicate that adopting the serving strategy of flexible pickup and delivery locations will evidently reduce the system cost and improve the service quality in app-based transportation service systems.
With the constant growth of urban size and population, private car use has increased rapidly for its convenience, flexibility, and comfort, which yet causes a series of traffic and environment issues, such as congestion, parking shortage, energy overconsumption, and air pollution. The app-based transportation network and taxi companies (TNC), such as Uber, Lyft, and Didi, have rapidly developed to provide the on-demand ridesharing service that achieves the balance of transport mobility and social benefit. For example, in 2017 the number of Uber user reservations has reached 40 million per month and Uber’s share of the United States ride hailing market is 77% (http://www.businessofapps.com/data/uber-statistics/). In China, the number of TNC users is more than 150 million, accounting for 22.3% of the netizens.
Different from the conventional taxi companies, TNC is able to collect passengers’ reservations through smartphone apps and quickly extract the detailed travel information, such as the origin and destination locations and the corresponding departure and arrival time windows. The request information is then converted into some task lists involving the specific service schedules (i.e., visiting times and locations) and routing path, which is then performed by a fleet of vehicles. This new technology brings great convenience to passengers but may incur a series of fleet management issues due to the complex topology of urban road network and unpredictable traffic conditions. Specifically, in some cases the pickup or delivery locations of passengers may be spatially nearby but topologically inaccessible or even temporally unreachable for vehicles. This will cause extra detours of vehicles or long-time waiting, which will apparently impact the efficiency of the operation system and reduce the service quality.
In practice, one intuitive way to tackle this problem is repositioning pickup or delivery locations. In practice, the spatial accessibility and flexibility of passengers are much higher than that of vehicles within some local intersections or road segments. Such as shown in Figure 1(a), location 1 (the crossing of 168th St. and 88th Ave.) is the origin of passenger as requested. Since the 168th St. is one-way to north, the vehicle has to take a long detour to pick up the passenger, which is shown as blue dashed line. Alternatively, the driver will first coordinate the detailed pickup location with the passenger after receiving the task schedule and sometimes may reposition it to a new location that is easier to access. For example, the passenger could be asked to walk a short distance (shown as the green chain line) to the major road and then picked up at location 2. Furthermore, to deliver the passenger to the opposite side of S Halsted St., which is shown as location 3 in Figure 1(b), the passenger could be first dropped at location 4 and then walk to location 3 by crossing the crosswalk or overpass. Otherwise, the vehicle has to turn around at the crossing of S Halsted St. and W Harrison St. and then take another U turn back to north. Since mainly based on the drivers’ personal experience and not involved in the whole system plan, such rescheduling operations are usually unreliable and may seriously disturb the task schedules. This is also one of the main limitations of the optimized vehicle routing planning in practical applications.
From the system-wide operation perspective, slightly repositioning the pickup and delivery locations of passengers will somehow reduce the vehicle traveling cost and avoid the risks of unexpected transportation delays. Besides, properly adjusting the relative positions of these locations may also increase the matching rate between vehicles and passengers. In the best cases, passengers could be gathered to the same pickup or delivery location and simultaneously served by one vehicle. Therefore, a reliable and flexible vehicle routing strategy for on-demand ridesharing service system is expected to balance the service quality and system cost considering the network complexity and operational dynamics.
Nevertheless, existing studies about the on-demand ridesharing problem with flexible pickup and delivery locations are very few. Different from the ridesharing problem with respect to developing the carpooling matching strategy, the on-demand ridesharing problem is also known in the literature as pickup and delivery problem with time windows (PDPTW), which is a much more complicated problem due to the complex coupling constraints among the vehicle routing, passenger assigning, and vehicle capacity limitations. On the other hand, the concept of flexible serving strategies is mostly introduced to classify and cluster the passengers in matching procedure of carpooling problems. To best of our knowledge, only a few of recent studies have made the attempt to integrate the ride-share matching strategy and vehicle dispatching plan with flexible pickup and delivery locations for the on-demand ridesharing systems.
To bridge the research gap, this paper aims to develop a mathematical model for the on-demand ridesharing operations with flexible pickup and delivery locations. By employing the space-time presentation and the concept of space-time window, the problem is further formulated as the pickup and delivery problem with space-time windows (PDPSW). By this, an integer linear programming (ILP) model is further proposed to simultaneously determine the optimal number of dispatched vehicles, routing plan, and detailed serving strategy, so as to minimize the fixed operation cost, vehicle traveling cost, and passengers’ inconvenience cost with respect to the space-time flow balance constraints, passenger serving constraints, and vehicle capacity constraints.
Considering the complexity of the model, we present a customized solution approach based on Lagrangian relaxation (LR) algorithm. Specifically, we dualize two set of coupling constraints to separate two parts of the problem, i.e., the ride-share matching strategy and vehicle routing operation, by introducing different Lagrangian multipliers. The relaxed model is then decomposed into two sets of subproblems that can be seen as knapsack problem and shortest path problem, respectively. To efficiently obtain a feasible solution adapting from the relaxed solution, a hybrid method is specially developed based on greedy algorithm and dynamic programming (DP). Eventually, a subgradient search is adopted to iteratively update the feasible and relaxed solutions to an acceptable tolerance of optimality gap. The performance of the LR based solution algorithm is then demonstrated through a multiscale experience comparing with that of CPLEX, a widely used commercial solver. Besides, we can also see from the sensitivity result that adopting the operation strategy of flexible pickup and delivery locations significantly reduces the system cost and yet guarantees the service quality.
2. Literature Review
Ridesharing has been widely studied ever since the 1970s, when carpooling attracted more and more attention for its energy efficiency and environmental protection. Particularly in recent years, the considerable improvement of communication capabilities and e-payment allow for a more accessible and secure online ridesharing service provide by TNCs. A systematic review can be seen in Furuhata et al. , where a classification is provided to better understand the existing ridesharing systems. Some key challenges are also introduced in this paper to clarify the development of the area of ridesharing problem and indicate the directions of future studies.
Mathematically, the ridesharing problem can be formulated as the PDPTW, or more specifically, the Dial-A-Ride Problem (DARP) when transporting passengers. As a generalized version of the vehicle routing problem (VRP), the PDPTW aims at determining the optimal routs of vehicles to satisfy the requests of pickup and delivery under the limitation of vehicle capacities, corresponding time windows, and coupling constraints (Savelsbergh and Sol , Berbeglia et al. , and Dumas et al. ). Since the VRP is a NP-hard problem, the PDPTW is also NP-hard and more difficult to solve. Therefore, there are number of studies focusing on developing efficient solution algorithms. Studies such as Ropke and Pisinger , Li and Lim , Baldacci et al. , Hosni et al. , Küçükoğlu and Öztürk , Hu and Chang , and Mahmoudi and Zhou  all consider the general PDPTW and provide customized heuristic or exact solution approach to efficiently solve certain scales of the problem. Hosni et al.  formulated the shared-taxi problem into a mixed interprogram, in which an optimized taxi dispatching strategy is designed to assign the passengers’ reservations to a fleet of taxis with optimal routing plans. Furthermore, a LR based solution approach was presented to solve the problem efficiently with relatively small gaps comparing with CPLEX. Despite using the similar algorithmic framework, Mahmoudi and Zhou  decomposed the primal problem, which is simplified by adopting the state-space-time network representation, into a series of single PDPTWs. This allows a forward DP solution algorithm to solve the subproblems efficiently and accurately. Furthermore, a serious of numerical studies were conducted to demonstrate the performance of the proposed solution algorithm in solving the on-demand ridesharing problem in large-scales.
On the other hand, many studies have been conducted on ride-share matching problem that specially aims to improve the matching rate between vehicles and passengers or satisfy the passengers’ reservations with the minimum fleet size (Brownstone and Golob , Ferrari et al. , Herbawi and Weber , Xu et al. , Pelzer et al. , Stiglic et al. , and Masoud and Jayakrishnan ). Herbawi and Weber  considered the ride matching problem with time windows, which optimizes the assignments of passengers to vehicles with respect to the serving order and detailed visiting times of passengers’ pickup and delivery locations. A genetic and insertion based heuristic algorithm was further proposed and applied in real-time ride matching and iteratively improves the solution quality according to the realistic data. Stiglic et al.  introduced the concept of “meeting point” to increase flexibility of pickup and delivery points of passengers. Then a customized algorithm was designed and implemented to optimally match the vehicles and passengers in large-scale ridesharing system. The proposed modeling framework was further performed in a simulation study to show the benefits of adopting meeting point strategy in ridesharing systems. It is worth noting that Tong et al.  developed a joint optimization model to integrate the passenger-to-vehicle assignment plan and the bus routing schedule design for the customized bus service system. Based on the space-time network modeling framework, they formulated the proposed problem into a multicommodity network flow-based optimization model. To improve the performance of the proposed algorithm in solving large-scale instances of the problem, an LR based algorithm framework was employed to first reduce the solution space and then decomposed the problem into two sets of subproblems. Besides, two numerical experiences are performed to present the performance of the developed model and algorithm.
The rest of this paper is organized as follows. Section 3 presents the detail of the PDPSW that is further formulated into an integer programming model. Then the LR based solution algorithm is developed in Section 4. Section 5 presents a series of numerical experiments to demonstrate the performance of the proposed solution approach and discuss the experiment results in the system operation strategy perspective. Section 6 concludes this paper and offers some future research directions.
3. Problem Formulation
The framework of the proposed on-demand ridesharing operations is shown in Figure 2. The application of mobile Internet and apps allow the TNCs to collect the travel plans from user reservations, which involve the detailed location and corresponding picking up and delivery time windows. According to these pieces of information, the walk-in catchment area by each timestamp in the relevant time windows can be obtained with respect to the topological structure of urban network. Then, based on the practical traffic conditions and regulations, the potential pickup/delivery locations are further selected within these areas. Here, we define the space-time window as the set that contains all the potential locations at timestamps of the relevant time window. We consider that all the location-time pairs included in the space-time windows can be potentially selected to serve passengers. Therefore, the detailed vehicle-passenger assignment and vehicle routing plans, which involve the exact pickup and delivery locations and times of each passenger, will be determined by the modeling and decomposition method proposed in our study.
Furthermore, the detailed vehicle dispatching strategies will be sent to the corresponding vehicles in the form of task schedules and recommended routs, while sent to the passengers in the form of serving plans through the app, which involve the detailed pickup and delivery locations and times.
In contrast to the PDPTW, the extension on spatial dimension is considered in this study to further enhance the efficiency and reliability of the on-demand ridesharing system. To solve the on-demand ridesharing problem with flexible pickup and delivery locations, the specified serving plan is expected with respect to the dynamic spatiotemporal reservations from passengers, limited vehicle capacity, and minimum system cost. Therefore, we can see that the on-demand ridesharing system proposed in our study is essentially generalized to the flexible transit systems with virtual stops since the former one aims to provide a more flexible dispatching strategy to ensure the efficiency of the operation system with respect to the complex topology of urban road network and unpredictable traffic conditions. Nevertheless, in some cases, passengers whose space-time windows (partly) overlap each other could be gathered to the same pickup or delivery location and simultaneously served by one vehicle, which is a more general version comparing with the process of classifying and clustering the passengers in matching procedure of flexible transit systems.
Therefore, a completely new aspect is to simultaneously determine the optimal locations and times for picking up or delivering each passenger, which leads to obviously more complex formulations with respect to the passenger serving and vehicle dispatching plans. The adoption of space-time network enables the physical transportation network to integrate the vehicles’ space-time trajectories and passengers’ potential space-time distribution. In this regard, comparing with some classical modeling methods for solving Dial-A-Ride Problem (DRAP) (such as Baldacci et al. , Hosni et al. , and Hu and Chang ), our formulation provides a more explicit and compact modeling structure to represent the passengers serving and vehicle dispatching plans without adding the extra constraints, such as the subtour elimination constraints, temporal constraints, and coupling constraints between space and time related variables. This allows the development of a computationally efficient Lagrangian relaxation solution approach that can solve the PDPSW to near-optimum solutions.
In this section, we first introduce the PDPSW in Section 3.1. Then a systematical introduction of the PDPSW modeling framework with respect to the space-time network representation is present in Section 3.2. Eventually, Section 3.3 presents the model formulation of the PDPSW.
3.1. Description of PDPSW
We initially consider a directed transportation network denoted by , where (indexed by and ) denotes the set of spatial nodes (such as the intersections in road network) and (indexed by ) is the set of links representing the road segments. Let sequential set denote the time horizon of the considered operation cycle, where is the initial timestamp and stands for the unit intervals between each two adjacent timestamps. Note that the time horizon in this study is assumed to be properly discretized so that all the activities, such as the trips of passengers or vehicles, can be considered starting at any timestamp and complete within integer multiples of . Figure 3 illustrates a grid network that denotes the transportation network and we assume that the time horizon is [1, 16] and the unit interval . Each reservation of passenger is associated with the origin and destination, which are denoted by and of passenger , respectively. We can see in Figure 3 that nodes and (marked as red dots), respectively, denote the origins of passengers 1 and 2, while and (marked as dark blue dots), respectively, represent the destination nodes of passenger 1 and 2. As shown in Figure 3, we choose nodes that are topologically adjacent to as the expanded pickup nodes. Correspondingly, nodes are selected as the expanded delivery nodes with respect to . Then we define the set that consists nodes as the pickup space window of passenger and denoted by , while is defined as the delivery space window and denoted by . In PDPSW, passengers are supported to be picked up (or delivered) at any nodes within the corresponding pickup (or delivery) space windows. That is, within a predefined maximum walking distance, a passenger can be served at origin nodes or the nodes nearby. Moreover, each reservation of passengers also contains a pair of preferred pickup and delivery time windows with respect to the origin and destination nodes, which are denoted by sequential sets and . As shown in Figure 3, the pickup time windows of passenger 1 and 2 are, respectively, set as [1, 3] and [3, 5], while the delivery time windows are [10, 12] and [13, 15].
After receiving the passengers’ reservations, a certain number of vehicles (denoted by and indexed by ) are sent out to pick up the passengers from one of their candidate pickup nodes within the related pickup time window and then deliver them to one of their candidate delivery nodes within the related delivery time window . Note that, in the PDPSW, passengers are supported to share their ride with the others, which means that vehicles can simultaneously serve multiple passengers during the operation cycle under the limitation of vehicle capacity ().
3.2. Space-Time Network Representation
Space-time network is able to explicitly depict and rigorously formulate the spatiotemporal movement of commodities with compact model formulations, and it has been widely used in many transportation modeling studies (Kliewer et al. , Yang and Zhou , Tong et al. , Zhen and Jing , Li et al. , and Zhang et al. ). Since the PDPSW is essentially the generalization of PDPTW and aims to simultaneously determine the ride-share matching strategy and routing schedules of vehicles within the space-time dimension, we can formulate the PDPSW by using the space-time network representation.
In particular, a space-time network can be obtained by extending the space network on the time horizon. An illustration example can be seen in Figure 4, where grid network in Figure 3 is partly shown as the x-y plane. Time horizon is shown as t-axis vertical on the x-y plane. Let set denote the space-time network, where (indexed by ) is the set of space-time vertexes and (indexed by ) is the set of space-time arcs. Based on the space-time network, we can intuitively present the passengers’ reservations by combining the space window and time window. Specifically, we denote the pickup and delivery space-time windows of passenger by set and , which are shown as red and blue polygons in Figure 4. Each space-time window contains all the candidate pickup or delivery space-time vertexes. Considering the duration of time that passengers spend to walk from the origin to the extended pickup nodes, there is only the origin vertex at the earliest timestamp in the pickup time window. As shown in Figure 4, the red dots represent the origin vertexes of passengers. To simplify the illustration, we here assume that it takes passengers one time interval from origin node to all the adjacent pickup nodes. Hence there are five potential pickup vertexes from the second to the last timestamps in the pickup time window (marked as orange and yellow dots). Similarly, there is only the destination vertex (marked as dark blue dotes) at the latest timestamp in delivery time window and five potential pickup vertexes from the earliest to the second last timestamps in the delivery time window.
To serve passengers 1 and 2, vehicle () is sent out to travel according to a feasible routing plan, which is denoted by the space-time path marked as the green line in Figure 4. We can see that initially picks up passengers 1 and 2 at space-time vertexes () and () and then delivers passenger 1 when passing () and eventually delivers passenger 2 at ().
3.3. Model Formulations
Based on the constructed space-time network, an ILP model is roughly formulated in this section. The following assumptions are initially proposed to focus the model on the essence of PDPSW.
Demand. All passengers’ reservations are considered to be dynamic and deterministic. That is, all the reservations are given before the operation cycle and cannot be canceled or delayed. In this sense, the detailed serving schedule of vehicles can be obtained based on the serving requests, i.e., the pickup and delivery space-time windows in the formulation.
Space-Time Window. We assume that the pickup and delivery requests of all the passengers are executable. It means that, for each passenger, the time intervals between pickup and delivery space-time windows shall be no less than the vehicle’s shortest traveling time along the fastest routing between the closet pickup and delivery nodes.
Vehicle. To simplify the problem without generalization, the vehicles are assumed to be identical; i.e., they have the same capacity and no passengers is onboard at the beginning and ending of the operation cycle.
Besides, for reader’s convenience, the major notations of sets, parameters, and decision variables related to the model formulation are listed below.
Sets and Parameters : set of space-time arcs in the space-time network, indexed by : set of vehicles, indexed by : set of spatial transportation nodes, indexed by and : pickup space window of passenger : delivery space window of passenger : set of passengers, indexed by passenger : set of passengers whose departure time window contains timestamp : set of passengers whose arrival time window contains timestamp : set of timestamps in the considered operation cycle, indexed by and : pickup time window of passenger : delivery time window of passenger : pickup space-time window of passenger : delivery space-time window of passenger : capacity of a vehicle : fixed cost of dispatching a vehicle : vehicle traveling cost through link : inconvenience costs for picking up passenger at pickup node : inconvenience costs for delivering passenger at delivery node
Decision Variables : whether vehicle drops off passenger at space-time vertex : whether vehicle travels through space-time arc : whether vehicle is used : whether vehicle picks up passenger at space-time vertex
Based on the above assumptions, the mathematical model for PDPSW is formulated as follows. We first propose a series of systemic constraints, such as the space-time flow balance constraints, passenger serving constraints, and vehicle capacity constraints. Then, the objective function, which is essentially a summation of all cost components, is further developed.
Space-Time Flow Balance Constraints. To precisely capture the space-time path of each vehicle, we initially introduce the space-time flow balance constraints:where binary variables and determine the space-time path of vehicles and the selection of vehicles, respectively. Specifically, if and only if space-time arc is involved in the space-time path of vehicle and if and only if vehicle is dispatched to serve passengers. Note that space-time vertexes and are defined as the dummy origin and destination vertexes of all the vehicles, respectively. We assume that the distance and travel time from dummy origin to any physical space-time vertex are 0 and infinity the other way round, while those from physical space-time vertexes to dummy destination are 0 and also infinity the other way round.
Passenger Serving Constraints. For any TNC, fulfilling all the reservations of the passengers is actually critical for guaranteeing the serving quality. Therefore, we assume that the proposed PDPSW formulation is based on the undersaturated condition. That is, the total fleet size is assumed to be sufficient for serving all the passengers. We define binary variables and to denote the passenger serving plan, i.e., if and only if vehicle picks up passenger at pickup space-time vertex and if and only if vehicle deliver passenger at delivery space-time vertex . Thus, the following constraints are proposed to guarantee that all the passengers’ reservations are fulfilled:where constraints ensure that each passenger is picked up by a vehicle and constraints impose that passenger is delivered by vehicle if is previously picked up by it.
Moreover, constraints and are proposed to build the relationship between the vehicle routing plan and passenger serving strategy.
In particular, constraints indicate that passenger is picked up by from space-time vertex if and only if is visited by , while constraints require that vehicle delivers passenger to space-time vertex if and only if is involved in the routing path of .
Remark 1. Note that to ensure the service quality, which is regarded as the highest priority of most TNCs, all the reservations of passengers are required to be satisfied and thus the fleet size is assumed to be sufficient though only part of them is eventually sent out with respect to the optimized vehicle dispatching strategy. In practice, the fleet size will be set the same as the number of reservations (shown as Section 5). Then during the iteration of our LR algorithm (see Section 4 for details), part of the vehicles will be saved as the optimization result of vehicle-passenger assignment plan and vehicle routing plan. Even though we do acknowledge that, with limited vehicles (especially the total number of vehicles is less than the number of passengers’ reservations), it may be difficult to find feasible solutions in PDPSW with respect to the passengers fulfilling constraints.
Vehicle Capacity Constraints. Different from carpooling or customized vanpooling service design, the on-demand ridesharing system allows vehicles to pick up and deliver passengers at any time and the seats are not fixed to any specific passenger during the operation cycle. Therefore, for each vehicle, the capacity constraints are needed at each timestamp; i.e.,where denotes the set of passengers whose departure time window contains timestamp , while denotes the set of passengers whose arrival time window contains timestamp . Then we can see that denotes the number of passengers that are picked up by vehicle by the time of , while is the number of passengers that are delivered by vehicle by the time of . The difference between them is the number of passengers on board by the time of , which shall be no bigger than .
Besides, the following constraints are further added to postulate binary variable values.
Objective Function. The objective of PDPSW is to determine the optimal ride-share matching strategy and vehicle routing plan to balance the total system cost and serving quality. In our study, the objective function contains three parts. The first part is the fixed cost for dispatching vehicles. It can be considered as a summation of amortized cost of vehicles and hiring cost of drivers per operation cycle; i.e.,where denotes the fixed cost of dispatching a vehicle. The second part refers to the vehicle routing cost; i.e., where represents the vehicle traveling cost through link .
The last part is the passenger inconvenience cost; i.e.,where is the inconvenience cost for picking up passenger at pickup node , while denotes the inconvenience cost for delivering passenger at delivery node . Note that CP essentially indicates the cost of poor service quality. In PDPSW, though all the passengers are served within the corresponding space-time windows, it yet causes the decline of service level if passengers are not picked up or delivered passengers at the origin pickup or delivery space-time vertexes. An example can be seen in Figure 4, the service of picking up passengers 1 and 2, and delivering passenger 1 will all incur the passenger inconvenience cost, while delivering passenger 2 will not cause such cost since he/she is delivered right at the origin delivery space-time vertex ().
Note that CF, CT, and CP are all determined by the vehicle-passenger assignment and vehicle routing plans, so these cost components shall generally exhibit the following tradeoffs. Increasing the vehicle dispatching cost shall bring down the number of vehicles dispatched to serve passengers but increase the vehicle routing cost and passenger inconvenience cost. The higher inconvenience cost, which though raises the service quality, will force the vehicles to pick up and deliver the passengers at the origin and destination as early as possible. This will somehow decrease the matching rate between passengers and vehicles. Thus, more vehicles will be required to fulfill the passengers with extra detour, which eventually raises the vehicle dispatching and routing costs. In order to quantitatively solve the PDPSTW, the following integer programming model is formulated:
4. Lagrangian Relaxation-Based Solution Approach
The PDPSW proposed in Section 3.3 is a NP-hard problem since PDPTW is essentially its special case, let alone the two sets of coupling constraints (16) and (17). Therefore, for relatively large-scale instances, it is difficult to solve the model to optimum using commercial integer programming solvers (e.g., CPLEX) or exact solution approaches (e.g., branch and bound). To tackle this challenge, a customized solution approach based on LR is proposed to solve the problem efficiently with a near-optimum solution.
In the following content, Section 4.1 proposes a LR based decomposing approach to obtain the lower bound to the optimal value of primal problem (14)–(24). Basically, by relaxing hard constraints (16) and (17), we decompose the problem into two sets of subproblems that can be easily solved. However, since the relaxed solution is likely infeasible to the primal problem, yet acting as the lower bound, a DP based hybrid method is developed in Section 4.2 to adjust the relaxed solution into a feasible solution to the primal problem. Finally, a subgradient algorithm is employed in Section 4.3 to iteratively update the upper and lower bounds to obtain a near-optimum solution with an applicable optimality gap.
4.1. Model Decomposition
To relax constraints (16) and (17), we add the product of the left-hand side of them into objective function (14) with multipliers and , respectively. The primal problem (14)–(24) is then relaxed as the following formulation:subject to constraints (15) and (18)–(24).
Note that since the coupling constrains (16) and (17) are relaxed, variables and are separated from and , which means that the vehicles’ routing plans are released from the passengers serving strategies. Then the relaxed problem is decomposed into two sets of subproblems.
Subproblem 2 (shortest path problem). The first set contains subproblems associated with variables and :subject to (15), (21) and (22).
We can see that objective function (26) involves two parts with respect to variables and , respectively. The first part is the vehicle dispatching cost that consists of vehicles amortized cost and driver hiring cost. It is determined by variables Y and fixed for each vehicle . The second part represents the generalized vehicle traveling cost related to the traveling path of vehicles in the space-time network and determined by variables . Since Subproblem 2 only subjects to the space-time flow balance and binary constraints, the second part can be easily regarded as a time-dependent shortest path problem that can be solved to the optimum using some exact solution approach, such as forward DP, label setting, and label correcting (Mahmoudi and Zhou , Yin et al. , and Yang and Zhou ). In specific, we set the generalized vehicle traveling cost aswhere andwhen vehicle travels through space-time arc . Then an optimal solution approach based on DP is developed and described in Algorithm 1. Note that the algorithm is very efficient and takes a time complexity of .
Subproblem 3 (Knapsack problem). Subproblem 3 only includes one subproblem with respect to variables and , given assubject to (18)–(20), (23) and (24).
Note that Subproblem 3 can be regarded as a knapsack problem with item dependency constraints. That is, if we select an item from a subset, then another item must also be taken from a corresponding subset to the former one. More specifically, in Subproblem 3, one passenger must be delivered within the corresponding delivery space-time window by the vehicle that has already picked him/her up within his/her pickup space-time window. The major objective is to optimize the ride-share matching strategy, which involves the pickup and delivery plans of passengers for each vehicle, to satisfy all the passengers’ reservations with the minimum generalized serving cost. Note that the generalized pickup inconvenience cost of passenger is actually the summation of and corresponding multipliers , while the generalized delivery inconvenience cost is the summation of and multipliers . Note that the structure of Subproblem 3 is simple enough with relative fewer variables to be solved efficiently by an integer solver (such as CPLEX) calling the branch-and-bound algorithm.
Furthermore, we can further obtain the optimal objective value of relaxed problem (25) by plugging the relaxed solution of , , , and (respectively, denoted by , , , and ) into the following expression:
Note that the value of can serve as the lower bound of the optimal value of the primal problem according to the duality property of LR (see Geoffrion ).
4.2. Hybrid Method Based on Greedy Algorithm and Dynamic Programming
For one set of given and , if the relaxed solution of variables is found to be feasible to primal problem (14)–(24), then it is also the optimal solution. Otherwise, we have to use certain algorithms to construct a feasible solution based on the current relaxed solution. It is also a typical method adopted in many studies, such as Li and Ouyang , Marín , An et al. , Fu and Diabat , and Chen et al. .
One intuitive way to modify the relaxed solution is keeping the values of and , i.e., the assignments of passengers’ reservations to vehicles, and then adjust the values of and to reform the space-time trajectories of vehicles and fulfill the reservations by covering their corresponding pickup and delivery space-time vertexes. However, though the values of and are subject to the passenger serving constraints and vehicle capacity constraints, the assignment plans may be still impossible to complete since the space-time flow balance constraints are not taken into consideration. An illustrative example is shown in Figure 5, where three reserved trips are assigned to vehicle according to the value of and . Assuming the capacity of as , we can see that only part of the reservations can be fulfilled by itself since it is obviously unrealistic to pick up passengers 1 and 3 from two different location at the same time. That is, we cannot obtain a practical routing strategy for based on the current assignment plan.
Therefore, to guarantee the efficiency of solution approach for the on-demand ridesharing system, we here particularly develop a three-phase hybrid method that can provide the good-quality feasible solutions of , , , and (respectively, denoted by , , , and ) adapted from and . Specifically, the first step of the hybrid solution (termed as screening procedure) is to screen the task schedule of and get rid of the vertexes that cannot be practically visited. Here we adopt the greedy algorithm to adjust the previous vehicle routing plan obtained from the values of and .
Specifically, to gradually capture the iteration process of the screening procedure, we define two lists: the vehicle tasks list (denoted as ()) and the passengers reassigning list (denoted as ). For example, in Figure 6 is a list that records the pickup and delivery space-time vertexes to be visited by . The two columns of , respectively, record the visiting nodes and times of the space-time vertexes and all the items are sorted in ascending order of their corresponding visiting times. Afterwards, we screen list to eliminate the space-time vertexes that cannot be visited on time. Specifically, if node is assumed as the first node visited by vehicle , then the next node can be visited on time if and only ifwhere , , and , respectively, represent the visiting time of node and and the least traveling time between and . Note that since the travel time between two adjacent nodes (say and ) can be easily obtained as , where , , and , respectively, denote the distance, travel time, and average speed through link . Then the least travel time between each two nodes in the transportation network can be further obtained by simply adopting a shortest path algorithm, such as Dijkstra’s, Floyd-Warshall, or label setting algorithm. Since this area, which has been well studied, is not a focus of this paper, we here simply assume that the travel times between nodes are fixed during the operation cycle and we adopt the label setting algorithm to generate the node travel time matrix. If (32) is not fulfilled, space-time vertex will not be visited on time and the reservation of corresponding passenger (=1) cannot be satisfied. Then we remove both the pickup and delivery space-time vertexes of from to and the index of passenger is also added to the third column of . As shown in Figure 6, we assume that =3 and ==1. We can see that space-time vertex (2,1) is the first vertex visited by and the following vertex (6,1) cannot be visited on time. Then vertexes (6,1) and (12,8) are both removed from to and passenger index 3 is added to the first two cells in third column of .
Afterwards, we turn to the next vertex in and repeat the screen process above until all the vertexes are checked. Eventually, the whole screening procedure is also performed for the other occupied vehicles that satisfies until all the tasks lists of these vehicles are screened. The detailed process is shown as Algorithm 2.
To fully satisfy the reservations of the passengers, the remaining passengers that recorded in shall be reassigned to some of the unoccupied vehicles, i.e., the vehicles satisfying (). This process is also termed as reassigning procedure and we here propose a greedy based implementing algorithm. Specifically, we initially generate the common tasks list (denoted by ) to record the all the pickup and delivery tasks obtained from . As shown in Figure 7, the first two columns contain the node and time to be visited. The third column records the indexes of the corresponding passengers to serve and the fourth one has the property tags representing the purpose of the tasks. Particularly, numbers 1 and 2, respectively, represent the pickup and delivery tasks. Similar to , all the space-time tasks in are sorted in ascending order of the visiting times Then, we screen list to select the tasks for with respect to the flow balance constraints and capacity constraints. For example, we assume that is the first space-time vertex visited by and the following one can also be visited on time if and only if (32) is satisfied. If so, the vehicle will first check if there are passengers to be delivered at this vertex. Note that all the delivered passengers are identified as fully served, so the corresponding tasks will also be removed from to . Then, if there are also some passengers to be picked up, it is necessary to first make sure if there are enough spare seats. If so, some of the passengers will be picked up under the capacity limitation. Afterwards, if the vehicle is full of passengers, it will directly head to the closest passenger delivery vertex; otherwise, it will turn to the next vertex and repeat the serving process above. Such as the illustration example in Figure 7, where we set and vertex (6,1) is the first vertex to visit as shown in . Since we assume that reservations of all the passengers are executable, vertex (12,8) can also be visited by . Then passenger 3 is firstly dropped off at this vertex and the corresponding tasks are removed from to . Since there are two spare seats left, only two passengers (say passenger 4 and 5) can be picked up. Afterwards, can pick up no more passengers and have to directly drop off the passengers onboard. Note that the delivery space-time vertex of passenger 4 (i.e., (21,15)) shall be visited earlier than that of passenger 5 (i.e., (28,20)), so we here choose (21,15) as the next vertex to visit and the serving process are repeated as above. Then turn to the next vertex if is not full or turn to the earliest vertex to drop off the passengers onboard otherwise. The iteration is carried on until all the tasks in are screened. Eventually, this resign process will be repeated for some other unoccupied vehicles until all the user trips are fully covered, i.e., . The detailed process of resign procedure is shown as Algorithm 3.
Finally, a DP based algorithm similar to Algorithm 1 is further developed to generate and based on the value of and , which is termed as routing procedure. In specific, we first calculate the generalized vehicle traveling cost for on space-time arc (denoted by ) aswhere is a very large positive value. Then for each vehicle, steps in algorithm 1 are called repeatedly to make the routing schedule that covers all the serving tasks with the least traveling cost. The specific process is presented as Algorithm 4. The DP based implementing algorithm takes a solution time of , which is efficient and dominates the total computational time of the hybrid method.