Flexible Bus Route Setting and Scheduling Optimization Adapted to Spatial-temporal Variation of Passenger Flow

find the optimal route, and a simulation that the transport and scheduling adapted to the spatial-temporal


Introduction
With the gradual expansion of cities in recent years, people's demand for transport has also increased, (1) while public transport systems generally have problems such as insufficient carrying capacity and low attractiveness. The priority of public transport in resident's travel choices is not high, and the share of public transport among motorized travels in most cities throughout China is less than 40%. As a consequence, multiple modes of public transportation services are provided to meet resident's multiple travel needs, which is the key factor to achieving the strategic goal of increasing the use of public transport. In the case of high-density passenger flow, the traditional bus operation is better, but in the case of low-density passenger flow, there are problems such as the mismatch between capacity and demand. (2)(3)(4) With the rapid development of the Internet of Things, the mobile Internet, and other modern information technologies, as well as the popularization of smart phones, a flexible public transport system has developed rapidly to meet the needs of society. (5) A flexible public transport system belongs to the category of responsive public transport, which has existed for about 30 years in foreign countries, but started late in China, with only a few systems such as DIDI dynamic public transport. Cortés and Jayakrishnan first proposed the concept of flexible public transport, arguing that it can transfer passengers to and from any place according to their real-time needs, and they used a simulation-based system to carry out feasibility analysis. (6) Some research results of the design and scheduling algorithms of flexible public transport systems at home and abroad are as follows: (1) in terms of system design, Redmond and Mokhtarian proposed a responsive public transport system with control stops and concluded that the conventional public transportation is suitable for high-density passenger flow, while a "door-to-door" service is suitable for low-density passenger flow. (7) (2) In terms of scheduling algorithms, Nourbakhsh and Ouyang established a model for minimizing the system cost in an area with low-density passenger flow, and proposed a flexible path selection method. (8) Hu and Wu proposed a responsive park bus transport mode suitable for China and established a real-time scheduling analysis model. (9) Wei and Zhou established a model that takes into consideration the walking time, stop waiting time, and riding time of travelers to deduce the passenger flow that can be adopted in the flexible operation mode of public transport. (10) On the whole, research on flexible public transport nowadays mainly focuses on the design of stop lines and vehicle scheduling models both in China and abroad, (11,12) and there is little research on the dynamic adjustment of flexible public bus routes through the acquisition and use of passenger information in real time. In this paper, we propose a flexible public transport system that adapts to the spatial-temporal changes in passenger flow, which obtains passenger information in real time through the automatic sensing of the Internet of Things and requests of passengers, (13) and extracts the characteristics of passenger origination destination (OD) and temporal-spatial distributions. On the basis of this system, the stopping strategy of bus stops is formulated, a flexible public bus route is set up, the scheduling strategy of subsection scheduling and priority to unresponsive passengers in the front vehicle is adopted, and an optimal scheduling model is established from the three aspects of total passenger income, the interference loss of existing passengers, and the operation cost of the enterprise to improve the operation efficiency and attractiveness of flexible public transport. Our proposed system provides the basis for the application and promotion of further flexible public transport.

Definition and classification of flexible public transport system
Different from the traditional public transport scheduling mode that must run on fixed points, fixed routes and shifts regardless of the passenger flow, a flexible public transport scheduling mode does not strictly follow a timetable or travel along a fixed path, but determines the running time of the bus according to the real-time demand of passengers and optimizes the driving route. Bakas et al. classified flexible public transport services into six categories according to the degree of freedom of the bus service: variable-route bus services, variablestop bus services, demand-responsive bus feeder services, site-demand-responsive bus services, partial variable-route bus services, and area variable-route bus services. (14) Considering the actual operation of domestic public transport, the flexible public transport system proposed in this paper adopts the variable-stop operation mode, setting up a number of fixed stops in the flexible public transport service area (determined by the passenger flow at the stop and changing at any time) and a number of reservation stops. Vehicles can dynamically respond to requests in real time in the service area.

Composition of flexible public transport system
The flexible public transport system adapted to the spatial-temporal variation of passenger flow is mainly composed of four parts: public transport vehicles, bus stops, passengers, and an operation management center. Internet of Things nodes supporting a low-power Bluetooth protocol standard (version 4.0 and above) and intelligent terminals supporting a mobile network and Bluetooth protocol are configured in the vehicles (15) so as to obtain and upload vehicle location information, passenger information, and received scheduling instructions. The Internet of Things nodes supporting a low-power Bluetooth protocol standard are configured in bus stops to obtain passenger information. Also, an electronic information board and real-time reservation buttons are installed to provide arrival bus information and real-time reservation services according to the passenger flow and demand from bus stops, respectively. The operation management center executes the real-time calculation of the optimal path and the rapid dynamic allocation of public transport resources so as to form the optimal scheduling scheme for the public transport operation. Information is transmitted by Bluetooth shortdistance communication between passengers, buses, and bus stops (using a bus trip app); it is transmitted by mobile network remote communication between buses, stops, passengers, and the backstage system; and it is transmitted by the Internet or a local area network (LAN) between the backstage system data center and the operation management center. The overall technical framework of the system is shown in Fig. 1.

Collection of information of spatial-temporal distribution of passenger flow
For a traditional bus system, the passenger flow of a stop is mainly analyzed on the basis of IC card swipe data and bus GPS positioning data. The flexible public transport system proposed in this paper uses the response mode based on requests from passengers and the automatic induction mode based on the Internet of Things to obtain the spatial-temporal distribution of the passenger flow in real time and allocate public transport capacity according to passenger demand. (16) The response mode based on requests from passengers is realized in two ways: mobile app reservation and platform button real-time reservation. The automatic induction mode based on the Internet of Things acquires passenger real-time information through automatic induction in Bluetooth. The specific steps are as follows: (1) Passenger waiting information acquisition: the Internet of Things node of bus stop obtains passenger information through Bluetooth and sends it to the backstage system and the data center through the mobile communication network, in which the backstage system marks the passenger as the "waiting" state. (2) Passenger riding information acquisition: the Internet of Things node obtains passenger information through Bluetooth and sends it to the backstage system and data center through the mobile communication network, in which the backstage system cancels the waiting state of the passenger and marks the passenger as the "riding" state. (3) Passenger arrival information acquisition: after the passenger arrives at the destination stop, the destination Internet of Things node obtains the passenger information through Bluetooth and sends it to the backstage system and data center through the mobile communication network, in which the backstage system marks the passenger as the "debarkation" state, and the trip ends. The process is displayed in Fig. 2.

Flexible bus route set on the basis of passenger spatial-temporal distribution
The passenger OD information obtained by the flexible public transport system is used to analyze the passenger flow at different time periods and stops. According to the passenger flow of the flexible bus routes and stops, the stops are divided into these with high-density passenger flow and low-density passenger flow. In accordance with the stopping strategy, they are then divided into fixed and reservation stops.
(1) High-density passenger flow stops are those where the total number of passengers boarding and debarking in a unit time (1 h) is greater than or equal to a given threshold. A highdensity passenger flow stop is a dynamic stop. A certain site may be a high-density stop in certain time periods and a low-density stop in other periods. It changes with the spatialtemporal distribution of the passenger flow and is classified as a fixed stop. (2) Low-density passenger flow stops are those where the total number of passengers boarding and debarking within a unit time (1 h) is lower than the given threshold. A low-density passenger flow stop is also a dynamic stop. A certain site may be a low-density stop in certain time periods and a high-density stop in other periods. It changes with the spatialtemporal distribution of the passenger flow and is classified as a reservation stop.

Description of problem
The research problems in this paper are described as follows: in the case of low-density passenger flow, the dynamic information of passengers can be obtained in real time through the response mode of the requests from passengers and the automatic sensing mode of the Internet of Things, the stopping strategy can be formulated, and a flexible bus route can be set up according to the passenger flow of the flexible bus route stops. To improve the operation efficiency and passenger satisfaction, it is necessary to improve the efficiency of the vehicle response to dynamic requests and reduce the frequency of buses refusing to take passengers.

Model assumptions
Before constructing the flexible public transport dynamic scheduling model, the relevant issues need to be defined. The following assumptions are made in this paper: (1) Since flexible public transport mainly provides services in periods or areas of low passenger density and the constraint of the capacity is not obvious, it can be assumed that the vehicle capacity of a flexible public transport system is not constrained. (2) In this paper, only the flexible scheduling of a bus route is studied. When the vehicle cannot respond to a passenger's request at a reservation stop and the next vehicle responds, the passenger waiting time will be increased by the departure interval. If the next bus does not respond, the passenger is assumed to leave the stop. (3) In traffic volume forecasting and economic evaluation, the value of waiting time is higher than that of riding time. At present, the general practice is to calculate the value of waiting time as twice the value of riding time in the vehicle. (18) It is assumed that, in a complete trip, the ratio of the walking time, riding time, and waiting time values is 1:1:2 and the time values of all the passengers are equal. (4) Except when reservation passengers are added by the flexible public transport strategy, the OD of the passenger flow remains unchanged and the requests that have occurred during the arrival of new real-time requests are not canceled. (5) A single direction of travel mode is adopted in this paper, i.e., each stop is passed only once.
During the operation, "turn around" to pick up passengers again is not allowed. The vehicles stop at each stop for the same time and travel at a uniform speed throughout the area. No traveling beyond the stop or overtaking is allowed. (6) To reflect the real-time capability, the passenger request times at different reservation stops are calculated according to the actual arrival times of passengers, but there may be several passengers at each reservation stop having real-time travel requests. To simplify the model, it is assumed that several passenger requests at one reservation stop are sent simultaneously.

Modeling concepts
At present, the main research objects of the flexible public transport scheduling model in China and abroad are single-vehicle and two-vehicle services. The maximum waiting time of passengers is not considered in the vehicle scheduling process. In the actual operation process of flexible public transport, a long waiting time will cause the loss of passengers, and passengers whose requests were refused by the previous vehicle must be given priority. Therefore, the bus stops with preceding refusals are set as must-stop stops. Owing to the random distribution of dynamic requests in a road network, the journey of a bus to a distant passenger point will change with the occurrence of other dynamic requests. As a result, the bus route can be segmented into sub-service areas according to the longest waiting time of passengers and the spatial-temporal distribution characteristics of the stop, and the sub-service area is used as the unit for the segmentation in scheduling. The reduction in scheduling scope decreases the emergence of random dynamic requests and improves the efficiency of responding to dynamic requests. Buses update the passenger requests in the service area before entering each sub-service area. At this time, the sub-service area includes fixed stops, stops with preceding refusals, and new reservation stops. This paper mainly establishes the optimized scheduling model from three aspects of total passenger revenue, the interference loss of existing passengers, and the operating cost of the enterprise, and formulates the final driving routes in sub-service areas.

Model parameters
The road network covered by the flexible public transport sub-service areas and all stops together form a directed graph (with up and down directions): G = (V, E), where G is the set of routes, the vertex set V = {V i |i = 1, …, n} represents all the stops, and the arc set

Segment dynamic scheduling model giving priority to passengers with request refused by preceding vehicle
To improve the attractiveness of flexible public transport, the total passenger revenue is treated as the first objective, the second objective is to minimize the interference to other passengers in the system, and the third objective is to minimize the total cost after the adjustment of the operation plan. The multiobjective optimization scheduling model is established from three aspects: the total passenger income, the interference loss of existing passengers, and the operation cost of the enterprise, so as to determine whether the passengers at newly added reservation stops are served.
(1) The total passenger revenue E S includes the revenue generated by responding to passengers and the penalty for refusing passengers: (a) the total revenue of passenger fare; (b) the time value saved by passengers at newly added reservation stops by not having to walk to a fixed stop; (c) the penalty for the refusal of passengers at newly added reservation stops, which is the time value lost by being refused and having to take the next bus. The expression for E S is (2) The interference loss of existing passengers T R includes the value of the extra travel time of the in-vehicle passengers due to detours and the value of the extra waiting time of passengers at must-stop stops due to detours. T R is expressed as (3) The expression for the total operation cost of the enterprise C S is In summary, the multiobjective optimization dynamic scheduling model of flexible public transport can be expressed as In the above model, Eqs. (4)-(6) are the objective functions of the maximum benefits of the system. Equation (4) corresponds to the first objective of the flexible public transport to increase the number of passengers, Eq. (5) to the second objective of maximizing the service level of the public transport system, and Eq. (6) to the third objective of minimizing the operation cost. Equations (7)-(10) are constraint conditions. Equation (7) means that the total number of passengers in a vehicle does not exceed the rated passenger capacity when responding to passenger demand at a reservation stop. Equation (8) means that the vehicle travels from starting point 1 to end point n and must pass through each fixed stop in the service area. Equation (9) means that the vehicle selectively parks at the newly added reservation stops in the service area, and Eq. (10) indicates that the vehicle is not allowed to retrace its steps.

Model solution
To maximize the overall revenue of the bus operation, it is necessary to maximize E S by serving as many newly added passengers as possible, but this will lead to a loss due to the interference of existing passengers in the system T R and an increase in the bus operation cost C S . It can be seen that the flexible public transport dynamic scheduling model is a multiobjective optimization model, the objective functions are mutually exclusive, and the model is not a unique solution but an optimal solution. In this paper, the analytic hierarchy process (AHP) is used to determine the weights of the three objectives, W 1 , W 2 , and W 3 (which are equal by default without assignment), and the multiobjective problem is transformed into a singleobjective problem. Then, the total system revenue T V generated by each one-way operation of the vehicle in a sub-service area is expressed as The genetic algorithm is used to solve the above model. The flow process is as follows: (1) Coding: When a vehicle enters a sub-service area, the stops in the sub-service area are divided into must-stop stops and newly added reservation stops. Z ij is a binary variable indicating whether the vehicle travels from stop i to stop j. When L ij = 1, Z ij may take a value of 1, otherwise it is 0. Therefore, binary coding can be used to find a solution and the solution is the sparse matrix consisting of n 2 0-1 variables between the stops. (2) Initial population: To prevent the randomly generated population from generating a large number of unfeasible solutions, when setting the initial population, the position of a muststop stop is set to 1 and the locations of other reservation stops are randomly generated. A random 0-1 matrix is generated according to the number of the population and the number of coding bits. (3) Adaptability evaluation: To decode an individual coding string to obtain the individual phenotype, the corresponding overall passenger revenue E S based on the individual phenotype is calculated. The flexible bus system aims to increase the attractiveness of public transport and the number of passengers. Therefore, the degree of adaptability of an individual can be directly taken as F i = E S . (4) Selection of operation: With the roulette selection method, the greater the overall passenger revenue, the greater the probability that the individual will be selected. (5) Crossover operation: The multipoint crossing method is used for binary coding to carry out the crossing-over and recombination. The crossing-over rate is set to 0.8, and two gene locations are randomly selected for the crossing-over operation to generate the latest individual. (6) Mutation operation: the decision variables are mutated by randomly exchanging the values of two genes in the chromosome, and the mutation probability is set to 0.08. (7) Determination of the optimal solution and termination conditions: The optimal solution can be obtained within a given operation with a maximum of 600 iterations or the condition of termination is obtained when the predetermined maximum number of iterations of 600 is reached. The best individual in the group is taken as the optimal solution or the best individual is selected as the satisfactory solution. If there are multiple solutions, the most reasonable solution can be selected according to the actual situation.

Case Study
According to the flexible bus route setting and optimized scheduling model, a flexible bus route is selected and combined with Guangzhou's road network, the urban functional layout, the spatial-temporal distribution of residents' travels, and so forth, and relevant parameters are set to verify the validity of the model through simulation experiments.

Introduction to the flexible bus routes
The No. 214 bus in Guangzhou, which connects Xintang Town in Zengcheng District of Eastern Guangzhou and Tianhe Business Center, meets the work and transfer needs of Xintang residents. The passenger flow at both ends of the route is large, and the passenger flow at intermediate stops is smaller during the off-peak period. Therefore, the flexible public transport mode in this paper is considered for its operation. The relevant operation data of the No. 214 bus are as follows: the route length L is 37.6 km, the number of stops is 30, and the operation time is from 6:00 a.m. to 9:30 p.m. Details of the route and stops are shown in Fig. 4 and Table 1, respectively, and the detailed parameters are shown in Table 2.

Setting of the flexible bus route
On the basis of our experience, assuming that the threshold of passenger flow is 20 persontimes/h (19) and taking the non-peak period of 10:00-16:00 where there is small passenger flow in the up direction of the No. 214 bus as the operation period of the flexible public transport in the simulation, the stops with high-density and low-density passenger flow are distinguished by the flexible bus route setting method. Virtual stops are randomly generated in the actual road network.
An excessively long vehicle by-pass time will reduce the satisfaction of passengers and increase the operating cost of the enterprise. Therefore, it is necessary to set the maximum bypass time of the vehicle in one-direction driving as T allow , where the maximum by-pass time is the difference between the maximum travel time T max and the minimum travel time T min . According to our survey, the maximum acceptable by-pass time for passengers is 20 min, and the average passenger-carrying time for each stop, T pass , is 0.75 min. The minimum and maximum travel times for the vehicle traveling in one direction can be expressed as 102.9 (min).
max min allow Assuming that the longest waiting time of passengers is 20 min, (20) and according to the spatial-temporal distribution of the passenger flow at bus stops, the whole bus route is divided into five segments and five sub-service areas for segment scheduling. Vehicles are dynamically scheduled according to the fixed stops in the sub-service area, the stops with passengers rejected by the preceding bus, and the newly added reservation stops.

Analysis of experimental results
In this paper, an arrival situation of passengers that obeys the Poisson distribution is randomly generated by a MATLAB program. The Poisson parameter λ is 0.8, and the final operation path of buses is solved by the genetic algorithm. Ten simulation experiments are carried out to obtain the number of stops, operation time, the number of passengers served, operating income, cost, and other indicators of the three operation modes of traditional public transport, conventional flexible public transport, and the proposed flexible public transport, which can be seen in the following chart. In Table 3, the traditional public transport, conventional flexible public transport, and proposed flexible public transport are denoted by letters A-C, respectively. The results of comparison between the three operation modes are shown in Table 4 and Figs. 5-8. In summary, the number of passengers and operating income of flexible buses have increased significantly owing to the setting of virtual stops for flexible buses. Compared with the stop-by-stop mode of traditional buses, the driving mileage and operating cost are   reduced. As a result, it is more effective to operate flexible buses during off-peak hours, and reflecting the spatial-temporal change of passenger flow in the classification setting of bus stops further improves the operating efficiency. In terms of vehicle scheduling, priority is given to passengers who have not received a response from the previous bus. The segmentation scheduling strategy is used to improve the efficiency of responding to dynamic requests, which reduces the loss of passengers caused by the long waiting time of the conventional flexible bus. The revenue-to-expenditure ratio of the flexible bus that adapts to the spatial-temporal variation of the passenger flow is determined to be 16.6 and 52.1% higher than those of the conventional flexible and traditional buses respectively, and the operation is more efficient.

Conclusion
Using modern information technologies such as the Internet of Things, mobile Internet and Bluetooth communication, the real-time dynamic information of passengers was obtained, and the characteristics of the passenger OD and their spatial-temporal distributions were extracted through two modes: the Internet of Things automatic sensing and requests from passengers. On this basis, a bus stop strategy was formulated, a flexible bus route was set up, and segmentation scheduling and priority to passengers not picked up by the previous vehicle were introduced. By considering the total revenue of passengers, the interference loss of existing passengers, and the operation cost of the enterprise, an optimal scheduling model was established. The genetic algorithm was used for its solution, which guarantees the feasibility of flexible bus scheduling. Finally, a simulation analysis was carried out by considering the No. 214 bus in Guangzhou. The results show that the flexible public transport system adapted to the spatial-temporal variation of passenger flow has the advantages of offering a service to more passengers, stopping at less stops, and having a shorter operation time, and not only meets the needs for convenient and rapid travel of passengers, but also reduces the operation cost of public transport. It is an effective way to solve the problem of providing a public transport service in the case of low-density passenger flow and merits widespread adoption.