On-demand public transportation system optimization design method oriented to passenger splitting and time window flexibility
Through the adaptive large neighborhood search algorithm and hybrid integer planning model, the driving route and charging plan of electric bus vehicles are optimized, and the problem of inefficient operation of electric bus vehicles is solved, achieving cost reduction and service efficiency improvement.
Patent Information
- Application Number
- CN202510120612.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-25
- Publication Date
- 2025-05-06
AI Technical Summary
The limited range and long charging time of electric buses lead to low operational efficiency. It is necessary to reasonably arrange charging plans under the limited capacity and space limitations of the charging station to improve the efficiency of bus services and reduce operating costs.
By designing an adaptive large neighborhood search algorithm, combining a mixed integer planning model and a time window reverse derivation method, we optimize bus routes and timetables, reduce the total system cost, and efficiently perform optimization in limited fleets and high demand scenarios.
The bus system optimization under the limitations of power grid capacity or charging space has been achieved, reducing operating costs, improving bus service efficiency, and improving passenger satisfaction.
Smart Images

Figure CN119940647A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an on-demand bus system optimization design method for passenger splitting and time window flexibility, and belongs to the field of customized bus service optimization technology. Its core goal is to optimize the overall operational efficiency of the bus system by combining passenger splitting and time window flexibility under an advanced demand response platform. The present invention jointly optimizes bus routes and timetables by establishing a mixed integer programming model to minimize the total system cost. At the same time, a time window reverse derivation method is developed to improve the efficiency of bus timetable construction. In order to meet the passenger pick-up splitting and timetable constraints, a neighborhood search algorithm based on customized operators is designed, which can efficiently perform optimization under limited fleets and high-demand scenarios. Through comparative experiments and large-scale verification, the superiority of the present invention in practical applications has been proved, and it has significant engineering application value. Background Art
[0002] As urban traffic problems become increasingly prominent, electric buses have gradually become the main choice for contemporary urban public transportation. Compared with traditional fuel buses, electric buses have the characteristics of zero emissions, low noise and environmental friendliness, which can effectively improve the urban traffic environment and reduce exhaust emissions. However, the limited mileage and relatively long charging time have brought a series of challenges and problems to the operation and charging scheduling of electric buses. First of all, the range of electric buses is limited, and they need to be charged during operation to ensure normal operation. How to reasonably arrange the charging tasks of electric buses is one of the key issues that need to be solved. Electric buses are mainly charged by charging piles at charging stations, and the charging process often lasts from a few minutes to tens of minutes, which cannot be ignored when making vehicle driving plans. Due to the limitations of grid capacity or charging station space, the number of electric buses that can be charged at the same time is limited. Therefore, it is necessary to consider the time-of-use electricity price policy and arrange the charging plan reasonably under the constraints of grid capacity or charging space. In terms of vehicle scheduling, the limited mileage and time-consuming charging reduce the service efficiency of buses, requiring operators to expand the fleet size to maintain service levels. Considering the high procurement costs of electric buses and the daily idle costs of buses caused by charging and cross-line operation, it is crucial for operators to seek efficient bus driving plans to save related costs.
[0003] Therefore, the vehicle scheduling problem of multiple bus routes and the optimal scheduling of charging plans for charging tasks at the same charging station are the key issues to be solved. Based on the above analysis, the present invention develops a heuristic optimization method for large-scale electric bus operation and charging on the basis of considering the time-of-use electricity price policy: the driving plan of the electric bus is solved by designing an adaptive large neighborhood search algorithm, and the charging plan is optimized based on a group of vehicle driving plans, considering the time-of-use electricity price policy and incomplete charging strategy, and the charging schedule of each charging pile and the start and end time of the charging event are decided, thereby reducing the operating cost of the electric bus system. Summary of the invention
[0004] The technical solution adopted by the present invention is to solve the optimization problem of large-scale electric bus operation and charging plan, including the following contents:
[0005] Step 1: Model building
[0006] The problem is defined in a complete directed graph, where the node set represents different pick-up and drop-off locations, and the arc set represents the routes connecting these nodes; the demand set consists of n demands, and each demand i corresponds to two nodes in the graph, representing the pick-up and drop-off points respectively; in the graph, a stop point, node 0, is also introduced to accommodate buses; thus, the node set includes 2n+1 nodes;
[0007] Each demand i∈I consists of two parts, corresponding to the pick-up node and the drop-off node, where the time window of the pick-up node is directly specified by the passenger when booking online, and the time window of the drop-off node is derived based on the maximum passenger in-vehicle time limit; specifically, the passenger's drop-off time window is determined by the shortest travel time from the pick-up node to the drop-off node and the maximum delay time the passenger endures; in order to meet these constraints, the time window should ensure that the passenger can reach the destination within the scheduled time;
[0008] In addition, the number of passengers for each demand must also be given, and passengers within the same demand must decide whether to accept the split or delayed service. The operator provides different fare discount options; and passengers can choose to accept split and delayed services at the same time, thereby obtaining multiple discounts; after the passenger chooses a discount, the total discount is the combination of various discounts;
[0009] In particular, if demand i is satisfied, the number of passengers for that demand must fully satisfy Qi. If this number is not met, no service for that demand will be provided. At the same time, not all passengers will face delays, and some passengers may be served on multiple trips, so the delays may vary.
[0010] After collecting all the needs, the operator designs the bus fleet's routes and schedules based on these needs; each route starts from the parking lot, passes through multiple pick-up and drop-off nodes, and completes the service at the final stop;
[0011] Minimize total system costs, including line operating costs, time window breach costs, unfulfilled demand costs, and fare revenue; the costs include the operator's perspective including vehicle scheduling and social benefits including service quality and passenger satisfaction;
[0012] To describe the joint optimization model, the variables are listed as follows. The relevant descriptions of the sets, parameters and decision variables in the model are as follows:
[0013] Symbol Definition
[0014] gather
[0015] Complete directed graph
[0016] The collection of nodes on the graph
[0017] The set of arcs on a graph
[0018] A set of n requirements
[0019] A collection of m lines
[0020] The set of positions on line l, in Indicates the total number of lines
[0021] parameter
[0022] Q i The number of passengers in demand i
[0023] [e i ,l i ] The preferred service time window for demand i,
[0024] Q max Vehicle capacity
[0025] T max Maximum driving time of vehicle
[0026] t ij Travel time from i to j
[0027] c ij The travel cost from i to j
[0028] s Service time for each demand
[0029] δ The maximum service delay specified by the operator, set to 10 minutes
[0030] μ Cost per unserved passenger
[0031] θ i {0,1}, variable indicating whether the passenger agrees to split
[0032] λ i The {0,1} variable indicates whether the passenger with demand i agrees to be served during the delay period.
[0033] u i Original fare per passenger
[0034] β i Fare discounts are available for selected passengers upon request.
[0035] γ i Fare discounts apply for violations of time window requirements,
[0036] Decision variables
[0037] If position k on line l corresponds to demand i, otherwise
[0038] If positions k and k+1 on line l correspond to demand i and demand j respectively, otherwise
[0039] π i π i =1 if demand i is split, otherwise
[0040] τ kl τ kl = 1 if the passenger at position k on line l experiences a service delay, otherwise
[0041] If k and k' on line l are pairs of locations associated with the requested pair of pickup and delivery services, otherwise
[0042] η kl η kl = 1 if the passenger at position k on route l encounters a delay at position k or its paired position, otherwise
[0043] Auxiliary variables
[0044] q kl The change in passenger volume at point k on line l,
[0045] [e kl ,l kl ] The time window of position k on line l,
[0046] a kl The time when the vehicle arrives at point k on route 1,
[0047] b kl The service start time of point k on line l,
[0048] d kl The time when the vehicle departs from station k on line l, in Indicates all positions on the line minus the last position
[0049] The goal of the problem is to minimize the total cost of the system. The objective function is as follows:
[0050]
[0051] in represents the line operating cost, ∑ l ∑ k |q kl |·P kl represents the time window penalty cost, represents the cost of unserved demand, represents the fare revenue cost, where P kl is the service delay cost per passenger at this location, defined as formula (2), |q kl | indicates the number of passengers at this location;
[0052]
[0053] in Representing a collection Remove 0 and Element, l kl represents the upper limit of the time window at position k on line l;
[0054] It represents the fair discount when the passenger with demand i is served at point k on route l, which is expressed as formula (3);
[0055]
[0056] where η kl It is used to reflect whether the passengers at station k on line l encounter service delays. If not, then η kl =1; if the service is delayed, then η kl =0;π i η kl β i γ i It means that when demand i is split, that is, π i = 1 and if there is a delay at location k or its paired location, the discount for demand i is β i γi, that is, if the separated passengers are delayed, they will enjoy a discount β i γ i ; π i (1-η kl )·β i It means that when demand i is split, that is, π i = 1) and no delay occurs, the discount on passenger demand i is β i , that is, if the split passengers are not delayed, they still enjoy the discount β i ;(1-π i )η kl γ i It means that when demand i is not split, that is, π i = 0) and when a delay occurs at location k or its paired location, the discount for demand i is γ i , that is, passengers who are not separated will receive a discount if they are delayed γ i . ;
[0057] Constraints include the following six categories:
[0058] 1). Line configuration constraints
[0059]
[0060] Constraints (4a)-(4c) together ensure that each route starts from node 0 (parking lot) and ends at that node, and all intermediate locations correspond to pick-up and drop-off nodes. Indicates whether a certain location from station 0 to line l involves demand 0, Indicates whether station 0 is connected to the last position on line l; Constraint (5a) stipulates that each line must visit the same number of pick-up nodes for a given demand; Constraint (5b) ensures that the order of pick-up nodes is correct, that is, the order of pick-up nodes should be to reach the pick-up node first and then the corresponding drop-off node, so as to avoid errors in the continuous order of pick-up nodes in the same demand, where Indicates whether demand i gets on the bus at node k′ of line l, Indicates whether demand i gets off at node k′ of route l; constraint (6) establishes and The relationship between or When it is 0, Should be 0, otherwise is 1; constraints (7a) to (7b) define and The value range of
[0061] 2). Pairing position constraints
[0062]
[0063]
[0064] Constraints (8a) to (8d) together define The value of is determined; Constraint (8a) stipulates that each position can only be paired with a given position in the route; Constraint (8b) ensures that when positions k and k′ correspond to the pick-up and drop-off nodes of the same demand, can take the value 1; constraint (8c) forces that when position k′ is before k, should be 0; constraint (8d) stipulates that only when hour, The value can be 1. and Established when The role of is to ensure that if demand i is picked up at position k from k+1 to k′; if position k is associated with the pick-up node of demand i, then there should be no other pick-up nodes for demand i between positions k+1 and k′, where k″ is a variable used to iterate in the range k+1 to k′; therefore, constraints (8a) to (8d) ensure that when positions k and k′ correspond to the pick-up and drop-off nodes of the same demand, and k′ is the first drop-off node after k, The value is 1, where; constraint (9) defines The value range is 0-1;
[0065] 3) Flexible time window constraints
[0066]
[0067] Constraints (10a) to (10b) define the service time window at the line location, denoted by e kl ,l kl );and the scheduled time window on the node in graph G is denoted as e i ,l i ); Constraints (11a) to (11c) describe the process of estimating the bus arrival time and service start time based on the departure time of the previous location; Constraint (12) restricts the service start time to not exceed the upper limit of the time window when the passenger does not accept the service delay; on the contrary, for passengers who choose the flexible time window, the service delay shall not exceed the threshold set by the operator, denoted as δ, and δ is set to 20min;
[0068] Constraints (13a) and (13b) state that when the service start time exceeds the upper limit of the time window, τ kl Should be 1, otherwise τ kl should be 0; constraint (14) specifies that if a passenger experiences a delay in the service process at location k, either at this location or at its paired location, the passenger should receive a fare discount; constraint (15) specifies that when a passenger with demand i does not agree to be served within the delay time, no delay can be specified at the associated location; constraint (16) defines τ kl The value range of
[0069] 4) Maximum vehicle travel time constraint
[0070]
[0071] Constraint (17) ensures that the duration of the line does not exceed the predefined upper limit T max , the upper limit T max It is established based on the actual constraints of the driver's continuous working time, where d 0,l Indicates the departure time of the vehicle from the station on line l;
[0072] 5). Passenger capacity constraints
[0073]
[0074] Constraint (18) specifies the balance between the number of passengers served at the pick-up and drop-off nodes; if location k defines the boundary between the paired pick-up and drop-off nodes for demand i, then the sum represents the number of passengers at the last pick-up location of demand i before location k, and represents the number of passengers at the first pick-up location of demand i after location k;
[0075] Constraint (19) ensures that the passenger load at any section does not exceed the bus capacity; constraint (20) defines q kl The value range of
[0076] 6) All passenger service constraints in the splittable scenario
[0077]
[0078]
[0079] Constraints (21a) to (21b) illustrate that and π i The interdependence between them; if demand i is not split into services, Then constraint (21a) requires that π i is 0; otherwise, constraint (21b) requires π i is 1; constraint (22) states that if the demanding passengers object to splitting the service, then π i must be 0; constraint (23) indicates that if demand i is served, Then all passengers with this demand must be served; constraint (24) defines π i The value range of
[0080] Step 1.1 Time window back-calculation algorithm
[0081] Given a specific route, changes in the bus schedule only affect the service time window and route duration; to minimize the costs associated with defaults in these two aspects, the bus scheduling subproblem is formulated as follows:
[0082]
[0083] For a given route l, constraints (10a) to (16) apply; a parameter μ = 1.5 is introduced to penalize the violation of route duration; it is worth noting that the first term in formula (25) refers only to the time window violation when the passengers agree to the service delay;
[0084] Step 2: Variable Neighborhood Search Algorithm
[0085] Step 2.1: Generation of initial solution
[0086] The initial solution generation operator constructs a feasible route for each bus, satisfying the constraints of time window and route duration; definition is a set of nodes representing unserved requirements and initializes Initially, select The pick-up node with the earliest priority service time is recorded as i1, and {i1,i1+n} are added to the route in order; all passengers of i_1 will be arranged in this route, and update Next, check Whether each remaining demand in can be attached to the end of the line; if there is a demand that can be added, the demand with the earliest pick-up time is selected for addition, and the line duration is updated; this iterative process will continue until no more demands can be added or the line duration exceeds T max Until (T max The value is determined by the scale of the case and ranges from 100 to 150). When it is empty or the line cannot be further expanded, the initial solution generation process is terminated;
[0087] Step 2.2: Two types of neighborhood search methods
[0088] 1) First category: In order to diversify the solution space within the neighborhood, two types of neighborhood search strategies are adopted; the first type of strategy involves searching based on two lines or one line and a set of unserved demands. Node exchange or transfer between them; Specifically, under this strategy, when two lines are selected for node exchange or transfer, the longer line is marked as "Line 1" whose length exceeds 2w. ; Next, w pairs of nodes are selected and removed from "Line 1" using the demand removal operator, and then these nodes are inserted into "Line 2" using the demand insertion operator; The demand removal and insertion operators are specifically designed to support demand splitting under fare discounts; If the length difference between the two lines does not exceed a predetermined threshold ΔlΔl set between 4-6, w pairs of nodes are removed from "Line 2" and inserted into "Line 1";
[0089] When selecting the unserved demand set Instead of a certain line, w is the node from Remove and insert into "line l"; if "line l" and If the length difference between them does not exceed Δl, then w pairs of nodes will be transferred from "line l" to It indicates that the corresponding demand will no longer be served. It should be noted that if the demand removed from "line l" is also served in other lines, the corresponding node pairs should be removed from other lines at the same time.
[0090] 2) Second category: The second neighborhood search strategy involves node cyclic transfer based on multiple lines; randomly select m′ where m′ is greater than 2, lines or m′-1 lines and the set of unserved demands Perform node loop transfer; the selected lines are sorted in descending order of length, where the length of line l exceeds 2w; if but Occupy the position of line l; for each selected line l where l is less than m′ and l is greater than or equal to 1, remove w pairs of nodes from line l in turn and insert them into line l+1; finally, if line m′ is identical to line l or set The length difference between them does not exceed the predetermined threshold Δl. According to the scale of the example, Δl is set between 4 and 6. Then w pairs of nodes are removed from line m′ and inserted into line l or added to line l. In addition, if you select Then the nodes corresponding to the removal requirements should be removed from all lines at the same time;
[0091] Step 2.3: Requirement removal method
[0092] To evaluate the effect of removing the node pair {i,i+n} from the line, the following evaluation function is used:
[0093]
[0094] Among them, Δc r,i ,Δc t,i ,Δc d,i ,Δc u,i , and Δc f,i They represent the changes in line operating costs, time window violations, line duration penalties, unserved demand costs, and fare revenues, respectively; Δq i represents the number of passengers served by the node pair;
[0095] In calculating Δc f,i When calculating Δc, it is necessary to consider whether the passengers in demand i have been assigned or experienced service delays; t,i and Δc d,i When removing nodes, the time window reverse derivation method is used to calculate the new timetable and route duration after removing the nodes;
[0096] Once the Δc′ of all node pairs in the line is calculated T,i , choose Δc′ T,i The w pairs of nodes with the smallest value are removed; if the unserved demand set v′ is selected for demand removal instead of selecting a line, the w pairs of nodes are generated by random selection; if the line or set If the number of node pairs does not exceed w, and the range of w is set to 2-5, then remove the line or set All nodes in
[0097] Step 2.4: Requirement Insertion Method
[0098] Step 2.4.1: Load Passenger on an existing node
[0099] Considering that demand i may be assigned a service, the node pair {i, i+n} may already exist in line l; in this case, identify the location corresponding to demand i or i+n and record it in the set For the collection Each pair of positions in Check the maximum number of passengers that can be loaded between positions k1 and k2, denoted by if Then immediately load q at positions k1 and k2 i passengers; otherwise, load at these locations Passengers, and continue to check the collection The next pair of positions in q will be repeated until all q i passengers have been accommodated or all seats are in The evaluation has been completed;
[0100] When q is successfully loaded at position {k1,k2} i ' passengers, and q i When ′≥1, the changes in fare revenue, time window violations, and unserved passengers are calculated immediately; in particular, the change in time window violations is related to the time window violations at two locations, and the calculation formula is: i ′(P k1,l +P k2,l )
[0101] For different scenarios, the change in fare revenue There are several calculation methods:
[0102] i) If demand i is assigned a service and a time window violation occurs at location k1 or k2:
[0103]
[0104] ii) If demand i is assigned a service and no time window violation occurs at location k1 or k2:
[0105]
[0106] iii) If demand i is not assigned a service and a time window violation occurs at location k1 or k2:
[0107]
[0108] iv) If demand i is not assigned a service and no time window violation occurs at location k1 or k2:
[0109]
[0110] Step 2.4.2: Insert boarding and alighting nodes
[0111] If there are still unloaded passengers after executing step 1, try to efficiently identify the optimal pair of locations to insert the pick-up node; to evaluate a pair of insertion locations, denoted as {k1, k2}, the following evaluation function is used:
[0112]
[0113] in, and They represent the changes in route operating cost, time window violation, route duration penalty, unserved demand cost, and fare revenue caused by inserting pick-up nodes at positions k1 and k2, respectively; represents the maximum number of passengers that can be inserted between k1 and k2; It is also calculated based on the above four situations, considering whether there is a passenger allocation service or time window violation;
[0114] To speed up the determination of the insertion location, we choose not to enumerate and check all location pairs; first, we find all the pick-up and drop-off locations that can accommodate at least one passenger and will not cause unacceptable time window violations; then, we evaluate these pick-up and drop-off locations using the following formula:
[0115]
[0116] in, and They represent the change in line operation cost, time window violation and line duration penalty caused by inserting a pick-up node at position k1;
[0117] Then, sort the pick-up locations in ascending order. And select those The pick-up and drop-off locations are searched for feasible drop-off locations, where the value of α is set to 1.1; if no feasible location is found, the subsequent pick-up and drop-off locations are checked until at least one feasible drop-off location is found;
[0118] Step 2.6: Solution Acceptance Criteria and Algorithm Termination Criteria
[0119] A simulated annealing method is used to determine whether to accept a new solution. Specifically, when a new solution meets a specific acceptance criterion, the solution will replace the current solution. The criterion determines whether to accept the new solution by calculating the ratio of the difference between the current solution and the new solution to the current temperature. The temperature value is updated at a ratio of 0.96-0.98 in each iteration until it reaches more than 10,000 times, at which time the algorithm terminates. BRIEF DESCRIPTION OF THE DRAWINGS
[0120] Figure 1 Variable Neighborhood Algorithm Flowchart
[0121] Figure 2 Schematic diagram of demand exchange / transfer operator
[0122] Figure 3 Schematic diagram of demand ring transfer operator
[0123] Figure 4 Variable Neighborhood Algorithm Iteration Process Diagram DETAILED DESCRIPTION
[0124] The present invention selects the online car-hailing order data in Yizhuang District, Beijing, and designs a large-scale instance, which contains a total of 529 requests. The data comes from 48,791 orders throughout the day on December 7, 2018. After screening, the peak period data between 5 am and 12 noon are extracted. The time windows of the boarding and alighting nodes of each request are set according to the start and end time of the order to simulate the actual demand response bus service. In order to adapt to the scale of this instance, parameters such as bus capacity, fleet size, and maximum service delay threshold are adjusted. The specific parameter settings are as follows:
[0125] (1) Bus passenger capacity: Q max =11
[0126] (2) Fleet size: L = 30
[0127] (3) Maximum service delay threshold: δ = 20 minutes
[0128] (4) Time window: Boarding time window: t s to s +t w ; Get-off time window: t e to e +t w +σ·t i,i+n
[0129] (5) Driving time matrix: calculated by online car-hailing data and navigation data, distance d / v
[0130] (6) Fare setting: The original fare is 50% of the online car-hailing fare
[0131] Table 2. Results of examples in the rational behavior scenario
[0132]
[0133] Table 3. Results of examples in the greedy behavior scenario
[0134]
[0135] The iterative process of the variable neighborhood algorithm is shown in the figure Figure 4 As shown in Table 13, the decreasing trend of the objective function value in the “greedy passenger behavior” scenario is not as obvious as that in the “rational passenger behavior” scenario. Compared with before optimization, the objective value in the rational passenger behavior scenario decreases from 136,314.6 to 116,188.6 (a decrease of 17.3%), while the objective value in the greedy passenger behavior scenario decreases from 136,116.0 to 126,583.8 (a decrease of 7.5%). The reason is that the greedy behavior of passengers increases the objective function value of the feasible solution when a higher discount is offered, while in the rational behavior scenario, the discount chosen by the passenger does not change with the offer of a higher discount, and the objective function value remains stable or gradually decreases. In addition, in Tables 13 and 14, we observe differences in component costs between the two scenarios: in the greedy behavior scenario, the social cost is higher, indicating that the operator is unwilling to serve more passengers due to the higher discount, resulting in more passenger splitting and service delays, which in turn increases passenger costs. In the rational behavior scenario, despite the higher discount, the operator cost does not change significantly, mainly due to the increase in bus route costs. It can be seen that the greedy behavior of passengers may have an adverse impact on operators and social welfare, while rational behavior can help achieve a better balance between passengers, operators and social benefits. Therefore, when formulating the fare policy for on-demand bus services, passenger behavior should be fully considered.
Claims
1. A method for optimizing the design of an on-demand public transportation system with regard to passenger splitting and time window flexibility, characterized by: The system is based on a demand-responsive transportation service platform that first collects passengers' travel needs and then optimizes the routes and schedules of a dedicated fleet of vehicles; the problem is defined in a complete directed graph, where the set of nodes represents different pick-up and drop-off locations and the set of arcs represents the routes connecting these nodes; The demand set consists of n demands, and each demand i corresponds to two nodes in the graph, which represent pick-up and drop-off points respectively; in the graph, a stop point, namely node 0, is also introduced to accommodate buses; thus, the node set includes 2n+1 nodes; Each demand i∈I consists of two parts, corresponding to the pick-up node and the drop-off node, where the time window of the pick-up node is directly specified by the passenger when booking online, and the time window of the drop-off node is derived based on the maximum passenger in-vehicle time limit; specifically, the passenger's drop-off time window is determined by the shortest travel time from the pick-up node to the drop-off node and the maximum delay time the passenger endures; in order to meet these constraints, the time window should ensure that the passenger can reach the destination within the scheduled time; In addition, the number of passengers for each demand must also be given, and passengers within the same demand must decide whether to accept the split or delayed service. The operator provides different fare discount options; and passengers can choose to accept split and delayed services at the same time, thereby obtaining multiple discounts; after the passenger chooses a discount, the total discount is the combination of various discounts; In particular, if demand i is satisfied, the number of passengers for that demand must fully satisfy Qi. If this number is not met, no service for that demand will be provided. At the same time, not all passengers will face delays, and some passengers may be served on multiple trips, so the delays may vary. After collecting all the needs, the operator designs the bus fleet's routes and schedules based on these needs; each route starts from the parking lot, passes through multiple pick-up and drop-off nodes, and completes the service at the final stop; Minimize total system costs, including line operating costs, time window breach costs, unfulfilled demand costs, and fare revenue; the costs include the operator's perspective including vehicle scheduling and social benefits including service quality and passenger satisfaction; To describe the joint optimization model, the variables are listed as follows. The relevant descriptions of the sets, parameters and decision variables in the model are as follows: Symbol Definition gather The goal of the problem is to minimize the total cost of the system. The objective function is as follows: in represents the line operating cost, ∑ l ∑ k |q kl |·P kl represents the time window penalty cost, represents the cost of unserved demand, represents the fare revenue cost, where P kl is the service delay cost per passenger at this location, defined as formula (2), |q kl | indicates the number of passengers at this location; in Representing a collection Remove 0 and Elements, l kl represents the upper limit of the time window at position k on line l; It represents the fair discount when the passenger with demand i is served at point k on route l, which is expressed as formula (3); where η kl It is used to reflect whether the passengers at station k on line l encounter service delays. If not, then η kl =1; If the service is delayed, then η kl =0;π i η kl β i γ i It means that when demand i is split, that is, π i = 1 and if there is a delay at location k or its paired location, the discount for demand i is β i γ i , that is, if the split passengers are delayed, they will enjoy a discount of β i γ i ; π i (1-η kl )·β i It means that when demand i is split, that is, π i = 1) and no delay occurs, the discount on passenger demand i is β i , that is, if the split passengers are not delayed, they still enjoy the discount β i ;(1-π i )η kl γ i It means that when demand i is not split, that is, π i = 0) and when a delay occurs at location k or its paired location, the discount for demand i is γ i , that is, passengers who are not separated will receive a discount if they are delayed γ i ;; Constraints include the following six categories: 1). Line configuration constraints Constraints (4a)-(4c) together ensure that each route starts from node 0 (parking lot) and ends at that node, and all intermediate locations correspond to pick-up and drop-off nodes. Indicates whether a location from station 0 to line l involves demand 0. Indicates whether station 0 is connected to the last position on line l; Constraint (5a) stipulates that each line must visit the same number of pick-up nodes for a given demand; Constraint (5b) ensures that the order of pick-up nodes is correct, that is, the order of pick-up nodes should be to reach the pick-up node first and then the corresponding drop-off node, so as to avoid errors in the continuous order of pick-up nodes in the same demand, where Indicates whether demand i gets on the bus at node k′ of line l, Indicates whether demand i gets off at node k′ of route l; constraint (6) establishes and The relationship between or When it is 0, Should be 0, otherwise is 1; constraints (7a) to (7b) define and The value range of 2). Pairing position constraints Constraints (8a) to (8d) together define The value of is determined; Constraint (8a) stipulates that each position can only be paired with a given position in the route; Constraint (8b) ensures that when positions k and k′ correspond to the pick-up and drop-off nodes of the same demand, can take the value 1; constraint (8c) forces that when position k′ is before k, should be 0; constraint (8d) stipulates that only when hour, The value can be 1. and Established when The role of is to ensure that if demand i is picked up at position k from k+1 to k′; if position k is associated with the pick-up node of demand i, then there should be no other pick-up nodes for demand i between positions k+1 and k′, where k″ is a variable used to iterate in the range k+1 to k′; therefore, constraints (8a) to (8d) ensure that when positions k and k′ correspond to the pick-up and drop-off nodes of the same demand, and k′ is the first drop-off node after k, The value is 1, where; constraint (9) defines The value range is 0-1; 3) Flexible time window constraints Constraints (10a) to (10b) define the service time window at the line location, denoted by e kl ,l kl );and the scheduled time window on the node in graph G is denoted as e i ,l i ); Constraints (11a) to (11c) describe the process of estimating the bus arrival time and service start time based on the departure time of the previous location; Constraint (12) restricts the service start time to not exceed the upper limit of the time window when the passenger does not accept the service delay; on the contrary, for passengers who choose the flexible time window, the service delay shall not exceed the threshold set by the operator, denoted as δ, and δ is set to 20min; Constraints (13a) and (13b) state that when the service start time exceeds the upper limit of the time window, τ kl Should be 1, otherwise τ kl should be 0; constraint (14) specifies that if a passenger experiences a delay in the service process at location k, either at this location or at its paired location, the passenger should receive a fare discount; constraint (15) specifies that when a passenger with demand i does not agree to be served within the delay time, no delay can be specified at the associated location; constraint (16) defines τ kl The value range of 4) Maximum vehicle travel time constraint Constraint (17) ensures that the duration of the line does not exceed the predefined upper limit T max , the upper limit T max It is established based on the actual constraints of the driver's continuous working time, where d 0,l Indicates the departure time of the vehicle from the station on line l; 5). Passenger capacity constraints Constraint (18) specifies the balance between the number of passengers served at the pick-up and drop-off nodes; if location k defines the boundary between the paired pick-up and drop-off nodes for demand i, then the sum represents the number of passengers at the last pick-up location of demand i before location k, and represents the number of passengers at the first pick-up location of demand i after location k; Constraint (19) ensures that the passenger load at any section does not exceed the bus capacity; constraint (20) defines q kl The value range of 6) All passenger service constraints in the splittable scenario Constraints (21a) to (21b) illustrate that and π i The interdependence between them; if demand i is not split into services, ), then constraint (21a) requires that π i is 0; otherwise, constraint (21b) requires π i is 1; constraint (22) states that if the demanding passengers object to splitting the service, then π i must be 0; constraint (23) indicates that if demand i is served, ), then all passengers with this demand must be served; constraint (24) defines π i The value range of Step 1.1 Time window back-calculation algorithm Given a specific route, changes in the bus schedule only affect the service time window and route duration; to minimize the costs associated with defaults in these two aspects, the bus scheduling subproblem is formulated as follows: For a given route l, constraints (10a) to (16) apply; a parameter μ = 1.5 is introduced to penalize the violation of route duration; it is worth noting that the first term in formula (25) refers only to the time window violation when the passengers agree to the service delay; Step 2: Variable Neighborhood Search Algorithm Step 2.1: Generation of initial solution The initial solution generation operator constructs a feasible route for each bus, satisfying the constraints of time window and route duration; definition is a set of nodes representing unserved requirements and initializes Initially, select The pick-up node with the earliest priority service time is recorded as i1, and {i1,i1+n} are added to the route in order; all passengers of i_1 will be arranged in this route, and update Next, check Each remaining demand in can be added to the end of the line; if there is a demand that can be added, the demand with the earliest pick-up time is selected for addition, and the line duration is updated; this iterative process will continue until no more demands can be added or the line duration exceeds T max So far, T max The value is determined by the scale of the case and ranges from 100 to 150. When it is empty or the line cannot be further expanded, the initial solution generation process is terminated; Step 2.2: Two types of neighborhood search methods 1) First category: In order to diversify the solution space within the neighborhood, two types of neighborhood search strategies are adopted; the first type of strategy involves searching based on two lines or one line and a set of unserved demands. Node exchange or transfer between them; Specifically, under this strategy, when two lines are selected for node exchange or transfer, the longer line is marked as "line 1" whose length exceeds 2w; Next, w pairs of nodes are selected and removed from "line 1" using the demand removal operator, and then these nodes are inserted into "line 2" using the demand insertion operator; the demand removal and insertion operators are specifically designed to support demand splitting under fare discounts; If the length difference between the two lines does not exceed a predetermined threshold ΔlΔl set between 4-6, w pairs of nodes are removed from "line 2" and inserted into "line 1"; When selecting the unserved demand set Instead of a certain line, w is the node from Remove and insert into "line l"; if "line l" and If the length difference between them does not exceed Δl, then w pairs of nodes will be transferred from "line l" to Indicates that the corresponding demand will no longer be served; it should be noted that if the demand removed from "line l" is also served in other lines, the corresponding node pairs should be removed from other lines at the same time; 2) Second category: The second neighborhood search strategy involves node cyclic transfer based on multiple lines; randomly select m′, where m′ is greater than 2, lines or m′-1 lines and the set of unserved demands Perform node loop transfer; the selected lines are sorted in descending order of length, where the length of line l exceeds 2w;; if selected but Occupy the position of line l; for each selected line l, where l is less than m′ and l is greater than or equal to 1, remove w pairs of nodes from line l in turn and insert them into line l+1; finally, if line m′ is identical to line l or set The length difference between them does not exceed the predetermined threshold Δl. According to the scale of the example, Δl is set between 4 and 6. Then w pairs of nodes are removed from line m′ and inserted into line l or added to line l. In addition, if you select Then the nodes corresponding to the removal requirements should be removed from all lines at the same time; Step 2.3: Requirement removal method To evaluate the effect of removing the node pair {i,i+n} from the line, the following evaluation function is used: Among them, Δc r,i ,Δc t,i ,Δc d,i ,Δc u,i , and Δc f,i They represent the changes in line operating costs, time window violations, line duration penalties, unserved demand costs, and fare revenues, respectively; Δq i represents the number of passengers served by the node pair; In calculating Δc f,i When calculating Δc, it is necessary to consider whether the passengers in demand i have been assigned or experienced service delays; t,i and Δc d,i When removing nodes, the time window reverse derivation method is used to calculate the new timetable and route duration after removing the nodes; Once the Δc′ of all node pairs in the line is calculated T,i , choose Δc′ T,i The w pair node with the smallest value is removed; if the unserved demand set is selected To remove demand instead of selecting a route, w pairs of nodes are randomly selected; if a route or set If the number of node pairs does not exceed w, and the range of w is set to 2-5, then remove the line or set All nodes in Step 2.4: Requirement Insertion Method Step 2.4.1: Load Passenger on an existing node Considering that demand i may be assigned a service, the node pair {i, i+n} may already exist in line l; in this case, identify the location corresponding to demand i or i+n and record it in the set For the collection Each pair of positions in Check the maximum number of passengers that can be loaded between positions k1 and k2, denoted by ;;if Then immediately load q at positions k1 and k2 i passengers; otherwise, load at these locations Passengers, and continue to check the collection The next pair of positions in q will be repeated until all q i passengers have been accommodated or all seats are in The evaluation has been completed; When q′ is successfully loaded at position {k1,k2} i passengers, and q′ i ≥1, the changes in fare revenue, time window violations, and unserved passengers are calculated immediately; in particular, the change in time window violations is related to the time window violations at two locations, and the calculation formula is: i (P k1,l +P k2,l ) For different scenarios, the change in fare revenue There are several calculation methods: i) If demand i is assigned a service and a time window violation occurs at location k1 or k2: ii) If demand i is assigned a service and no time window violation occurs at location k1 or k2: iii) If demand i is not assigned a service and a time window violation occurs at location k1 or k2: iv) If demand i is not assigned a service and no time window violation occurs at location k1 or k2: Step 2.4.2: Insert boarding and alighting nodes If there are still unloaded passengers after executing step 1, try to efficiently identify the optimal pair of locations to insert the pick-up node; to evaluate a pair of insertion locations, denoted as {k1, k2}, the following evaluation function is used: in, and They represent the changes in route operating cost, time window violation, route duration penalty, unserved demand cost, and fare revenue caused by inserting pick-up nodes at positions k1 and k2, respectively; represents the maximum number of passengers that can be inserted between k1 and k2; It is also calculated based on the above four situations, considering whether there is a passenger allocation service or time window violation; To speed up the determination of the insertion location, we choose not to enumerate and check all location pairs; first, we find all the pick-up and drop-off locations that can accommodate at least one passenger and will not cause unacceptable time window violations; then, we evaluate these pick-up and drop-off locations using the following formula: in, and They represent the change in line operation cost, time window violation and line duration penalty caused by inserting a pick-up node at position k1; Then, sort the pick-up locations in ascending order. , and select those The pick-up and drop-off locations are searched for feasible drop-off locations, where the value of α is set to 1.1; if no feasible location is found, the subsequent pick-up and drop-off locations are checked until at least one feasible drop-off location is found; Step 2.6: Solution Acceptance Criteria and Algorithm Termination Criteria A simulated annealing method is used to determine whether to accept a new solution. Specifically, when a new solution meets a specific acceptance criterion, the solution will replace the current solution. The criterion determines whether to accept the new solution by calculating the ratio of the difference between the current solution and the new solution to the current temperature. The temperature value is updated at a ratio of 0.96-0.98 in each iteration until it reaches more than 10,000 times, at which time the algorithm terminates.