Quick viewing(Text Mode)

A Multi-Objective Optimization Framework for Online Ridesharing Systems*

A Multi-Objective Optimization Framework for Online Ridesharing Systems*

A multi-objective optimization framework for online ridesharing systems*

Hamed Javidi Dan Simon Ling Zhu Yan Wang Dept. of Electrical Engineering Dept. of Electrical Engineering Ford Motor Company Ford Motor Company and Computer Science and Computer Science Ann Arbor, USA Cleveland, USA Cleveland State University Cleveland State University Email: [email protected] Email: [email protected] Cleveland, USA Cleveland, USA Email: [email protected] Email: [email protected]

Abstract—The ultimate goal of ridesharing systems is to match appear later. In dynamic ridesharing, however, they can appear travelers who do not have a vehicle with those travelers who after the beginning of the time period. In other words, in static want to share their vehicle. A good match can be found among ridesharing all drivers and all riders and all corresponding those who have similar itineraries and time schedules. In this way each rider can be served without any delay and also each data, including departure and arrival locations, and pickup and driver can earn as much as possible without having too much drop off times, are known at the beginning of the time period. deviation from their original route. We propose an In dynamic ridesharing new riders and drivers continuously that leverages biogeography-based optimization to solve a multi- appear to request rides and to provide transportation. objective optimization problem for online ridesharing. It is Static ridesharing is not realistic and cannot be used in a necessary to solve the ridesharing problem as a multi-objective problem since there are some important objectives that must be real-world application, so we focus on dynamic ridesharing. considered simultaneously. We test our algorithm by evaluating Due to the unpredictable nature of the problem, future driver performance on the Beijing ridesharing dataset. The simulation appearances and rider requests are unknown. results indicate that BBO provides competitive performance The ridesharing problem [1], [2] is related to the vehicle relative to state-of-the-art ridesharing optimization . [3] and multi-vehicle pickup and delivery problems Index Terms—Ridesharing, Carpooling, Multi-objective opti- [4], [5], in which customers request to be picked up from their mization, Trip , Real-time optimization, Biogeography- origins and dropped off at their destinations while satisfying based optimization vehicle capacity and time constraints. Effective and efficient optimization technology that matches drivers and riders is I.INTRODUCTION one of the necessary components for an optimized ridesharing system. There are some significant challenges in this problem, In recent years ridesharing systems have become extremely such as fast computation, scalability, seat utilization, and popular. They are becoming popular because commuters prefer quality of service (e.g., average trip delay). to find a more economical way to take their trips. Ridesharing There are multiple objectives in this problem. One objective provides an appropriate alternative for urban transportation is minimizing the distance traveled by each rider and each due to the potential benefits; e.g., decreased traffic congestion, driver. Another objective is minimizing the waiting time of the diminished fuel consumption, and reduced greenhouse gas riders before being picked up by a driver. Another objective emissions. Ridesharing could lead to more efficient use of is maximizing the total benefit obtained through successful empty car seats and could significantly alleviate some of the matches, which is defined based on the drivers’ preferred societal concerns about issues like traffic congestion and air mode of payment [6]. Another objective is matching rate, arXiv:2012.05046v1 [math.OC] 7 Dec 2020 pollution. i.e., maximizing the number of riders who can be picked up People who do not have a can be serviced by a vehicle that and delivered to their destination. In this paper, we mainly has a similar route and overlapping travel times, or by a vehicle focus on two important objectives that are well-known among that can reroute to match the passenger’s destination. There are researchers: matching rate and total travel distance. multiple types of ridesharing systems; e.g., taxi sharing, car There have been various approaches to solving the dy- sharing, courier services, scooter sharing, bike sharing. These namic ridesharing problem. In [7], a rolling horizon solution ridesharing and shuttle services reduce costs for the riders and is proposed. This approach periodically matches unmatched provides income for drivers. riders with drivers who have empty seats. At each iteration There are two categories of ridesharing: static and dynamic. of the rolling horizon, a matching problem is solved with In static ridesharing, all driver and rider requests are available an objective function aimed at minimizing the total travel at the beginning of the time period and no new riders or drivers distance and maximizing the matching rate. There are several This document is the results of the research project funded by Ford Motor approaches to determine the frequency of the iterations in a company. rolling horizon framework.The main two approaches include periodic optimization with a fixed time step, and event-driven (B) Proposing an efficient matching algorithm. We propose optimization, where an event can include the appearance of a quick and efficient matching algorithm based on an one or more new riders. Event-driven approaches are usually that can be used for dynamic used when systems are expected to respond quickly to an event ridesharing. in the environment while periodic optimization may imply (C) Implementing state-of-the-art papers. In order to longer response delay [8]. compare the performance of our algorithm with other The ridesharing problem is known to be a non-deterministic research, we implemented state-of-the-art optimization polynomial time (NP-hard) problem [9], [10]. That is, to find methods for the dynamic ridesharing problem. the optimal solution of the problem may require an enormous II.PROBLEM STATEMENT AND FORMULATION amount of computation time, depending on the problem size. Because of the nature of this problem, optimal solutions are In this section, we first define terms, including parameters unattainable in large-scale problems in a reasonable amount and variables, then we present the mathematical formulation of of time. There is a trade-off in this type of problem: optimal the proposed ride-sharing system and introduce the objective solution, or fast computation with near-optimal solution. A functions. near-optimal solution can be found with an online algorithm A. Definitions whose computation time is fairly low. Research has been done on both approaches to this problem. In some cases, it is im- Definition 1 (Route) Let G = (V,E) be a a graph of a road practical to generate optimal solutions within a given (usually network system, where V is the set of vertices representing small) time bound [10], [11]. Furthermore, for some cases, intersections and E is the set of edges representing streets. achieving a good feasible solution in a short time is more Each edge (u, v) ∈ E has a weight wuv indicating travel desirable than finding the optimal solution. Consequently, a distance along the street. A route is a set of connected edges, trade-off between optimality and computation time must be and its cost is the sum of the weights of all the edges in the considered. route. Early work on this problem focused on traditional integer Definition 2 (Rider) A rider wants to be matched with a programming approaches, which are limited to small scale driver who can meet the rider’s constraints. Each rider r begins problems; e.g., 8 drivers and 96 riders [12]–[14]. This method at origin ro and requests to be transported to destination rd by returns the optimal solution for the problem by searching all a driver. Each rider is associated with a time window (re, rl). possible states of the problem. However, the computation time The early time re is the earliest possible time the rider r can of such methods is too high so this method can be applied only be picked up, and the late time rl is the latest time that the to small problems. rider can be dropped off. Riders requests will appear in the ride-sharing system in real time. Heuristic approaches [7], [11], [21] have been proposed to Definition 3 (Driver) A driver can be assigned to riders solve the real-time taxi ridesharing problem. One approach is whose constraints match the driver’s constraints. D is a set to find a greedy solution, which assigns one rider request at a of drivers. Each driver d ∈ D begins its trip at its origin d time to the best available vehicle. Although these approaches o and ends at its destination d . Each driver has its own time are fast, the solution is not good enough. One of the most d constraint (d , d ): d ≤ d , where d is the earliest possible well-known algorithms that uses an approximation method e l e l e departure time from d and d is the latest possible arrival time to approach this problem is T-share [11]. They partitioned o l at d . Each d ∈ D has properties d , d , d , d , the Beijing road network using a grid and define a road d loc cap load speed d . Here, d ∈ V is the driver’s current location, which network node as an anchor point of each cell and then used sch loc is the current vertex of driver d; d is the maximum seat precomputed travel distances and travel times of the shortest cap capacity; d is the number of riders; d is the driver’s paths between each pair of cells. The strategy is greedy so load speed speed, which is assumed to be constant; and d is the trip it to find the best vehicle match in terms of minimized sch schedule of the driver d, which is defined below. travel distance for every rider’s request. Since this work uses Definition 4 (Query) A query is a rider’s request for a ride approximation in terms of time and distance it is not well- and is a tuple (r , r , r , r ), each of which are defined above. optimized. However, despite its drawbacks, since it does not o d e l r is the query’s timestamp indicating when the query was need to find the shortest path for every rider from an entire map r submitted. It is assumed that the request time r is equal to graph, it is very fast and can be used for online ridesharing. r r . In this paper, we propose an algorithm that leverages an e Definition 5 (Schedule) Each driver has its own schedule. evolutionary approach to search for the optimal solution to A schedule is a temporally ordered sequence of pickup and the ridesharing problem. Our contributions are as follows. delivery points corresponding to n queries. Note that schedules (A) Developing a simulator. We started our work using an dynamically change over time as riders appear. A driver can existing simulator called Cargo [15]. This simulator is have any number of riders up to its capacity. Each schedule designed for the taxi ridesharing problem. In order to dsch = (do, p1, p2, ..., pn, dd) is a sequence of points, where have a peer-to-peer ridesharing simulator we modified it do is the driver’s origin, and pk, (1 ≤ k ≤ n), is an origin from taxi-sharing to peer-to-peer ridesharing. or destination of a rider. dd is the driver’s destination. If a driver is assigned to a rider, the driver will move to ro to pick our problem is a minimization problem. α is a constant to up the rider, then to rd to drop off the rider. The first item in define the weight of each part of the objective function. each schedule is the driver’s origin, the last item is the driver’s α P|D| d (i) destination, and each rider’s origin and destination appear in Cost = i=1 dov + (1 − α)(1 − M ) (3) P|R| R the schedule such that ro precedes the corresponding rd. i=1 MSP(ro(i), rd(i)) Definition 6 (Minimal shortest path, MSP) Minimal C. Problem Formulation shortest path is a function that returns a set of edges that defines the shortest driving distance between a given pair of We define the ridesharing problem as follows. points. This definition can be extended to a schedule with more Definition 8 (Dynamic Ridesharing) Given a set of drivers than two points by concatenating the pair-wise MSPs in the D and a set of riders R on a road network, the dynamic order given in the schedule. ridesharing problem is the task of finding the optimal driver- Definition 7 (Distance overhead) Each driver d ∈ D rider combinations such that the user-defined combination of Equation 3 is minimized, subject to the following constraints. has an origin do and destination dd so its minimal shortest path (MSP) is defined based on the shortest path from do (A) Capacity constraint. The number of riders served by any to dd and its minimal schedule will be dsch = (do, dd). If driver d cannot exceed the corresponding maximum seat r ∈ R is served by d, the trip schedule must be changed capacity: such that dsch0 = (do, ro, rd, dd). The distance overhead ddov = dist(dsch0 ) − dist(dsch) is defined as the difference dload ≤ dcap ∀ d ∈ D (4) between the travel distance of the updated trip schedule and (B) Waiting time constraint. The time for the driver to pick the driver’s MSP. up the rider after receiving the request cannot be greater B. Objectives than the rider’s waiting time constraint: Various objectives have been used in the literature for the ridesharing problem. Ridesharing solutions usually rely on rl − MSP(ro, rd)rspeed ≥ 0 ∀ r ∈ R (5) single-objective optimization. In this work we aim to use a (C) Driver time constraint. Each driver has own destination multi-objective cost function. The computational time required dd as well as its own maximum arrival time dl, and this to update drivers’ schedules when rider requests appear should constraint must be satisfied when a rider is added to the be considered when evaluating a solution method, but this driver’s schedule. metric is unfortunately excluded by most previous research [16]. The performance metrics that have been used most III.RIDESHARING APPROACHES widely include the following. Proposed approaches for matching and routing in rideshar- Matching rate. The matching rate MR is defined as the ing problems are categorized in two classes: local optimization total number of riders in the matched rider set Rs (i.e., the and global optimization. number of riders who were matched with a driver to get a ride) divided by the total number of riders |R| who requested A. Local Optimization a ride. Providing ridesharing at a city scale is a complex problem. One major challenge is to develop a real-time matching |Rs| MR = (1) algorithm that can quickly determine the best driver to satisfy |R| incoming ride requests. Local optimization approaches use a Average distance overhead. This is the average distance local search algorithm in a first-come first-serve way to greatly overhead of all drivers. reduce the complexity of ridesharing optimization [11], [17]– [19]. The first request (the first r ∈ R) will be served by |D| X searching potential drivers that are feasible candidates for Dov = ddov(i) (2) giving a ride to the rider. Then, using a greedy approach, i=1 the driver candidate who has minimum distance overhead Average matching delay. This is the average time between ddov will be selected from among other candidates. These when a rider sends its ride request and when it gets matched. approaches usually provide a trip as quickly as possible but This factor quantifies how fast the solution method can find a riders would not mind having some delay if the ride offer match for a request. would be cheaper. Multi-objective cost function. As noted above, the Greedy approaches [10], [20], [22] find a driver d ∈ D who ridesharing problem can include various objectives. We define has a minimum ddov for each rider request. In other words, a multi-objective function to solve this problem. We want to they calculate the overhead distance between the driver’s define an objective function that satisfies the greatest possible current schedule and the new schedule, and put this cost in number of ride requests while minimizing the total distance a priority queue. The second step of these algorithms is the overhead. We define cost as a weighted combination of MR validation step, which checks that the constraints for the rider, and total distance overhead Dov. We define the cost so that the driver, and riders who are already assigned to the driver are satisfied. Greedy approaches use a first-come first-serve sharing features with each other to become more suitable (FCFS) method that only focuses on local optimization instead habitats until an acceptably suitable habitat is found, which of reducing the overall travel cost. represents an acceptable solution to the optimization problem. T-Share [11] is a that focuses on building BBO has two important stages, migration and mutation, which an efficient service system to quickly handle the incoming flow are based on the theory of biogeography. Algorithm 1 shows a of queries using local optimization. It reduces the problem size basic implementation of biogeography-based optimization. In and continuously re-optimizes the schedules. However, it only the mutation stage, the diversity among habitats is increased, focuses on local optimization instead of reducing the overall which may result in losing the best solution or finding a better travel cost. solution. To prevent losing the best solution in each iteration, Recently, Huang et al. [18] proposed a greedy algorithm there are some elites that preserve the current best solution for that uses a leveraging kinetic- structure that is designed the next generation. for efficient scheduling of dynamic requests and that adjusts routes on the fly. Algorithm 1: BBO algorithm The nearest neighbor (NN) algorithm [22] is a heuristic 1 Input: N ; greedy algorithm that uses Euclidean distance to match poten- 2 Initialize population of candidate solutions {xk} for tial drivers with riders. This algorithm is implemented using k ∈ [1,N]; a priority queue to rank drivers base on their distance from 3 while not termination criterion do the rider’s origin. This algorithm consists of two steps. In the 4 for each xk do first step, the nearest driver is selected based on the distance 5 Set emigration probability µk ∝ fitness of xk, between its current location and the rider’s location. In the with µk ∈ [0, 1]; second step, validation, the rider is inserted in the selected 6 for each individual xk do driver’s schedule if all constraints for the rider, the driver, and 7 Set immigration probability λk = 1 − µk; riders who are already assigned to this driver are satisfied. The 8 Sort initial solutions according to cost; first valid driver from the queue will be assigned to the rider. 9 Save best solutions as elites; The complexity of the NN algorithm is O(D log D) for D 10 zk ← xk; drivers. 11 for each individual zk do B. Global Optimization 12 for each solution feature s do 13 Use λk to probabilistically decide whether Approaches in this category are mainly based on two strate- to immigrate to zk; gies: approximation and heuristics. One algorithm, simulated 14 if immigration then annealing, has already been published, and another algorithm,  N 15 Use µ to probabilistically select BBO, is discussed in Section IV. i i=1 x (SA) is a heuristic approach that is emigrating individual j; 16 z (s) ← x (s) widely used for complicated combinatorial optimization prob- k j ; 17 {z } lems. It is an iterative procedure that includes two phases: ini- Probabilistically mutate k ; 18 {x } ← {z } tialization and cool-down. The initial population of candidate k k ; solutions can be generated randomly. Then in each iteration 19 Replace the worst solutions with elites; of the cool-down phase, a new generation is randomly created from perturbation around the current candidate solutions to The inputs to the algorithm are number of habitats, or generate a new population. This process ends when the ter- population size (N); number of elites (M); and number of gen- mination criteria are satisfied. In [22], SA was used to solve erations (Gmax). In line 1, N solutions (habitats) are randomly relatively large-scale ridesharing optimization problems. initialized. Lines 3 through 6 initialize the emigration rate and the immigration rate for each solution. Lines 10 through 16 IV. PROPOSEDMETHOD:BIOGEOGRAPHY-BASED use immigration probability to decide on migration for each OPTIMIZATION feature of each solution in the current generation. Finally, in In this section, we introduce the implementation of our line 18, elites replace the worst solutions in order to keep the proposed method which leverages an evolutionary approach previous best solutions from one generation to the next. to search for the globally optimal solution. We found that biography-based optimization (BBO) is an approach that can B. Adapting BBO for the ridesharing problem be effectively applied to the ridesharing problem. BBO can be adapted to the ridesharing problem by defining each island as a set of matched trips that include drivers and A. Outline of the BBO Algorithm their assigned riders. The cost of each solution is calculated Biogeography-based optimization (BBO) [23] is based on based on our objective function in Equation 3. Our method sharing suitable island features. Each island is considered as a is based on periodic optimization which means we add all possible solution to the problem. Islands, which are encoded new riders to a pool called the rider pool, and when the as possible solutions for the problem, gradually evolve by period ends, we perform optimization for the rider pool. We in a weighted graph is a route with minimum total weight. MSP in a weighted graph of n vertices can be found in time O(n3). To have a better view on the proposed method, Figure 1 is provided which shows how our dynamic ridesharing framework works.

Algorithm 2: Generate Initial Population 1 Create N virtual maps from the original map ; 2 Initialize population of candidate solutions xk for k ∈ [1,N]; 3 Apply each initial solution to a virtual grid; 4 for k = 1 to N do 5 for each r ∈ R do 6 cand list ← feasible drivers ⊂ D; 7 if k < NHratio then 8 //***Greedy assignment***; ∗ Fig. 1: Flowchart of ridesharing optimization using BBO 9 d ← driver from cand list with minimum dov for rider r; ∗ 10 if Constraints of d and r are satisfied then ∗ updated the basic BBO algorithm and added some features to 11 Assign d to rider r and update schedule for d∗ ; it. We customized the initialization and migration steps so that ∗ BBO can work with the ridesharing optimization problem. To 12 Update drte ← MSP(schedule); 13 else handle rider requests, we gather requests which appear within ∗ a certain time slot called a batch, and then try to solve each 14 Remove d from cand list and goto batch like a static ridesharing problem. In the first step of each Greedy assignment 15 else batch, we generate the initial population, and in the second step 16 //***Random assignment***; we update the cost of each solution based on the cost function. ∗ 17 d ← random driver from cand list; We iteratively evolve the initial population to generate better ∗ 18 if Constraints of d and r are satisfied then solutions with lower cost in each successive population. Figure ∗ 19 Assign d to rider r and update 1 shows the outline of our proposed method. schedule for d∗ ; 1) Initialization: The first step of the BBO algorithm is ∗ 20 Update d ← MSP (schedule); initialization, which means N candidate solutions need to rte 21 else be generated. In our simulation, which will be described in ∗ 22 Remove d from cand list and goto Section V, we put drivers and riders on the map based on Random assignment their origin positions as they become available. The simulator updates the positions of the drivers on the map based on their schedules. In the next section, we show how each solution is 2) Problem representation: We need N initial solutions stored and represented in our framework. with the same map, same drivers, and same riders. Due to Algorithm 2 shows our proposed initialization function. The simulator limitations we cannot define multiple solutions for first step in this function is making the initial population. a single map. We need N maps and N solutions that can be In order to have some good initial solutions in the initial processed simultaneously. So we define the concept of virtual generation, we design the initialization function so that it maps, which are just duplicates of the initial map with objects generates some solutions randomly and some solutions more on it such as drivers and riders. In this way, we can generate a intelligently, such as with a greedy algorithm. Hratio defines solution for N virtual maps and then update each virtual map’s what proportion of the initial population will be generated objects with the corresponding solution. Thus, we copy the randomly. If Hratio = 0, the entire initial population will be initial map to N virtual maps in order to perform optimization, generated with the greedy algorithm. and once optimization is done we pick the best map (best One of the important characteristics of a good initial popula- solution) and set it as the initial map for the next batch. tion is that all solutions should be unique and widely scattered Figure 2 shows an example using virtual maps. There are within the problem’s domain. In order to achieve a diversity of N virtual maps corresponding to N solutions, of which only initial solutions, the initialization algorithm randomly selects three are shown in the figure. There are many drivers on each a rider from each batch as a starting point so that the greedy map, but the figure only shows those drivers that are assigned algorithm generates a different solution each time it executes. to one or more riders in the current batch. It is necessary to In Algorithm 2, MSP is the minimum shortest path that generate multiple unique initial solutions to cover as much a driver needs to travel. The MSP of a vehicle’s schedule as possible of the solution space. Therefor, our initialization Fig. 2: Concept of virtual maps. This figure shows N candi- date solutions during a given batch. Each candidate solution Fig. 3: Flowchart of migration function represents a different possible driver/rider matching strategy. our proposed method. Finally, we compare our results with other algorithms, including one state-of-the-art method. method has to generate unique solutions as shown in Figure 2. As seen in the figure, there are 10 request in the rider pool A. Dataset (the total number of assigned riders and unassigned riders in We conduct all experimental evaluations on a real Bei- each candidate solution). The solution corresponding to the jing road network [15]. This dataset was designed for taxi- virtual map in the middle can be considered as a good solution ridesharing simulations. Since our research is focused on peer- since it includes more matches for the riders than the other to-peer ridesharing problems, in which each driver has its solutions. The shown above each vehicle represents own specific destination and time constraints, the dataset is the assigned riders in that vehicle. not directly applicable and must be changed. We modified 3) Migration approach: In this section, the process of how this dataset so that each vehicle has a destination, which is a to migrate features between two islands in BBO is described. random location on the map, and a certain deadline to reach the So, we explain what are the features and what are the islands destination. The deadline is set so that each driver has twice in the ridesharing optimization problem. In our proposed the minimum required time (MSP) to reach his destination. migration approach we define all matched drivers on a virtual Our dataset consist of two parts as follows. map as determined by the initialization step for the island. 1) Road network: There are 351,290 vertices and 743,822 Then, we define each vehicle in the set of matched drivers as edges in a total area of 17,158 km2 in the Beijing a feature of that island. Figure 3 depicts the details of this road network dataset. Each vertex contains latitude and approach, which consists of the following steps. longitude. For each directly connected edge, the travel 1) Insert the selected rider’s vehicle (from the emigrating distance is given. The shortest path distance between any solution) in the target solution (into the immigrating two vertices can be obtained by searching an undirected solution) if it does not yet exist. graph of the road network. 2) If the selected vehicle already exists in the target solution, 2) Problem instance: Our problem instance is flexible and remove its current riders and put them in a waiting list. can be defined as a small problem or a large problem 3) Assigned the selected riders to the selected vehicle. in order to evaluate the scalability and performance of a 4) Reassign all riders that are in the waiting list to new given algorithm in different circumstances. The number drivers using a greedy approach. of drivers, number of riders, and their spatial distributions 5) If any rider from the waiting list remains unassigned, roll are important factors that we can change based on the back (undo) this migration sequence. purpose of the experiment. Although the number of drivers and riders can be manipulated, some statistical facts i.e., the distribution of the rider appearances, are V. EXPERIMENTSAND RESULTS based on Chinese transportation data. In the dataset file, In this section, we introduce the dataset that is used in this each record is a driver or a rider, which can be determined research and then we show experimental results obtained by based on the load feature. load is a negative number for drivers and a positive number for riders. Each driver has the properties id (did), origin (do), early time (de), late time (rl), and capacity (dcap). Each rider has the properties id (rid), origin (ro), destination (rd), early time (re), and late time (rl). a) Driver: The initial locations of the drivers are sampled from the real trip dataset until the desired number of drivers is obtained. Each sampled trip origin is used as the initial location of the driver. Each vehicle has three seats in addition to the driver’s seat, and is initialized as a vertex on the road network. When a driver is initialized, it has no riders and there is only one location in its schedule, which is the driver’s origin. Fig. 4: Cargo architecture [15] The driver’s destination is selected randomly and is added to its schedule later. TABLE I: BBO parameters for four different sets of parame- b) Rider: Riders are extracted from the real dataset from ters (see Algorithm 1 for parameters) all taxi trips in the sample period from 6:00–6:30 Symbol Case 1 Case 2 Case 3 Case 4 PM on an arbitrary day in the Beijing network. There Generation limit Gmax 10 10 10 10 are 17,467 trips, about 9.70 requests per second. The Population size N 20 20 20 20 request rate can be changed to simulate customer Hybrid init. rate Hratio 0.85 0.85 1 1 Number of elites E 1 1 1 1 appearance frequencies of 0.5x, 2.0x, and 4.0x. Roll back RB On Off On Off c) Time Window: Each rider has own early time con- Objective weight α 0.5 0.5 0.5 0.5 straint and late time constraint. Cache size - 2ˆ30 2ˆ30 2ˆ30 2ˆ30 B. Simulator We used the Cargo ridesharing simulator to implement our last batch includes 8 riders to complete the total of 668 riders. ridesharing optimization algorithms [15]. Cargo is a simulator There are 22 drivers who appear during the first batch, three that provides fundamentals of a ridesharing system, i.e., vehi- drivers who appear in each of the following 59 batches, and 1 cle motion, spatial indices, statistics, and event logs. driver who appears in the last batch which results in a total of One of the important features of Cargo is that it accepts as 200 drivers. To demonstrate the impact of different parameters an input a matching algorithm, which determines the driver / on the performance of our BBO method, we test our proposed rider matching policies and objectives. Thus, we implemented algorithm for four different sets of BBO parameters as shown our algorithms and attached them to Cargo. Figure 4 shows in Table I. To have a fair comparison, each case uses the the details of the Cargo architecture. Cargo and RSAlgorithm same initial population. Table II shows the performance of are two important components of the simulator. Cargo is the each of our four test cases. In Table II, base driver distance core component of the simulator and maintains the problem is the sum of all the drivers’ own trip distances; base rider instance and the road network. It also is responsible for distance is the sum of all the riders’ own trip distances, i.e., creating statistics, logs, and reports. RSAlgorithm provides the the distance from each rider’s origin to its destination; and outline of the ridesharing algorithm. It provides events that can matched trip distance is the total distance of all trips after be used in any user-defined algorithm. matching riders with drivers. Base driver distance and base To compute the shortest path between two locations, this rider distance are the same for all cases since these numbers simulator uses the G-tree algorithm, which is a state-of-the- depend only on the input dataset. Table II also shows dov art method for quickly computing the minimum path. The G- and MR, which are important parts of the objective function; tree file index of the Beijing road network is pre-built and is and cost, which is computed based on the objective function available as part of Cargo. definition in Equation 3. Table II shows approximately the same performance for all C. Results The dataset provided in Cargo is a real-world dataset, so in order to ease code development and debugging, we made a TABLE II: Results of the proposed BBO algorithm. The best smaller problem from the existing dataset. In the new dataset, result in each row is shown in bold font. there are 668 riders and 200 drivers that appear throughout a Case 1 Case 2 Case 3 Case 4 time period of 30 minutes. We set the time of each batch to 30 Base driver dist. 2,168,819 2,168,819 2,168,819 2,168,819 seconds and we optimize matching during each batch, so 60 Base rider dist. 3,532,517 3,532,517 3,532,517 3,532,517 Matched trip dist. 3,483,903 3,496,608 3,454,594 3,451,805 batches comprise 30 minutes of simulation time. Riders enter dov 1,315,084 1,327,789 1,285,775 1,282,986 the ridesharing system with a uniform distribution so each of MR 0.479 0.482 0.481 0.476 the first sixty 30-second batches include 11 new riders, and the Cost 0.8932 0.8938 0.8834 0.8871 (a) Matching rate (b) Distance overhead (c) cost Fig. 5: Algorithms’ performance comparison cases; however, the minimum cost belongs to case 3, which then optimize each domain individually, but with each domain uses all-random initial solutions and takes advantage of the being aware of its neighbors solutions. roll back mechanism (see Section IV-B3). Although case 3 REFERENCES has neither the highest MR nor the lowest dov, it has the minimum cost when both objectives are combined based on [1] J. Alonso-Mora, A. Wallar, and D. Rus, “Predictive routing for au- the multi-objective cost function. tonomous mobility-on-demand systems with ride-sharing,” IEEE Inter- national Conference on Intelligent Robots and Systems, vol. 2017-Septe, The other thing that can be inferred from Table II is that pp. 3583–3590, 2017. using a 100% random initial population results in a lower cost [2] X. Bei and S. Zhang, “Algorithms for trip-vehicle assignment in ride- than using more sophisticated initial solutions, e.g., greedy- sharing,” Association for the Advancement of Artificial Intelligence, pp. 3–9, 2018. based solutions, in the initial population. Table II also shows [3] U. Ritzinger, J. Puchinger, and R. F. Hartl, “A survey on dynamic and there is essentially no advantage or disadvantage if we use roll stochastic vehicle routing problems,” International Journal of Production back. Research, vol. 54, no. 1, pp. 215–231, 2016. [4] S. N. Parragh, K. F. Doerner, and R. F. Hartl, “A survey on pickup and To evaluate our proposed BBO method with other research, delivery problems,” Journal fur Betriebswirtschaft, vol. 58, no. 1,pp. we implemented four other approaches in the simulator: 21–51, 2008. greedy algorithm (GR), simulated annealing (SA), T-share [5] J. Yang, P. Jaillet, and H. Mahmassani, “Real-time multivehicle truckload pickup and delivery problems,” Transportation Science, vol. 38,no. 2, pp. (TS) [11] and kinetic tree (KT) [18]. In order to have a fair 135–148, 2004. comparison among these algorithms and our BBO method, we [6] J. P. Dickerson, K. A. Sankararaman, A. Srinivasan, and P. Xu, “Allo- use the same dataset and the same simulation parameters for cation problems in ride-sharing platforms: Online matching with offline reusable resources,” in Association for the Advancement of Artificial all methods. We compare all algorithms in terms of dov, MR, Intelligence, pp. 1007–1014, 2018. and cost in Figures 5a–5c. [7] N. A. Agatz, A. L. Erera, M. W. Savelsbergh, and X. Wang, “Dynamic ride-sharing: A simulation study in metro Atlanta,” Transportation Figure 5 (a) shows that the highest MR corresponds to BBO Research Part B: Methodological, vol. 45, no. 9, pp. 1450–1464, 2011. and KT with 0.481 and 0.482 respectively, with the Greedy [8] V. Pillac, C. Gueret,´ and A. L. Medaglia, “An event-driven optimization and SA algorithms very close behind, and the lowest matching framework for dynamic vehicle routing,” Decision Support Systems,vol. rate belongs to TS with only 0.322. Figure 5 (b) shows that 54, no. 1, pp. 414–423, 2012. [9] R. Baldacci, V. Maniezzo, and A. Mingozzi, “An exact method for TS has the best distance overhead and SA has the worst. The the car pooling problem based on Lagrangean ,” reason that TS has the minimum dov is that it matches fewer Operations Research, vol. 52, no. 3, pp. 422–439, 2004. riders with drivers, so drivers have fewer matched riders on- [10] S. Ma, Y. Zheng, O. Wolfson, S. Member, and O. Wolfson, “Real-time city-scale taxi ridesharing,” IEEE Transactions on Knowledge and Data board, which results in less distance overhead. Finally, Figure Engineering, vol. 27, no. 7, pp. 1782–1795, 2015. 5 (c) shows that the best cost belongs to BBO and KT with [11] S. Ma, Y. Zheng, and O. Wolfson, “T-share: A large-scale dynamic 0.8834 and 0.8837 respectively, while SA has the worst cost. taxi ridesharing service,” International Conference on Data Engineering (ICDE), pp. 410–421, 2013. [12] J.-F. Cordeau, “A branch-and-cut algorithm for the dial-a-ride problem,” VI.CONCLUSIONAND FUTURE WORK Operations Research, vol. 54, no. 3, pp. 573–586, 2006. [13] J. F. Cordeau and G. Laporte, “The dial-a-ride problem: Models and We proposed an algorithm which leverages biogeography- algorithms,” Annals of Operations Research, vol. 153, no. 1, pp. 29–46, based optimization to find a near-optimal solution for the 2007. online ridesharing problem while imposing minimum delay for [14] S. Ropke and J.-F. Cordeau, “ and price for the pickup and delivery problem with time windows,” Transportation Science,vol. driver / rider matching. We evaluate our proposed algorithm 43, no. 3, pp. 267–286, 2009. using a Cargo simulator on a Beijing road network. The [15] J. J. Pan, G. Li, and J. Hu, “Ridesharing: Simulator, benchmark, and proposed algorithm performs competitively with the well- evaluation,” Proceedings of the VLDB Endowment, vol. 12, no. 10,p. 1085–1098, 2019. known simulated annealing, and T-share, and kinetic tree [16] H. Luo, Z. Bao, F. Choudhury, and S. Culpepper, “Dynamic ridesharing algorithms. in peak travel periods,” IEEE Transactions on Knowledge and Data To improve the performance of our proposed algorithm, Engineering, pp. 1–1, 2019. [17] M. Ota, H. Vo, C. Silva, and J. Freire, “STaRS: Simulating taxi ride we aim to implement BBO in a distributed fashion. In other sharing at scale,” IEEE Transactions on Big Data, vol. 3, no. 3, pp. words, we will partition the map into smaller domains and 349–361, 2016. [18] Y. Huang, F. Bastani, R. Jin, and X. S. Wang, “Large scale real- time ridesharing with service guarantee on road networks,” VLDB Endowment,vol. 7, no. 14, pp. 2017–2028, 2014. [19] M. Ota, H. Vo, C. Silva, and J. Freire, “A scalable approach for data- driven taxi ride-sharing simulation,” Proceedings - IEEE International Conference on Big Data, pp. 888–897, 2015. [20] A. Shamshirgaran, D. Ebeigbe, and D. Simon, ”Position and Attitude Control of Underactuated Drones using the Adaptive Function Approx- imation Technique,” Dynamic Systems and Control Conference, 2020. [21] H. Javidi, and M. Goudarzi, “TABEMS: Tariff-Aware Building Energy Management System for Sustainability through Better Use of Electric- ity,“ The Computer Journal, vol.58, no. 6, pp. 1384-1398, 2014. [22] J. Jung, R. Jayakrishnan, and J. Y. Park, “Dynamic shared-taxi dispatch algorithm with hybrid-simulated annealing,”Computer-Aided Civiland Infrastructure Engineering, vol. 31, no. 4, pp. 275–291, 2016. [23] D. Simon, “Biogeography-based optimization,”IEEE Transactions on Evolutionary Computation, vol. 12, no. 6, 2008.