Research Article Customized Bus Route Optimization with the Real-Time Data

,


Introduction
In recent years, a series of traffic problems happen due to traffic congestion in an urban area, such as increasing onroad travel time of citizens during daily commuting. Encouraging public transport, like buses, is one of the main methods to address such a problem [1,2]. Multiple clients can share a vehicle, which only occupy very limited traffic resources. e travel fee is obviously lower than the taxi and private car. However, the disadvantage of taking the bus is the low level of service (LOS) caused by the long travel time. Bus clients have to walk for a long distance to the fixed station from their desired origins, home, or workplace, which would largely harm their enthusiasm. Hence, the customized bus (CB) is proposed and becomes popular in many cities around the world. It has a flexible route to pickup waiting clients in their origins. CB plays the role of a bridge between the traditional buses and taxi/private car. CB provides the ride-hailing service that clients can make travel requests by using mobility apps before departure. Clients can publish their desired pick-up/drop-off location and time windows. For the CB companies, named CB operators, they can dynamically change the route and schedule based on the real-time travel request.
CB system can be divided into two main categories based on clients' OD distribution: many-to-one mode, that is, clients have different origins but the same destination; many-to-many mode services, that is, clients have different origins and destinations. e former can meet the demand of clients who have the same trip purpose. Taking the passengers whose destination is the airport as an example, they can share a CB by publishing request online days or hours earlier [3]. Many existing studies have explored the many-toone CB service [4]. When considering the return trip, a concept named as many-to-one-to-many is proposed by Tarantilis et al. [5]. It can be seen as two independent many-to-one trips when optimizing the bus route. Moreover, to provide more flexible service, many-to-many service is raised that clients are allowed to share a bus if they have an overlapping route [6]. Such a mode has been widely conducted in the shared mobilities, like the taxi sharing and carpooling [7]. In terms of the multiple pick-up and drop-off stations, it makes the system optimization more complex [8].
Another difficulty in the CB system service, especially the many-to-many service, is the vehicle routing problem (VRP) [9]. e order of station visiting can largely affect the LOS of in-vehicle and waiting clients. A reasonable route can ensure the service reliability. e existing studies normally establish optimization models to address the CB VRP, like the schedule coordination submodel for the feeder bus [10] and integer programming model for the school bus [11]. In the objective function, the existing studies normally either maximize the service rate or minimize the operation costs [12][13][14]. However, it is challenging to find a balance between the two aspects. e low service rate results in the potential demand loss, while the high operation cost makes the CB system unsustainable [15][16][17][18]. e last challenge comes from the real-time demand response. Studies show that only limited papers explore the real-time CB system optimization [19]. With the use of mobility apps, clients are allowed to make a request once he or she decides to take buses. It brings a huge challenge for the CB operator to collect the data, optimize bus routes, and then update the schedule in a short time. Hence, reducing the computation time is essential when providing the realtime decisions.
is paper aims to maximize the service rate of CB clients and profits of CB operators. A real-time two-phase research methodology is built. In phase 1, real-time data are collected once a new CB request is proposed. It mainly includes the vehicle-related data with existing route and schedule and client-related data with pick-up/drop-off location and time windows. And then, the collected data are set as the inputs of phase 2, where three CB route optimization models are established. Considering the location of the new request, the many-to-many CB mode can be divided into three categories: only new pick-up service but drop-off location in the existing route, only new drop-off service but pick-up location in the existing route, and both new pick-up and drop-off service. e profit difference is introduced to decide the served demand. To handle the optimization problem, a real-time search algorithm is proposed that the neighboring buses are tested one by one.
In the next section, the research methodology is given that including the real-time data collection in phase 1, the optimization model, and solution approach in phase 2. Section 3 presents the application to the Sioux Falls network. Conclusions and future work directions are presented in the last section.

Problem Setting.
We consider a real-time CB route optimization problem that the operators update the bus route once a new request, namely, the latest request, is claimed. e objective of this paper is to find a vehicle to meet the latest request with the objective of maximizing service rate for clients and profit for CB operators. e study region consists of |I| bus stations with a parking station denoted as i ∈ I. e current location is taken as the first station. ere are |V| vehicles in the CB system with a bus denoted as v ∈ V. e bus v has a fixed route to drop off the in-vehicle clients and pick up waiting clients. e bus will be used to serve the latest client from station i ∈ I to station j ∈ I where i ≠ j. It is defined by decision variables Y i and X ji . Y i equals 1 if vehicle v ∈ V arrives at station i ∈ I and 0 otherwise. X ji equals 1 if vehicle departs from station j ∈ I to station i ∈ I, where i ≠ j and 0 otherwise. Similarly, X ij represents the binary decision of vehicle travel from station i ∈ I to station j ∈ I. e fixed time window between bus arriving at and departing from each station is given. Let tep i be the desired earliest pick-up time of clients at bus station i ∈ I, tlp i be the latest pick-up time of clients at bus station i ∈ I, and tld i be the latest drop-off time of clients at bus station i ∈ I. Clients who have the similar time windows and the same stations are grouped into one trip.
In practice, the pick-up and drop-off location of the latest request might not always exist in the given route. Based on the station location, we divide the CB route optimization problem into three types, as shown in Figure 1. Figure 1(a) shows the CB system with a single external pick-up station. e client's origin location is not in the existing route, while her/his destination location is the bus route. In contrast, Figure 1(b) represents the CB system with a single external drop-off station. Figure 1(c) illustrates the CB system with external pick-up and drop-off stations. Both the client's pick-up and drop-off stations are not in the existing bus route. e route optimization is to decide serving the latest request or not by updating the bus route. For an empty bus in the parking station, the trip of latest request can be seen as the optimized route.

Notation.
e notation used throughout the paper is listed below: Once such a request is published, the CB operator will search neighboring buses and identify vehicle location, existing route and schedule, in-vehicle and waiting clients' location, and time window constraints. e neighboring search radius is the distance between the bus current location and latest clients' pick-up location. e vehicle-and client-related data can be set as inputs of the optimization model in phase 2. e real-time CB route optimization can be fulfilled by rolling the bus search in phase 1 and optimization in phase 2. e profit difference among all tested buses decides the selected bus. e model with a single external pick-up station is formulated as follows. We set the picking up location of the latest CB request as station |I|:

Journal of Advanced Transportation
e objective function (1) aims to maximize the service rate of the latest CB request. Constraint (2) defines the starting station of a bus, where the vehicle is found when the latest CB request is proposed. Constraint (3) asks the bus must first leave the starting station and then serve other demand in the next trips. Only one trip between the starting station and other stations is approved. Constraint (4) represents that a bus cannot travel within its own station. Constraint (5) ensures the no more than one trip leaving one station is allowed. If one station is the ending station of this CB service, the trip departing from it would not exist. e term j∈I X ij represents all the possible trips leaving station i. Constraint (6) asks the in-vehicle and waiting clients, whose request with the pick-up or drop-off station j � 2, . . . , |I| − 1 has to be satisfied. e term j∈I X ji represents all the probable trips arriving at station i. Constraint (7) indicates that the bus must first arrive at and then leave the station, where the latest request happens if the client is served. Otherwise, no bus is arranged to visit this station. Constraint (8) identifies whether the request in one station is served or not based on the bus trip. Constraints (9) and (10) state that the arriving time and departing time are set as 0 in the starting station. Constraint (11) ensures that the bus arrives at one station no later than the waiting clients' latest pick-up time and the in-vehicle clients' latest drop-off time. Constraint (12) ensures that the bus leaves one bus station no earlier than the waiting clients' earliest pick-up time and bus arriving time. Constraint (13) calculates the vehicle arriving time.
e term i∈I X ij td i and i∈I X ij tt ij represent the departing time and travel time of the bus at the station i. Constraint (14) specifies the domain of the decision variables.
Based on the optimized route in P1-1, we calculate the increased profits of the latest CB request φ and total travel time cost c 1 : Subject to Constraints (2)- (14). e objective function (17) minimizes the service rate of the latest CB request. It shares the same constraints with P1-1. Based on the optimized route in P1-2, we calculate the total travel time cost c 2 with equation (16). e profit difference is obtained as follows: Equation (18) calculates the profit difference between P1-1 and P1-2. If the latest CB request in P1-1 is not served, ϕ would be equal to 0. Otherwise, it will be a positive or negative value that depends on the increased income and operation cost caused by servicing the latest CB request.

M-2: CB System with Single External Drop-Off Station.
e model with a single external drop-off station is formulated as follows. We set the dropping off location of the latest CB request as station |I|: Constraints (2)- (6) and (9)- (14), plus: Constraint (20) identifies whether the request in one station of the existing route is served or not based on the bus trip. Constraint (21) identifies whether the bus arrives at the drop-off station of the latest request or not based on the arriving trip. As this station can be set as the ending station, the departing trips leaving this station might not exist.

M-3: CB System with Both External Pick-Up and Drop-Off Stations.
e model with both external pick-up and drop-off stations is formulated as follows. We set the picking up location of the latest CB request as station |I| − 1 and dropping off location as station |I|: Subject to Constraints (2)-(5), (9)- (14), (20), and (21), plus i∈I X ij � 1, ∀j � 2, . . . , |I| − 2, Constraint (25) asks the existing requests, picking up or dropping off at station j � 2, . . . , |I| − 2, in the existing route must be served. Constraint (26) indicates that the bus must first arrive at and then leave from the station where the latest request happens if this request is met. Constraint (27) represents that the bus has to visit pick-up and drop-off stations if the latest request is served. Otherwise, the bus will not arrive at both stations.
Based on equation (16), we calculate the total travel time cost c 2 in P3-2: e profit difference between P3-1 and P3-2 is obtained based on equation (29).

Solution Approach
(1). Linearization. e nonlinear constraint (8) incurs a great computation challenge. A series of linearization methods are proposed as follows: constraint (8) is replaced by constraints (31)-(36): (2). Search Algorithm. We develop a real-time search algorithm to optimize the CB system. It can reduce the computation burden by searching the bus one by one. In this way, the maximum profits for CB operators can be obtained via rolling all the found buses. e following pseudocode shows such an algorithm: Step 1: choose the real-time traffic network at time instant of the latest request happening, and set the initial profit difference ϕ as 0.
Step 2: search the neighboring buses V of the latest CB request with a given search radius and number of required seats.
Step 3: choose the vehicle v among all the found buses V, and check the existing route of this vehicle.
Step 3.1: if both the pick-up location and drop-off location of the latest request are in the existing route, go to step 4; otherwise, proceed to step 3.2.
Step 3.2: if only the pick-up location is in the existing route, go to step 5; otherwise, proceed to step 3.3.
Step 3.3: if only the drop-off location is in the existing route, go to step 6; otherwise, proceed to step 3.4.
Step 3.4: if both the pick-up location and drop-off location of the latest request are not in the existing route, go to step 7.
Step 4: check the time window constraints. If the selected bus can serve the latest request, arrange the client to it, stop. Otherwise, proceed to step 3.
Step 5: optimize models P1-1 and P1-2 and then calculate the profit difference by equation (18). Save the result as ϕ v .
Step 5.1: compare the ϕ v and ϕ. If ϕ v > ϕ, update the optional bus as v.
Step 6: optimize models P2-1 and P2-2 and then calculate the profit difference by equation (23). Save the result as ϕ v .
Step 6.1: compare the ϕ v and ϕ. If ϕ v > ϕ, update the optional bus as v.
Step 7: optimize models P3-1 and P3-2 and then calculate the profit difference by equation (29). Save the result as ϕ v .
Step 7.1: compare the ϕ v and ϕ. If ϕ v > ϕ, update the optional bus as v.
Moreover, the parallel computing technique can be used to save computation time. e route optimization of each bus in phase 2 is independent that can be carried out at the same time with multiprocessing modules. In this way, the total computation time can be reduced to 1/|V|.

Setting up the Case Study.
e classical Sioux Falls network is used to demonstrate the applicability of the proposed models and algorithms. As shown in Figure 2, 24 notes and 38 bidirectional links exist in the network. We Journal of Advanced Transportation carry out the real-time optimization based on the given data including the client's demand, bus's current location, route, and schedule. We assume that one bus with known routes is already found by the neighboring search, which is providing CB service at the time instant of one new request claiming. Even M-3 can be seen as a general model to optimization all three scenarios, we still use three independent models in this paper. It is to reduce the computation time as required by the real-time requests. An initial test reveals that the total computation time can be reduced to about 50% by using M-1 and M-2 to replace M-3 in special scenarios. ree scenarios are given in this case study. Figure 2(a) represents the M-1 CB system with a single external pick-up station. One client makes a request by starting from station #21 to station #20. Figure 2(b) shows the M-2 CB system with a single external drop-off station. e client departs from station #22 to station #21. Figure 2(c) illustrates the M-3 CB system with both external pick-up and drop-off stations. Station #21 and station #16 are the origin and destination of the latest request. e client's CB trip is defined by the OD location and pick-up/drop-off time windows at each station in Table 1.
e CB trips are not necessary to be tracked in the optimization model, which can save the computation burden by reducing the number of decision variables.

Optimization Results.
e proposed CB route optimization model is solved by Python calling GUROBI 7.0.2 solver on an i7 processor @2.40 GHz, 8 GB RAM computer with a Windows 7 64 bit operating system. e total computation time is 0.17-0.38 seconds. Table 2 shows the optimized route.
As shown in M-1 of Table 2, we can see that the CB request happening at location #21 can be served that does not break the existing service planning. e in-vehicle and waiting clients can be served within their desired pick-up/ drop-off time windows. A new picking up location #21 is put into the CB route, and the optimized route has been changed to #4-#11-#15-#22-#21-#20-#18. We then made a sensitivity analysis on the time window constraints. We assume that both the earliest and latest drop-off time in the latest request are later than 20 minutes. e results show that there is a time window conflict for the bus to service clients in stations #22 and #21 simultaneously. e bus will follow the old route to serve the existing in-vehicle and waiting clients. In M-2 of Table 2, the optimized route is #4-#11-#15-#22-#21-#20-#18 by adding a new drop-off station #21. e CB system can serve the latest client by taking a detour and does not have a large travel delay. All the clients' time window constraints can be ensured. In M-3 of Table 2, the drop-off location of the latest client is set as the ending station of this CB system. e total operation time rises to 30 minutes. e optimized route is #4-#11-#15-#22-#21-#20-#18-#16. Moreover, the sensitivity analysis in M-2 and M-3 is carried out by using a similar method in M-1. e results reveal that the latest CB request satisfying is largely dependent on the time window constraints.

Remarks.
In this study, a two-phase research methodology is proposed. Considering the limited techniques to data collection, we assume that the vehicle-and client-related data are known. e CB service route is optimized based on the given data. Although we simplify this phase 1 of data collection, the complete CB route dynamic optimization has been conducted. In addition, the proposed neighboring buses search algorithm can fulfill the real-time CB route optimization. We have recognized the system optimal results cannot be obtained in this study [20], but the computation time and burden can be reduced by testing the bus one by one. In practice, it brings a huge challenge for the existing studies to update the bus route in a short time when optimizing the CB system with multiple vehicles and routes.
is paper provides a feasible method to address large-scale many-to-many CB route optimization in an urban area.

Conclusion
is paper studies the CB route optimization with real-time data. A two-phase research methodology is established including the data collection and route optimization. In phase 1, the vehicle-and client-related data are real-time collected and then is set as the input to phase 2.
ree nonlinear programming models are established to address the manyto-many CB optimization problem. A concept of profit difference is proposed that decides the served requests. A customized solution approach including a linearization method and search algorithm is proposed. e case study based on the Sioux Falls network is carried out to verify the proposed methodology [21][22][23][24][25][26][27][28].  e results show that the proposed optimization model can address the CB request in 0.17-0.38 seconds. It indicates that the real-time CB route optimization is fulfilled by searching the neighboring buses one by one, conducting route optimization, and then comparing the profit difference. e optimization solutions represent that CB request can be satisfied if the bus takes a detour and ensures the existing clients' pick-up/drop-off location and time window constraints simultaneously. Moreover, the sensitivity analysis also verifies the reliability of the proposed models.
Although this paper conducts the CB route optimization, the vehicle-and client-related data are given in the case study. In the future study, the rolling horizon method based on the real-time data can be explored. Furthermore, to save the computation time and burden, we introduce the profit difference. However, the global optimal solutions might not be obtained. Another possible extension is on global optimization of CB route optimization problem.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this article.