Flexible Bus Route Optimization for Multitarget Stations

. This paper proposes a ﬂexible bus route optimization model for eﬃcient public city transportation systems based on multitarget stations. The model considers passenger demands, vehicle capacities, and transportation network and aims to solve the optimal route, minimizing the vehicles’ running time and the passengers’ travel time. A heuristic algorithm based on a gravity model is introduced to solve this NP-hard optimization problem. Simulation studies verify the eﬀectiveness and practicality of the proposed model and algorithm. The results show that the total number of vehicles needed to complete the service is 17–21, the average travel time of each vehicle is 24.59 minutes, the solving time of 100 sets of data is within 25 seconds, and the average calculation time is 12.04 seconds. It can be seen that under the premise of real-time adjustment of connection planning time, the optimization model can satisfy the passenger’s dynamic demand to a greater extent, and eﬀectively reduce the planning path error, shorten the distance and travel time of passengers, and the result is better than that of the ﬂexible bus scheduling model which ignores the change of connection travel time.


Introduction
e concept of a flexible bus service system was originally proposed in 1976 by Flusberg M [1]. Koffman [2] classified flexible bus service systems for the first time in terms of line offsets, station offsets, demand response shuttles, demand response stations, section flexible buses, and regional flexible buses services. Although referred to the flexible bus service system, its plans, designs, and operations were more complex than the fixed one, it has not yet been used worldwide.
Currently, there are relatively few research studies on flexible bus service systems especially on multiple flexible stations corresponding to one target station. By constructing a model [3,4], the relationships between key parameters such as slack time [5], departure interval, and several bus routes are analyzed. For example, Lu et al. [6] proposed a three-stage model to find the nearest vehicle to serve passenger demands when many buses are operating in the target service area. e multibus route optimization scheme proposed by Liu and Yang [7] is based on a mixed integer programming model. Considering the space and time requirements of passengers to reach the central rail or bus station, the optimal bus service is determined. Pillac et al. [8] defined the concept of dynamic routes, solved the vehicle dynamic path problem, and obtained the optimal route. Based on the heuristic algorithm of an improved gravity model, Pan et al. [9] established a flexible bus route optimization and collaborative scheduling model to solve the single objective bus service problem. Alonso-Mora et al. [10] focused on dynamic high-capacity carpooling and designed many-to-one, flexible bus demand response strategies based on vehicle-demand analysis. Motivated by emerging transportation technologies and business modes, researchers devoted their efforts to a wide range of innovative mobility studies of the "many-to-one" mode, such as flexing service schedules for demand-adaptive hybrid transit [11], flexible mobility on demand transportation systems [12,13], roundtrip car-sharing systems [14], and autonomous vehicle-sharing and reservation systems [15]. All the flexible bus connection modes involved in the above research studies are in the form of "many-to-one", that is, multiple flexible stations corresponding to one target station. e case of multiple flexible sites corresponding to multiple target sites (the "many-to-many" pattern) has not been studied.
To address both practical and theoretical challenges, this paper proposes an optimal flexible bus route scheduling model for multiobjective stations and considers the problem of station allocation in the route planning.

Flexible Bus System
Requirements under "Many-to-Many" Demand Mode. e flexible bus system is a demand-based transportation system, which can collect the travel needs of individual passengers and provide personalized transportation service [16,17]. Compared with "many-to-one" bus feeder mode flexible bus system studied in Pan et al. [18] and Pan [19], the "many-to-many" mode studied in this paper has many merits and more flexibility. Its model construction and parameter selection need to consider various factors, such as passenger demand and operating cost.
In this study, we focus on reducing operating costs of the vehicle operation enterprises and the time cost of passengers and improving the service quality of flexible bus systems. en, we analyze the parameters and decision variables under the "many-to-many" condition (i.e., multiple flexible stations corresponding to multiple target sites), construct the objective function, and set boundary conditions to solve flexible bus route optimization problems for "many-to-many" modes.

Model Assumption.
e following assumptions are made for the establishment of the proposed model: (1) e location of each station and the requirements of passenger reservation are all known (2) After reservation, the time of each passenger intends to reach the target station is known (3) e service time for passengers arriving at the station is constant (4) e travel time for all shuttle bus traveling between the stations is known (5) e capacity of the shuttle bus is known

Model Parameter.
e definitions and descriptions of the model inputs and decision variables involved in the model are shown in Table 1.

Model Representation.
To reduce operating costs of the vehicle operation enterprises and the time cost of passengers and improve the service quality of flexible bus systems, in this study, we chose vehicle operating time, passenger waiting time before boarding, and the difference between the actual and the expected arrival time of passengers as the main decision variables. en, the scheduling optimization model needs to solve a nonlinear programming problem, as shown in equation (1), which should minimize the sum of the three decision variables, including vehicle operating time, passenger waiting time before boarding, and the difference between the actual and the expected arrival time of passengers: min i∈H∪D j∈H∪D k∈K Equation (1) is the objective function. Within it, i∈H∪D j∈H∪D k∈K c ij Y ijk represents vehicle operating time, a r represents passenger waiting time before boarding, and r∈R k∈K t (X rkt T t − e r ) represents the difference between the actual and the expected arrival time of passengers. e boundary conditions are as follows: j∈H∪D k∈K i∈H k∈K i∈H j∈D i∈H j∈D r∈R t∈T k∈K t∈T r∈R k∈K t∈t Constraints (2) and (3) indicate that for any demand point, at least one bus is available for service and at most V bus is available. Constraint (4) ensures that at most v vehicles participate in operation services. Constraint (5) indicates that except the first demand point of each vehicle, for every other demand point being serviced, the number of entering vehicles should be equal to the ones that are driven out. Constraint (6) is to avoid loops in the driving path. Constraints (7) and (8) ensure that every passenger will be transported to the final destination. Constraint (9) ensures that the capacity of each shuttle bus will not overtake its rated capacity to guarantee service levels. Constraint (10) indicates that any demand can only be served by one bus. Constraint (11) indicates that a shuttle bus can only serve a passenger at a departure time of a target station. Constraint (12) guarantees all demand serviced equal to the known amount of reservation required. Constraints (13) and (14) indicate that if two stations are serviced by a transfer vehicle, the arrival time of the demand in the next station should be equal to the sum of the arrival time of the demand in the last demand point and the travel times between two demand points. Constraints (15) and (16) indicate that the time of the passenger at the last demand station of the shuttle bus arriving at the target station should be equal to the time that the vehicle reached the demand point and the travel time between the two demand points. Constraint (17) ensures that the time of vehicle arriving at the target station is not later than the departure time.

Model Solving
e flexible bus route optimization scheduling problem for multitarget stations proposed in this paper is an NP-hard problem. Compared with the "many-to-one" shuttle bus mode, the burden of computation will increase exponentially as the scale of the problem expands. erefore, this type of problem is usually solved by heuristic algorithms that can guarantee both computation speed and accuracy. In this paper, a heuristic algorithm based on a gravity model is proposed. Firstly, a superior initial solution is generated based on the gravity model, then the optimization algorithm between routes and within routes is used to improve the route, respectively, and then the final route is obtained. e specific steps are as follows.

Passenger Travel Reservation and Demand Distribution.
First, the passenger travel reservation and demand distribution are completed as follows: Step 1: passengers make a travel appointment according to their travel needs. Each passenger transmits their information, such as the departure station, the target station, and the time expected to arrive, to the travel reservation platform.
Step 2: the travel reservation platform clusters all passengers based on the target station and the expected arriving time of each passenger, according to the principle that the actual arrival time is not later than the passenger's expectation.
Step 3: according to the path generation results in 2.2 and 2.3, combined with the arrival time of the shuttle bus, the average driving speed, the location of the passenger demand point, the number of passengers at each demand point, etc., the initial arrival time of shuttle bus at each demand point is estimated.
Step 4: the initially estimated time of shuttle bus arriving at the demand point is sent to the passenger at the corresponding point, and the passenger will select whether to ride according to the rationality based on the arrival time of shuttle bus.

Generate Initial Vehicle Path Solution Based on Gravity
Model. Based on the gravity model, the path search problem is transformed into a station selection iteration problem that is most attractive to the current station, so as to generate a feasible initial vehicle path solution. e gravitation between the two stations is defined as follows: N i is the number of passengers at the station i and c ij is the travel time between station i and station j. If the value of F ij is large, the two stations have a large number of passengers and a small travel cost, which requires priority service, and the station j needs to be set to the next station of station i.
In case a rated passenger capacity is known, the gravity model algorithm generates the initial path solution as follows: Step 1: determine the vehicle departure station. First, k � 1, from the station with passengers on board, randomly picks one as the starting point for the vehicle.
Step 2: judge whether there are still similar passengers who not served. If yes, skip to Step 3; otherwise, Step 5.
Step 3: search for the next station. In the boarding station with similar passengers, find the station X that is most attractive to the current station, try to drive in the station X into the route selection chain, calculate the number of passengers after the vehicle joins the station, and the time to reach the target station directly after joining the station X.
Step 4: judge whether the route of the vehicle is reasonable after joining the station X. If the current number of passengers served by the vehicle does not overtake the capacity Q k and the time to reach the target station does not overtake the time required by the passenger, take the station X as a new starting point and skip to Step 3; otherwise, Step 5.
Step 5: judge whether all passengers are scheduled to serve. If there are still passengers not scheduled, dispatch the next bus, k � k + 1 and jump to Step 1; otherwise, output all current initial paths and end the initial vehicle path solution generation algorithm based on the gravity model.

Vehicle Path Optimization Based on Station Equalization and Exchange.
is section describes the path optimization algorithms between routes and within routes.
Step 1 and Step 2 of the following algorithms all belong to the optimization between vehicle paths. During execution of Step 1 and Step 2, multigroups of feasible solutions may be searched. If only the current optimal set of solutions is saved during the search, then Step 3 is executed, and the final route result may not be optimal. erefore, the algorithm will save all feasible solutions found by Step 1 and Step 2 and execute Step 3 for each feasible solution. Finally, review the objective functions of all route groups to find the final optimal solution.
Step 1: First, the number of stations is balanced between vehicles that the time to serve the target station is equal to the time to reach the target station. Check if there is a gap between the number of vehicle service stations. If so, the number of stations on different routes will be balanced, and then the number of stations will be reasonably arranged on the premise for meeting the requirements of bus capacity and arrival time serve the target station is equal to the time to reach the target station. Check if there is a gap between the number of vehicle service stations. If so, the number of stations on different routes will be balanced, and then the number of stations will be reasonably arranged on the premise for meeting the requirements of bus capacity and arrival time.
Step 2: try to optimize the path between vehicles that the time to serve the target station is equal to the time to reach the target station. It mainly uses the way of exchanging stations between two routes to search for better routes. Guarantee to meet the vehicle capacity and time to reach the target station.
Step 3: it is the internal optimization for each bus route. Mainly in the same vehicle route, try to exchange the order of the two stations and evaluate whether the value of the objective function is reduced. Only if it is reduced, the station order is updated. After iterating a number of times, terminate the algorithm and output the final route result.
After the abovementioned steps, it is ensured that passengers arrive at the target station as expected, the objective function of the model is optimized, the service time is shortened, the route of each vehicle is more reasonable, the operating cost is reduced, and the passenger's waiting time is reduced.
e parameters of the model are shown in Tables 2-4. Some input parameters of constant variables are given in Table 2. e passenger travel demands in all stations are listed in Table 3, and the travel time between each station is listed in Table 4 in the form of a matrix, where H is the demand point and D is the target station. e case is solved by using the heuristic algorithm proposed in this paper. e service path of each vehicle, the number of service passengers, and the objective function of each path are shown in Table 5. 90 travel demands are all serviced, and the time for all passengers arriving at target stations meet the expectation. e schematic diagram of vehicle routing results are shown in Figure 1.
To further verify the reliability of the algorithm, keep the existing constants and the network travel time matrix (i.e., Table 3) unchanged, test 90 travel demands in 100 sets of randomly generated 30 demand points.
e results show that, under the given conditions, all the 90 travel demands will be served, the number of service vehicles is 17-21, 84% of the total travel time of the vehicles is 400-500 minutes, and the average travel time per vehicle is 24.59 minutes. e test results are shown in Figures 1, 3, and 4.
As shown in Figure 2, the travel time of the vehicle solved by the heuristic algorithm is stable. Even if there is a large uncertainty in the demand distribution, thanks to the robustness of the proposed model and algorithm, the final result is still reliable. Figure 3 shows that a major part of the total objective function value affected by the demand change is concentrated between 2600 and 2900. At the same time, it can be seen from Figure 4 that the solution time of all 100 sets of data is less than 25 seconds, and the average computation time is 12.04 seconds, which makes the proposed algorithm apply to the actual system, and vehicle path optimization and collaborative scheduling can be completed within a reasonably short time window for appointments and services.  corresponding to the path  1  13-7-6-1-2-3-D 1  1-1-1-1-1-1  35  104  2  4-8-12-5-D 1  1-1-1-1  35  93  3 14

Conclusion
In this paper, a flexible bus route optimization scheduling model for multitarget stations problem is studied, and a path planning and coordination scheduling model is established to minimize the sum of vehicle operating time, passenger waiting time before boarding, and the difference between the actual and the expected arrival time of passengers. Also, this paper proposes a heuristic algorithm based on a gravity model to effectively solve the path optimization scheduling model and is verified by examples. e results show that the model and algorithm can quickly solve the effective and reasonable vehicle service path in the vehicle scheduling process.
Comparing to the studies about "many-to-one" flexible bus system, the "many-to-many" mode studied in this paper has more flexibility and practicability. We selected more parameters in modeling and considered more factors, such as passenger demand and operating cost to make our solution to be more nearing to the reality of the flexible bus system.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
ere are no conflicts of interest regarding the publication of this paper.    Mathematical Problems in Engineering 7