Dynamic Scheduling Based on Predicted Inventory Variation Rate for Public Bicycle System

To improve efficiency and reduce the total scheduling cost of the public bicycle system (PBS), dynamic scheduling based on the predicted inventory variation rate (DS-PIVR) is proposed. Regarding a station in the PBS as an inventory system, its inventory variation rate during the scheduling period and its inventory rate at the end of the scheduling period were predicted based on the stationary Markov process condition. A mixed integer programming (MIP) model, whose objective is to minimize the total scheduling distance, was established to describe the dynamic scheduling problem (DSP). Results from Boston and Washington D.C. PBSs show that, when compared to the dynamic scheduling based on the rolling horizon (DS-RH), the DS-PIVR method could at most shorten the routing distance by 62.25% (for Boston) and 74.7% (for Washington D.C.) among all scheduling areas, and could at most shorten the total routing distance for the whole PBS by 21.06% (for Boston) and 17.26% (for Washington D.C.). Moreover, the DS-PIVR method makes the repositioning vehicle journey only once and keeps the inventory rate of each station in balance during the scheduling period. Furthermore, the DS-PIVR method provides a promising reference to improve the operation efficiency by reducing the scheduling cost and the quality of service by satisfying the users’ demand in time during the rush hours for the PBS operators.

The public bicycle systems (PBSs) can be mainly divided into docking and dockless PBSs [10].The former provides services via docking stations, while the latter realizes the standardized management by setting up electronic fences [10].The spatial and temporal distribution of travel demand is uneven in PBSs.With the expansion of PBSs and the growth of users, problems in borrow and return processes are gradually emerging [10,11].How to maximize the quality of service and control the operational cost in a rational range has become the primary goal of the PBS operators.Efficiently scheduling the vehicles to rebalance the system is the key to solving this problem [6,12].
To optimize the PBS scheduling process, previous studies [4] suggested that the problem should be divided into three aspects.The first is the forecasting of the rebalancing demand.It mainly includes the mathematical models such as the Markov chain [13], queuing theory [14], etc., and the machine learning models such as neural networks [15], random forest [16,17], gradient boosting regression tree (GBRT) [18], etc.The second is the division of the scheduling area.It mainly includes district partition by administrative boundary and clustering by the attributes of stations, such as k-means clustering [19], Gale-Shapley algorithm [20], saving heuristic [21], etc.The third is the repositioning of vehicle routing, which is the core issue of scheduling optimization problems.
The goal of repositioning the vehicle routing could be divided into two categories.One is to reduce the rebalancing cost [22,23], including the total routing distance of the repositioned vehicle, the total execution time of the rebalancing task, and the total number of transferred bicycles.The other is to improve users' satisfaction and simultaneously reduce the rebalancing cost, which is a multi-objective optimization [24,25] considering the trade-off between the operating cost and the service quality.Here, users' satisfaction is commonly quantified by the waiting time, or by the users' satisfaction function based on the fuzzy time window.
There are two main types of PBS scheduling optimization, namely static scheduling, and dynamic scheduling.Static scheduling, often performed at night or in the off-peak period, can ignore the influence of the users borrowing and returning the bicycles during the scheduling procedure.Static scheduling can be simply summarized as the vehicle routing problem (VRP) [26], which can be established by the MIP model [27,28].Dynamic scheduling, often performed during the rush hour, considers the inventory variation of stations during the scheduling procedure.The common methods for dynamic scheduling include the rolling horizon [29] and the time-space network flow [30], both of which divide the scheduling period into discrete time slices.The DS-RH transforms the DSP into the static scheduling problem (SSP) in consecutive time slices [31].The scheduling scheme of each time slice is passively adjusted with the stage detection, which is essentially the composition of the local optimization scheme.Due to the insufficient information of the prediction, the overall efficiency of the scheduling period in the DS-RH cannot be guaranteed.The time-space network flow method divides the scheduling period into discrete time slices as well and sets several time-space nodes to transform the DSP into the SSP [30].Since the same station needs to be set as a virtual time-space node in each time slice, the complexity of solving the time-space network flow model will be greatly increased when we meet a large PBS with a long-time scheduling task.
This paper proposes a dynamic scheduling method for the PBS based on the predicted inventory variation rate.By calculating the inventory variation rate of each station, the inventory rate of the station at the end of the scheduling period is actively predicted, and an optimal scheduling scheme for the whole scheduling period is generated.The results prove that compared to the DS-RH method, the DS-PIVR method is more reasonable and effective.DS-PIVR method will provide a promising reference to improve the operation efficiency and the quality of service of a PBS during the rush hours.
The remainder of this paper is organized as follows.Section 2 introduces the properties of a station of a PBS.Dynamic scheduling based on the predicted inventory variation rate is proposed in Section 3.Then, Section 4 shows the case of the Boston PBS to test the DS-DIVR method.The last section discusses the results compared with previous studies and makes recommendations for future research directions.

Properties of a Station
A station, which provides a borrow and return service via bicycle docks, can be regarded as an inventory system [5,28].We define the properties of a station and provide the related calculation methods.

Inventory Variation Rate
During the scheduling period T, the cumulative number of borrowed and returned bicycles at a station i is denoted as B i and R i , respectively.The average borrowing and returning rate of a station i are defined as λ i = B i /T and µ i = R i /T, respectively.Then the inventory variation rate of a station i is δ i = λ i − µ i , which depicts the borrow-return trend of a station.The larger the positive value of δ i , the stronger the borrowing demand; the larger the negative value of δ i , the stronger the return demand.
According to the historical operation data of the Boston PBS, the predicted inventory variation rate of a station could be calculated as the following steps.
First, the travel demand OD matrix is obtained in the period T as F = f ij n•n , where f ij is the travel amount from station i to station j.The borrow transfer probability matrix is obtained: where p ij indicates the probability of the bicycles borrowed from station i and returned to station j.Accordingly, the return transfer probability matrix is obtained: where q ij indicates the probability of the bicycles borrowed from station i and returned to station j.
Secondly, assuming that the borrow-return process is a stationary Markov process [4].According to the stationary distribution of the Markov process [32], we obtain: where ϕ b and ϕ r indicate the stationary probability vector of the borrow and return in the period T, respectively.Then, the cumulative number of borrowed and returned bicycles are obtained as follows: where B and R are vectors come up with the cumulative number of borrowed and returned bicycles of each station in the scheduling period T, h indicates the average hourly trips in the same period calculated by using historical trip data.
Finally, the inventory variation rate is obtained:

Predicted Inventory Rate
The number of docks at station i is defined as the station capacity C i .The number of bicycles stored at station i at moment t is defined as inventory V i (t).The ratio of inventory to capacity is defined as the inventory rate At the beginning moment t 0 of the time period T, the initial inventory rate of station i is defined as , then the predicted inventory rate of station i at the moment (t 0 + T) will be If either S i (t 0 ) or S i (t 0 + T) exceeds the reasonable interval [S min , S max ], then station i will be rebalanced during the time period T. Let t i represent the time that the repositioning vehicle arrives at station i.Thus, the optimization object is to keep the inventory rate and always stay in a reasonable interval

Rebalancing Demand
The target inventory Vi (t i ) of station i at t i is calculated as: The rebalancing demand of station i where V i (t 0 ) is the initial inventory.If q i > 0, it indicates the delivery requirement, else if q i < 0, it indicates the pickup requirement.

Latest Arrival Time
To avoid an empty or full situation, the repositioning of vehicles is limited to the latest arrival time of station i, which is defined as

Methodology
To avoid the lag of scheduling, a regional and phased strategy is adopted.In this paper, a dynamic scheduling optimization method based on predicted inventory variation rate δ i , is studied in a given scheduling period and scheduling area.For each scheduling area, we assigned one depot and one repositioning vehicle.

Scheduling Scheme
In a given scheduling area, the scheduling scheme is shown in Figure 1.The generating process is: Step 1: Predict the station inventory rate at the end of the scheduling period S i (t 0 + T).
Step 2: Identify the set of stations with rebalancing requirements.The initial inventory rate S i (t 0 ) at each station, the predicted inventory rate at the end of the scheduling period S i (t 0 + T) and the reasonable inventory rate interval [S min , S max ] are compared to determine the stations with rebalancing demands.
Step 3: Calculate the latest arrival time D i .
Step 4: Establish the scheduling optimization model by minimizing the routing distance of the repositioned vehicle.
Step 5: Solve the optimization model and obtain the scheduling scheme.
The latest arrival time is used to describe the urgency of the rebalancing requirement of a station.According to the service order of the repositioning vehicle, the rebalancing demand of each station is dynamically calculated.According to the initial inventory rate and the predicted inventory rate, it is judged whether a station should be rebalanced.The heart of the scheduling process is a vehicle routing problem (VRP).An MIP model [13,27] is established to describe the scheduling procedure scheduling process is a vehicle routing problem (VRP).An MIP model [13,27] is established to describe the scheduling procedure as The heart of the scheduling process is a vehicle routing problem (VRP).An MIP model [13,27] is established to describe the scheduling procedure as The objective function (11) minimizes the routing distance of repositioning the vehicle, Constraints (12) limit visiting times of stations, which ensure the minimal time required for repositioning the vehicle to travel from station i to station j.Constraints (13) take care of flow conservation, which ensures each station with rebalancing demand visited only once by the repositioning vehicle, and it means that the vehicle starts from the depot and finally returns to the depot.Constraints ( 14) limit the total routing times of repositioning vehicles plus total loading and unloading times to the total time of the scheduling period.Constraints (15) are sub-tour elimination constraints which are similar to those of Miller et al. [33].Constraints (16) ensure that the vehicle inventory remains non-negative and within capacity after leaving station i. Constraint ( 17) is the limit on the initial inventory of repositioning vehicles.Constraints (18) are binary constraints.Constraints (19) take care of visiting time of each station within the latest arrival time.All parameters are listed, and explained in Table 1.
Table 1.Parameters used in the model.

N
Station sets that need to be rebalanced The union of the set of stations that need to be rebalanced and the depot, which is marked as 0 The rebalancing demand of station i, a positive value indicates the delivery requirement, while a negative value indicates the pickup requirement.

Validation of DS-PIVR
Take the Boston PBS at the evening rush hour (17:00-18:00) of the weekday as an example to verify the dynamic scheduling based on the predicted inventory variation rate (DS-PIVR).
According to the maximum spanning star [28], the workload constraint of the scheduling area is judged.With the scanning algorithm [34] and the k-means (K ≡ 2) clustering algorithm, the scheduling area of the Boston PBS is divided, and 17 scheduling areas are obtained (see Figure 2).Here, taking Area #3 as an example, the scheduling shown.The status of all stations in Area #3 is shown in Table 3.The simulated annealing (SA) algorithm is used to solve the scheduling problem. Figure 3 shows the DS-PIVR and DS-RH schemes.The routing distance of the DS-PIVR and DS-RH scheduling schemes are 3822.97m and 5666.36 m, respectively.Figure 4 shows the complete scheduling scheme of the DS-PIVR and DS-RH methods for the whole Boston PBS under the given initial inventory rate setting.The DS-PIVR method can at most shorten the routing distance of the repositioning vehicle by up to 36.55%, and the total routing distance of the system can be reduced by 18.59%, compared to the DS-RH method (see Table 4).The scheduling route of DS-PIVR scheme is: 0→150→65→31→24→192→22→0; and that of DS-RH scheme is: 0→150→31→192→22→0→65→0→24→0.
Figure 4 shows the complete scheduling scheme of the DS-PIVR and DS-RH methods for the whole Boston PBS under the given initial inventory rate setting.The DS-PIVR method can at most shorten the routing distance of the repositioning vehicle by up to 36.55%, and the total routing distance of the system can be reduced by 18.59%, compared to the DS-RH method (see Table 4).Figure 4 shows the complete scheduling scheme of the DS-PIVR and DS-RH methods for the whole Boston PBS under the given initial inventory rate setting.The DS-PIVR method can at most shorten the routing distance of the repositioning vehicle by up to 36.55%, and the total routing distance of the system can be reduced by 18.59%, compared to the DS-RH method (see Table 4).To comprehensively validate the DS-PIVR method, we employ the validation process of previous works [13,27,28,35,36], and numerically generate 50 independent settings for each station of Boston PBS and Washington D.C. PBS, respectively.Table 5 summarizes our computational results for Boston and Washington D.C. PBSs.Compared to DS-RH method, the best found MIP solution of the DS-PIVR method among all scheduling areas can shorten the routing distance of the repositioning vehicle by 62.25% (for Boston) and 74.7% (for Washington D.C.), and the best found MIP solution for the whole PBS can shorten the total routing distance by 21.06% (for Boston) and 17.26% (for Washington D.C.).In addition, 17 settings for Boston and 14 settings for Washington D.C. (out of 50) did not yield an MIP solution for the DS-PIVR method or DS-RH method.

Discussion
This paper proposes a dynamic scheduling method based on the predicted inventory variation rate for the rebalancing of a PBS.The bicycle station is regarded as an inventory system.The rebalancing demand of the stations and the scheduling route of the repositioning vehicle are considered simultaneously.Based on the historical trip data and the theory of the stationary Markov process, the inventory variation rate of each station during the whole scheduling period is predicted.The station inventory rate at the end of the scheduling period and the latest arrival time constraint for each station are calculated.The routing distance of the repositioning vehicle is set as the objective function, and the binary nonlinear MIP model is solved to obtain an optimized scheduling scheme.The results prove that the proposed method significantly improves the scheduling efficiency and reduces the scheduling cost, compared to the DS-RH method.The scheduling scheme generated by the proposed method ensures that the repositioning of the vehicles make the journey only once to keep all stations rebalanced for each given area.Furthermore, the DS-PIVR method is applicable to the dynamic scheduling situation during daily rush hours and can be used as a promising reference for the public bicycle operators to obtain a reasonable scheduling scheme.
Meanwhile, in the proposed model, the inventory variation rate in a scheduling period is predicted based on the historical operation data.The accuracy of the prediction will be determined by the selection of the prediction model.Therefore, how to select a more accurate and more adaptable prediction model is a good question to make the DS-PIVR method more practical.
The proposed model takes the area division as a precondition, which is originated from two considerations.On the one hand, for the bicycle dispatchers, the constant scheduling area is the more reasonable and operable task.If the scheduling area varies by time, then the bicycle dispatchers have to pay more attention to be familiar with the routes and the area, which will increase the complexity and decrease the efficiency of dispatching process.On the other hand, the scheduling area is independent with each other, i.e., the scheduling vehicle can only cruise in its assigned area.The purpose is to ensure that the scheduling scheme meets the scheduling requirements with time constraints and operability.Therefore, how to divide the scheduling areas simultaneously meeting the variation of scheduling requirements in a different scheduling period and keeping the operability for the practitioners is one of the important future works.
The compilation of the scheduling scheme includes a VRP solution process.To simplify the whole rebalancing problem, the traffic condition on the roads was not taken into consideration in the proposed model.Considering the traffic condition, and even considering the real-time traffic condition via an intelligent transport system, will improve the practicability of the proposed model a lot.
Furthermore, to our knowledge, there are two more future directions to extend our work.One is to take the state before the current scheduling period into consideration to improve the accuracy of the prediction procedure.The other is to remove the constant assumption about the inventory variation rate during the scheduling period, which will make the future works more practical for the real PBS.Both of them will provide a promising way to reduce the scheduling cost further, and improve the quality of the service (QoS) of a real PBS.

Conclusions
Based on the predicted inventory variation rate, a dynamic scheduling method called a DS-PIVR method for the rebalancing of a PBS is proposed.Results of extensive experiments prove that the proposed method could at most shorten the routing distance by 62.25% (for Boston) and 74.7% (for Washington D.C.) among all scheduling areas, and could at most shorten the total routing distance for the whole PBS by 21.06% (for Boston) and 17.26% (for Washington D.C.).It is believed that the DS-PIVR method provides a promising reference to improve the operation efficiency by reducing the scheduling cost and the quality of the service by satisfying the users' demand in time during the rush hours for the PBS operating companies.

Figure 1 .
Figure 1.Generating process of scheduling scheme.

Figure 2 .
Figure 2. The results of the scheduling area division.The number in the figure is the area ID.

Figure 2 .
Figure 2. The results of the scheduling area division.The number in the figure is the area ID.

Table 2
lists related station information of the 17 scheduling areas.

Table 2 .
Station information of 17 scheduling areas.

Table 3 .
Status of stations in Area #3 before rebalancing.

Table 4 .
Comparison of scheduling schemes.

Table 4 .
Comparison of scheduling schemes.

Table 5 .
Results for Boston and Washington D.C. PBSs.