Flexible bus dynamic scheduling method considering mixed requests and fairness
By adopting technologies such as rolling time domain framework and multi-agent reinforcement learning in flexible bus dispatching, the trade-off problem between economic feasibility and service level in flexible bus dispatching is solved, and efficient decision-making and service quality improvement of flexible bus dynamic dispatching are achieved.
Patent Information
- Application Number
- CN202410726019.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-06
Smart Images

Figure CN118736809A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flexible public transport dynamic scheduling, and in particular to a flexible public transport dynamic scheduling method taking mixed requests and fairness into consideration. Background Art
[0002] Public transportation plays an important role in urban travel and development, and it usually requires a trade-off between service level and economic feasibility. Traditional fixed-route buses are cost-effective in high-demand areas, but are difficult to operate in low-density demand areas. Taxis and online ride-hailing services can provide convenient and fast door-to-door services, but their operating and environmental costs are high. Therefore, flexible bus services (FBS) have emerged as the times require. They provide passengers with more flexible and accurate travel services at relatively low prices and have great development potential in future public transportation systems.
[0003] FBS usually operates in a reservation mode, which requires passengers to specify a time window in advance. However, today's passengers have higher expectations for travel, hoping to make requests in real time and get a ride as soon as possible, similar to the ad hoc requests met by taxis and online ride-hailing. Therefore, it becomes crucial to improve passenger acceptance of FBS. A hybrid request mode that allows reservation requests and ad hoc requests is an effective measure to increase passenger acceptance and improve FBS ridesharing services. Unlike traditional reservation requests, ad hoc requests do not require a specified time window, similar to the ad hoc services provided by taxis.
[0004] There are some defects and deficiencies in the current research on flexible bus scheduling. Existing research mainly focuses on the optimization problem of FBS with reservation requests, ignoring the potential mixed request patterns. For FBS with mixed requests, a basic problem is how to balance economic feasibility and service level; secondly, this problem usually needs to deal with travel requests that vary over time, and also consider the impact of future requests on current scheduling decisions. Therefore, it is necessary to design an efficient method that can maximize long-term benefits and make dynamic decisions.
[0005] Traditional dynamic FBS optimization usually relies on repeated single-cycle static models and construction insertion heuristic methods, which fail to use historical demand data to predict future demand and schedule vehicles in advance, which is not conducive to improving service quality and efficiency. Traditional reinforcement learning (RL) and imitation learning (IL) have certain limitations in solving FBS problems with mixed requests. For reinforcement learning, its training takes a long time, the solution quality is unstable, and historical demand data is not used to predict future demand. For imitation learning, when it is deployed in an unknown environment, the performance will drop significantly, and the performance under different conditions is inconsistent. Summary of the invention
[0006] The purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and provide a flexible bus dynamic scheduling method that takes into account mixed requests and fairness. By considering a dual-objective optimization model of cost and fairness, multi-agent reinforcement learning, imitation learning and heuristic methods are integrated. In the flexible bus dynamic scheduling with mixed requests, the trade-off between operating cost and service level is considered, and the efficient solution of multi-agent reinforcement learning is taken into account.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0008] A flexible bus dynamic scheduling method considering mixed requests and fairness includes the following steps:
[0009] S1. Establish a Markov decision process model based on the rolling horizon framework, and explain the flexible bus dynamic scheduling problem considering mixed requests and fairness through the Markov decision process model;
[0010] S2. Markov decision process model designs temporary request rejection mechanism, prediction error correction mechanism and overdue compensation mechanism to solve the problems arising from dynamic scheduling of flexible public transportation;
[0011] S3. Determine the cost of flexible bus dynamic scheduling, establish the objective function of the Markov decision process model, and set the constraints of the Markov decision process model;
[0012] S4. Based on the core elements of multi-agent reinforcement learning, a new multi-agent reinforcement learning framework is designed to solve the problem of flexible bus dynamic scheduling.
[0013] Furthermore, in step S1, a Markov decision process model is established based on a rolling horizon framework, specifically:
[0014] The operation period is divided into |G| periods of length H. The request set corresponding to each period g is N. g , including a collection of reservation requests and temporary request collection In case of demand forecast, temporary request Expected to be submitted within cycle g, in the absence of demand forecast, temporary requests are submitted before cycle g, but are included in the temporary request set during the planning stage of cycle g In order to establish the Markov decision process model, each cycle g∈G is divided into |T| time slices. Decisions are made only at the beginning of each time slice. The maximum number of decisions for each vehicle in a cycle is |T|. The buffer time of the optimization execution phase is set to BT, and the next cycle is planned during the buffer time BT.
[0015] Furthermore, in step S2, a temporary request rejection mechanism is designed, specifically:
[0016] When a temporary request cannot be assigned to any vehicle in the current cycle, consider including it in the next cycle for planning. By comparing the additional cost of serving the request in the next cycle with the penalty cost of rejecting the request, it is evaluated whether accepting the request is beneficial. If the additional cost of serving the request is lower than the penalty cost of rejecting the request, the request is included in the next cycle planning, otherwise the request is rejected.
[0017] Design a prediction error correction mechanism, specifically:
[0018] The prediction errors of request n include three types: passenger number error, submission time error and station error. The condition for triggering correction is whether the constraint is violated. Whether the constraint is violated is derived from the planned route of the existing plan and the update information of request n. Once the prediction error does not meet the constraint condition, it is necessary to make corresponding corrections to ensure the validity of the plan. Assume that the predicted number of passengers for request n is The actual number of passengers is q n , and plans to allocate to vehicle k; when Not only when accepting request n, but also in the subsequent routes of the plan, it is necessary to determine whether vehicle k still meets the capacity constraint;
[0019] If vehicle k still meets the capacity constraint in the updated route, the existing solution can be executed. Otherwise, vehicle k cannot serve request n as expected, that is, the existing solution fails and needs to be corrected to ensure effective scheduling. The correction starts with searching whether there is a running vehicle that can serve request n. If no vehicle can serve request n, it will be merged into the request set of the next cycle.
[0020] Design an overdue compensation mechanism, specifically:
[0021] For vehicle k∈K, a variable AT is initialized in each cycle g,t,k , represents the timestamp when vehicle k completes the current decision in time slice t within cycle g. Therefore, when cycle g ends, AT g,|T|,k is the duration of its route; if AT g,|T|,k >g·H, then the route of vehicle k in period g The duration of AT is exceeded; in this case, it is necessary to update the usage time information of vehicle k in the next cycle g+1, that is, g,|T|,k Added to the initialization of the next cycle.
[0022] Furthermore, in step S3, the cost of flexible bus dynamic scheduling is determined, specifically:
[0023] The cost includes transportation cost and passenger cost. The transportation cost is the product of mileage and unit mileage cost, expressed as
[0024]
[0025] In the formula, represents the transportation cost of period g; δ f represents the unit mileage cost; i g,t,k represents the station of vehicle k in time slice t within cycle g; i g,t+1,k represents the station of vehicle k at time slice t+1 in cycle g; DIS(i g,t,k ,i g,t+1,k ) indicates that from site i g,t,k To site g,t+1,k distance;
[0026] Passenger costs include time window penalty costs and rejection penalty costs, and the calculation formula is:
[0027]
[0028] In the formula, represents the passenger cost of cycle g; is a 0-1 variable, Indicates that temporary request n is successfully responded to. Indicates that the temporary request n is rejected; δ e represents the penalty cost of early arrival per unit; q n Indicates the number of people boarding the bus with request n; Indicates the earliest departure time of reservation request n or the submission time of a temporary request; represents the access time of request n; δ l represents the unit late penalty cost; represents the latest departure time of request n; δ b N represents the unit refusal response cost; g Represents the set of requests within period g.
[0029] Furthermore, the objective function of the Markov decision process model is established, specifically:
[0030] The first objective function minimizes the total cost, making the total cost of each cycle as small as possible, expressed as
[0031]
[0032] The second objective function optimizes the fairness of temporary request waiting time. The waiting time calculation formula is:
[0033]
[0034] Where Wn Indicates the waiting time for request n;
[0035] Introducing Fairness Indicators To measure the fairness of passenger waiting time, the second objective function considering the fairness index is expressed as
[0036]
[0037] In the formula, It represents the average waiting time of temporary requests in period g.
[0038] Furthermore, the constraints of the Markov decision process model are set as follows:
[0039] Vehicle capacity constraint: The vehicle must satisfy the capacity constraint when visiting each station, which is expressed as
[0040]
[0041] In the formula, z g,t,k represents the number of passengers that vehicle k can carry in time slice t within cycle g; Z represents the maximum number of passengers that the vehicle can carry;
[0042] Running time constraint: For each vehicle k, all requests must be served within the operating time (|G|·H), and the running vehicle must return to the parking lot before the end of the operating time, which is expressed as
[0043]
[0044]
[0045] In the formula, represents the waiting time of vehicle k in time slice t within cycle g, represents the total waiting time of vehicles during operation hours; i |G|,|T|,k represents the station of vehicle k at the end of the operating time;
[0046] Transit time constraint: The transit time of each request must not be greater than α times the shortest path direct time of the request, expressed as
[0047]
[0048] In the formula, represents the boarding station for request n; represents the alighting station of request n; vel represents the average speed of the vehicle.
[0049] Furthermore, in step S4, core elements are defined based on multi-agent reinforcement learning, specifically:
[0050] The global state S is used by the vehicle state SK and request status S N Indicates that S = {S K ,S N}, use S g,t represents the global state in time slice t within period g, then and They correspond to the vehicle status and request status at time slice t in cycle g, respectively. Request Status o g,t,k represents the local state of the intelligent vehicle k at time slice t in period g;
[0051] The action space A of the intelligent vehicle k g,t,k (a g,t,k ∈A g,t,k ) is defined as
[0052]
[0053] In the formula, represents the next moving action of vehicle k in time slice t within period g; p n Indicates the access action of request n; d n Indicates the delivery action of request n; Indicates the action of returning to the parking lot; Indicates that vehicle k is moving Previous waiting time;
[0054] The four pruning operations include pruning according to the access order, pruning according to the in-transit time constraint, pruning according to the running time constraint, and pruning according to the passenger capacity constraint; the state transfer includes the state transfer within the cycle and the state transfer between cycles; in view of the dual-objective optimization task of the Markov decision process model, two reward functions are set, namely, the cost reward R C and fair rewards And set the weight ρ to calculate the total reward function.
[0055] Furthermore, in step S5, a novel multi-agent reinforcement learning framework is designed, including a rolling value decomposition network algorithm combined with demand forecasting, to enhance the foresight of each cycle planning, specifically:
[0056] Each Q function is represented by a neural network. Before training in period g, for each intelligent vehicle k∈K, a neural network consisting of θ is initialized. g,k The local Q function Q k ; Considering that the local state with time-related information is used to represent the state information, let the joint state be O = (o1, o2, ..., o |K| ), the joint action is A=(a1,a2,…,a |K|), then the joint network can be composed of each Q k Linear summation yields Therefore, we can get Q for training tot and Q for each agent vehicle decision k , the objective function of each cycle is converted to
[0057]
[0058] In the formula, Q tot represents the joint Q function; O g,1 represents the joint state at time slice t = 1 within period g; o g,0,k represents the local state of vehicle k at time slice t = 0 in period g; θ g,k represents the parameters of vehicle k in period g; o g,0 represents the local state at time slice t = 0 within period g; θ g represents the parameters within the period g; π g represents the policy function within period g; π g,k represents the strategy function of vehicle k in period g; Q k represents the local Q function of vehicle k;
[0059] Due to the introduction of the rolling time domain framework and demand forecast, cycle shift and demand forecast are incorporated into the optimization of each cycle, and the objective function of each cycle is further transformed into:
[0060]
[0061] In the formula, θ g,1,k represents the local state of vehicle k at time slice t = 1 in period g; represents the set of prediction requests for period g; o g,1 represents the local state at time slice t = 1 within period g; o g-1,|T|,k represents the local state of vehicle k at time slice t=|T| in period g-1.
[0062] Furthermore, in step S5, a novel multi-agent reinforcement learning framework is designed, including improving the ∈-greedy action selection strategy through time-related information to improve the search efficiency during reinforcement learning training, specifically:
[0063] In order to combine random search with search based on time-related information, a ∈-greedy greedy algorithm is proposed. At the beginning of training, two initial search rates ∈1 and ∈2 are set, where ∈1+∈2≤1, and the action selection strategy is
[0064]
[0065] In the formula, represents the greedy action that can bring the maximum expected reward at the current moment; ∈1(τ) represents the search rate of ∈1 when the number of steps is τ, and ∈2(τ) represents the search rate of ∈2 when the number of steps is τ;
[0066] The corresponding search rate calculation formula for ∈1(τ) and ∈2(τ) under the decay mechanism is:
[0067]
[0068] In the formula, is the maximum number of decay steps ∈ 1, is the maximum number of decay steps for ∈2.
[0069] Furthermore, in step S5, a novel multi-agent reinforcement learning framework is designed, including combining multi-agent reinforcement learning with a local search strategy based on variable neighborhood descent and imitation learning, and designing a loss function, specifically:
[0070] In order to improve the computational efficiency, three neighborhood operators are designed, and the concept of "entropy" is combined to guide the application of neighborhood operators. The calculation formulas of the three entropy indicators are:
[0071]
[0072] In the formula, ρ represents the target weight; Indicate route the costs associated with Indicate route Request set; β represents the weight coefficient of the two types of rewards; Indicate route duration of loop l; c(l) represents the cost associated with loop l; N(l) represents the set of requests for loop l; Δ(l) represents the duration of loop l; c(n) represents the cost associated with request n; Δ(n) represents the duration of request n;
[0073] Each entropy indicator is designed according to the defined reward function, and divided by the duration to indicate the degree of reward increase per unit operating time; first, priority list 1 is constructed in descending order of μ1(k), then priority list 2 is constructed in descending order of μ2(l), and finally priority list 3 is constructed in descending order of μ3(n);
[0074] The local search strategy includes intra-loop movement, inter-loop movement, and insert-reject-request movement. A local search strategy based on a variable neighborhood descent algorithm is proposed. Given an initial planning scheme for a cycle, that is, the initial solution x0, and the maximum number of iterations, the variable neighborhood descent algorithm is as follows:
[0075]
[0076]
[0077] The total loss function is equal to the sum of the mean square error loss function of the TD error and the imitation learning loss, expressed as
[0078] L=L TD +L IL
[0079] Where, L TD represents the mean square error of TD error; L IL represents the imitation learning loss.
[0080] Compared with the prior art, the present invention establishes a multi-objective Markov decision process model based on a rolling time domain framework; designs a temporary request rejection mechanism, a prediction error correction mechanism, and an overdue compensation mechanism to solve problems that may arise in dynamic scheduling; establishes a dual-objective flexible public transportation dynamic scheduling objective function, with the first objective minimizing the total cost and the second objective optimizing the fairness of temporary request waiting time; defines the core elements of state, action, and reward based on multi-agent reinforcement learning, designs a new multi-agent reinforcement learning framework, and solves the problem of flexible public transportation dynamic scheduling. The method of the present invention can reduce operating costs, improve passenger fairness, and improve service quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] Figure 1 Flowchart of a flexible bus dynamic scheduling method considering mixed requests and fairness.
[0082] Figure 2 In the figure, (a) is a schematic diagram of the rolling time domain framework, (b) is a schematic diagram of the temporary request rejection mechanism, and (c) is a schematic diagram of the prediction error correction mechanism.
[0083] Figure 3 Schematic diagram of the overdue compensation mechanism.
[0084] Figure 4 Schematic diagram of the new multi-agent reinforcement learning framework.
[0085] Figure 5 Schematic diagram of three types of neighborhood movement operators.
[0086] Figure 6 This is the Sioux Falls road network diagram in the embodiment.
[0087] Figure 7 This is a graph showing the results of solving the optimal target value using the five algorithms in the embodiment.
[0088] Figure 8 CTDE and distributed training evolution process in the embodiment. DETAILED DESCRIPTION
[0089] The flexible public transportation dynamic scheduling method considering mixed requests and fairness of the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0090] See also Figure 1 The present invention discloses a flexible bus dynamic scheduling method considering mixed requests and fairness, comprising the following steps:
[0091] S1. Establish a Markov decision process model based on the rolling horizon framework, and explain the flexible bus dynamic scheduling problem considering mixed requests and fairness through the Markov decision process model;
[0092] S2. Markov decision process model designs temporary request rejection mechanism, prediction error correction mechanism and overdue compensation mechanism to solve the problems arising from dynamic scheduling of flexible public transportation;
[0093] S3. Determine the cost of flexible bus dynamic scheduling, establish the objective function of the Markov decision process model, and set the constraints of the Markov decision process model;
[0094] S4. Based on the core elements of multi-agent reinforcement learning, a new multi-agent reinforcement learning framework is designed to solve the problem of flexible bus dynamic scheduling.
[0095] In order to facilitate the description of the mathematical model below, Table 1 lists the symbolic variables involved in the mathematical model of the present invention.
[0096] Table 1 Symbolic variables
[0097]
[0098]
[0099] In step S1, Figure 2 As shown in (a) of the figure, the rolling horizon method is used to transform the problem into a series of interdependent sub-problems. The operation period is divided into |G| cycles of length H, and the request set corresponding to each cycle g is N g , including a collection of reservation requests and temporary request collection In case of demand forecast, temporary request Expected to be submitted in cycle g; in the absence of demand forecasts, ad hoc requests are submitted before cycle g but are included in the planning phase of cycle g In order to establish the Markov decision process model, each cycle g∈G is divided into |T| time slices, and decisions are made only at the beginning of each time slice. Therefore, the maximum number of decisions made by each vehicle in a cycle is |T|. In addition, the buffer time of the optimization execution phase is set to BT, during which the next cycle is planned.
[0100] In step S2, as shown in (b) of Figure 2 , design a temporary request rejection mechanism. When a temporary request cannot be allocated to any vehicle within the current cycle, consider incorporating it into the next cycle for planning. If the additional cost of the service request is lower than the penalty cost of rejecting the request, then incorporate the request into the next cycle's planning; otherwise, reject the request. If the request is rejected, mark the request as rejected at the start of the next cycle, at which time
[0101] as shown in (c) of Figure 2 , design a prediction error correction mechanism. Generally speaking, there are three types of prediction errors for request n, namely the number of passengers error, the submission time error, and the stop error. The condition for triggering correction is whether the constraints are violated. Assume that the predicted number of passengers for request n is the actual number of passengers is q n , and it is planned to be allocated to vehicle k. When , not only when picking up request n, but also in the subsequent routes of the planned solution, it is necessary to determine whether vehicle k still satisfies the capacity constraint. If vehicle k still satisfies the capacity constraint in the updated route, then the existing solution can be executed; otherwise, vehicle k cannot serve request n as expected, that is, the existing solution fails, and corresponding corrections need to be made to ensure effective scheduling. The correction starts with searching whether there is a running vehicle that can serve request n. If no vehicle can serve request n, then merge it into the request set of the next cycle.
[0102] as shown in Figure 3 , design an overdue compensation mechanism. For vehicle k ∈ K, initialize a variable AT g,t,k at each cycle, which represents the timestamp when vehicle k completes the current decision at time slice t within cycle g. Therefore, when cycle g ends, AT g,|T|,k is the duration of its route; if AT g,|T|,k > g·H, then the duration of the route of vehicle k within cycle g is overdue; in this case, it is necessary to update the usage time information of vehicle k in the next cycle g + 1, that is, add AT to the initialization of the next cycle. The route of vehicle k in cycle 1 ends before H (AT g,|T|,k < H), so there is no overdue in cycle 1. However, since the route duration of cycle 2 exceeds 2H (AT 1,|T|,k > 2H), it is necessary to add the overdue time AT 2,|T|,k - 2H at the start of cycle 3. 2,|T|,k
[0103] In step S3, determine the cost of flexible bus dynamic scheduling. The cost includes transportation cost and passenger cost. The transportation cost is the driving mileage and the cost per unit mileage δ fThe product of
[0104]
[0105] Passenger cost includes time window penalty cost and refusal response cost, which is expressed as
[0106]
[0107] The objective function of the Markov decision process model is established. The first objective function minimizes the total cost, so that the total cost of each cycle is minimized, which is expressed as
[0108]
[0109] The second objective function optimizes the fairness of temporary request waiting time, the waiting time W n The calculation formula is
[0110]
[0111] Introducing Fairness Indicators To measure the fairness of passenger waiting time, the second objective function considering the fairness index is expressed as
[0112]
[0113] Set the constraints of the Markov decision process model, including vehicle passenger capacity constraints, operating time constraints, and en route time constraints.
[0114] Vehicle capacity constraints: The vehicle must meet the capacity constraints when visiting each station.
[0115]
[0116] Runtime constraint: For each vehicle k, it must serve all requests within the operating time (|G|·H) and return to the parking lot before the end of the operating time.
[0117]
[0118] Transit time constraint: The transit time of each request shall not be greater than α times the shortest path direct time of the request.
[0119]
[0120] In step S4, the global state S can be used as the vehicle state S K and request status S N Indicates that S = {S K ,S N For a certain intelligent vehicle k, its corresponding vehicle state Defined as
[0121]
[0122] Request Status Defined as
[0123]
[0124] Use o g,t,k represents the local state of the intelligent vehicle k at time slice t in period g, o g,t,k The dimension is 2|N g |+3.
[0125]
[0126] The action space A of the intelligent vehicle k g,t,k (a g,t,k ∈A g,t,k ) is defined as
[0127]
[0128] The waiting time is considered only when vehicle k decides to accept the request. At this time, the optimal waiting time calculation formula is:
[0129]
[0130] The dimension of the entire action space is determined by the number of requests per cycle N g Determine, that is, 2|N g |+|J|+1.
[0131] After pruning the action space, we can obtain a modified action space for vehicle k that only contains valid actions: That is, the “effective action space”. The four pruning operations include pruning based on access order, pruning based on en route time constraints, pruning based on running time constraints, and pruning based on passenger capacity constraints.
[0132] Pruning by access order: Definition is the set of in-transit requests of vehicle k in time slice t within period g. Therefore, for vehicle k, if the request Then the service request n (i.e. action ) is considered to be a valid action for vehicle k at that moment; if the request action Will be from Removed.
[0133] Pruning based on transit time constraints: If That is, vehicle k has no en-route request, so there is no need to prune according to the en-route time constraint; if For any unassigned or uncompleted request, whether vehicle k can provide pick-up service depends on the vehicle’s current location i g,t,k , in-transit request collection and The pickup time for the associated request.
[0134] There are two scenarios to determine whether vehicle k can access the station to serve request n. Scenario 1: When request n has not been assigned to any vehicle (i.e. ),judge Is it a valid action for vehicle k? Scenario 2: When request n has been assigned to vehicle k but has not yet been delivered (i.e. ),judge Is it a valid action for vehicle k?
[0135] Pruning based on runtime constraints: Scenario 1: Determine whether vehicle k can accept request n; Scenario 2: Determine whether vehicle k can deliver request n; Scenario 3: Determine whether vehicle k can return to the parking lot.
[0136] Pruning based on passenger capacity constraints: Whether vehicle k can accept unassigned requests n depends on the current passenger capacity z of vehicle k g,t,k and the number of passengers q who make reservations for request n n If equation (17) is satisfied, then is a valid action that meets the passenger capacity constraint, otherwise Removed.
[0137] z g,t,k +q n ≤Z (17)
[0138] State transfer includes intra-cycle state transfer and inter-cycle state transfer.
[0139] State transfer within a cycle: given a g,t,k , that is, the vehicle state of vehicle k, can be converted into Updated to Then, according to and a g,t,k renew That is, if Update v g,t+1,n =k, if renew In addition, you can also and Update the local state o with time-dependent information g,t,k →p g,t+1,k .
[0140]
[0141] State transition between cycles: When g→g+1, if there is no overdue request or route, it can be simply transferred through and N g+1 Initialize state variables; otherwise, determine: (1) N g Are there any unassigned requests? (2) Whether each vehicle k∈K can complete the route before the end of cycle g To update AT k In case (1), for each unassigned request n, if It will be rejected and recorded and if Then it will be inherited to the request set of the next cycle, that is, N g+1 ←N g+1 ∩{n}, and through the updated N g+1 renew In case (2), it can be updated by equations (21)-(23) If AT g,|T|,k >(g+1)·H, indicating the route If the time limit is exceeded, AT g,|T|,k Inherit to the next cycle; otherwise, AT g+1,1,k Initialized to (g+1)·H, which is the beginning of cycle g+1.
[0142] i g+1,1,k =i g,|T|,k (twenty one)
[0143] z g+1,1,k =z g,|T|,k (twenty two)
[0144] AT g+1,1,k =max{AT g,|T|,k ,(g+1)·H} (23)
[0145] Defining the reward function
[0146] From S g,t To S g,t+1 The reward after the state transition R(S g,t+1 |S g,t ) is expressed as
[0147]
[0148] The calculation of mileage cost in state transfer occurs every time the vehicle position changes, which is expressed by formula (25).
[0149]
[0150] When t<|T|, the passenger cost in time slice t within period g is expressed by equation (26).
[0151]
[0152] When t = |T|, the passenger cost caused by rejecting temporary requests is considered, which is expressed by equation (27).
[0153]
[0154] Cost reward for time slice t in period g The calculation formula is
[0155]
[0156] Fair Rewards Mainly through fairness indicators The recursive calculation is implemented in each time slice. This indicator is determined by the waiting time of the temporary request n in each time slice t within the period g. The calculation formula is:
[0157]
[0158] Average wait time for ad hoc requests And the fairness index under time slice t in period g The calculation formula is
[0159]
[0160] The calculation formula for fair rewards in time slice t within period g is:
[0161]
[0162] The Bellman equation is the key to optimizing MDP, including the definition of the policy function π and the state-action value function Q (called Q function). The policy function π indicates which action should be chosen given a certain state, that is, When given S g,t and When the value of the Q function is based on the strategy Execute A g,t The cumulative rewards obtained after that are:
[0163]
[0164]
[0165] Since the model needs to optimize the planning scheme for the entire cycle g∈G, it is necessary to find an optimal strategy Maximize the Q function from t = 1 to t = |T|, that is:
[0166]
[0167] In step S4, Figure 4 As shown in the figure, a new multi-agent reinforcement learning framework is designed to solve the problem of flexible bus dynamic scheduling.
[0168] The rolling value decomposition network (VDN) algorithm combined with demand forecasting is used to enhance the forward-looking nature of each cycle planning. The value decomposition network algorithm is based on centralized training and decentralized execution methods. tot to represent the team reward, but allows each agent vehicle k∈K to use a local Q function Q k Make a decision, Q k can be obtained from Q by linear summation tot In the present invention, each Q function is represented by a neural network. Before training in period g, for each intelligent vehicle k∈K, a neural network consisting of θ is initialized. g,k The local Q function Q k . Let the joint state be O = (o1, o2, ..., o |K| ), the joint action is A=(a1,a2,…,a |K| ),but Therefore, we can get Q for training tot and Q for each agent vehicle decision k , the objective function of each cycle can be converted to
[0169]
[0170] Incorporating cycle shift and demand forecast into the optimization of each cycle, equation (35) can be further transformed into
[0171]
[0172] Regarding the experience replay mechanism, in each interaction between the agent and the environment, a transfer tuple is recorded As experience is transferred, it is stored in a fixed-size buffer called the "RL buffer".
[0173] Improve the ∈-greedy action selection strategy by using time-dependent information to improve the search efficiency during reinforcement learning RL training. Given o g,t,k , the time-related information of each request of vehicle k can be obtained, that is Γ(o g,t,k ) indicates that according to o g,t,k The time-related information determines the function of the action, which is defined by equations (37)-(38).
[0174]
[0175]
[0176] The present invention proposes an ∈-greedy greedy algorithm, which sets two initial search rates ∈1 and ∈2 at the beginning of training, where ∈1+∈2≤1. τ represents the current training step number, then ∈1(τ) and ∈2(τ) represent the search rates of ∈1 and ∈2 when the step number is τ. Therefore, the action selection strategy is
[0177]
[0178] The corresponding search rate calculation formula for ∈1(τ) and ∈2(τ) under the decay mechanism is:
[0179]
[0180] Multi-Agent Reinforcement Learning (MARL) is combined with a local search strategy based on Variable Neighborhood Descent (VND) and imitation learning to improve solution quality and training performance, and the corresponding loss function is designed.
[0181] The neighborhood movement operation is performed by dividing the completed route into several relatively shorter routes, called "service loops".
[0182] In order to quantify the potential of each route, loop and request in improving the solution quality, the concept of "entropy" is introduced, represented by μ1, μ2 and μ3 respectively. The larger the entropy, the greater the potential for improving the solution quality. The calculation of the three entropy indicators is as follows.
[0183]
[0184] First, construct priority list 1 in descending order of μ1(k)(k∈K), then construct priority list 2 in descending order of μ2(l), and finally construct priority list 3 in descending order of μ3(n).
[0185] like Figure 5 As shown, three neighborhood movement operators are designed for the local search strategy: intra-loop movement, inter-loop movement, and insert-reject-request movement.
[0186] Moving within the loop
[0187] Step 1: Select a circuit. Select a route from priority list 1 Then pass Select a route from priority list 2 A loop in l.
[0188] Step 2: Check the requested movement in the selected loop. By n = argmax n′∈l μ3(n′) selects a request n from priority list 3 and enumerates all feasible moves of n. For each feasible move of n, calculate the route reward. Remove n from the priority list 3 and repeat the above steps to process the remaining requests in l.
[0189] Step 3: Confirm In Step 2, select the one with the largest reward from all possible moves. Remove l from priority list 2 and repeat the above steps until priority list 2 is empty.
[0190] Moving between circuits
[0191] The circuit index μ4(l,n) is introduced to indicate which circuit has the priority to serve the new request n. When a request n is given, a new priority list 4 can be constructed by calculating μ4(l,n) of each circuit and sorting them.
[0192]
[0193] Step 1: Select a request. By n = argmax n′ μ3(n′) selects a request n from priority list 3.
[0194] Step 2: Select a loop and insert the selected request. Select a loop l from priority list 4 (except the loop that previously contained request n) and insert n at the end of l.
[0195] Step 3: Check all possible moves. Move to the end position of l, and then perform Step 2 of "Move within the loop", but only for request n. If there is a feasible move, calculate the reward; otherwise, remove l from priority list 4. Repeat the above steps until priority list 4 is empty.
[0196] Step 4: Confirm In Step 3, select the one with the largest reward increase from all feasible moves; otherwise, stop the neighborhood movement and output the original solution. Remove n from priority list 3 and repeat the above steps until priority list 3 is empty.
[0197] Insert-Reject-RequestMove
[0198] Step 1: Select a rejected request. That is, n = argmax n′ q n′ ·δ b .
[0199] Step 2: Select a loop and insert the rejected request. Select a loop l from the priority list 4 and insert n at the end of l.
[0200] Step 3: Check all possible moves and determine the best move.
[0201] The present invention proposes a local search strategy based on a variable neighborhood descent algorithm, specifically:
[0202]
[0203] The target value R(x) is calculated as follows:
[0204] R(x)=ρ·(C f +C u )+(1-ρ)·ζ·β (46)
[0205] Similar to the experience replay mechanism of RL, a local search transfer is recorded And store it in a fixed-size local search buffer.
[0206] Extract ω from the RL buffer RL The experience of the batch is used to calculate the mean square error loss function of the TD error through equations (47)-(49), which is expressed as
[0207]
[0208]
[0209] Extract ω from the local search buffer LS The experience of the batch is used to calculate the imitation learning loss L through equations (50)-(52) IL , expressed as
[0210]
[0211] The total loss function calculation formula is:
[0212] L=L TD +L IL (53)
[0213] Example
[0214] This embodiment adopts the classic road network Sioux Falls. In order to better evaluate the optimization performance of the algorithm proposed in the present invention on the multi-period problem, four evaluation indicators are designed: effective average user cost EAUC, weighted average fairness index WAFI, average delayed arrival time ALAT and response rate RR.
[0215]
[0216]
[0217] like Figure 6 As shown in Figure 1, the Sioux Falls network has a total of 24 nodes, of which station 0 is a parking lot and the remaining 23 nodes are service stations. A downtown area is set up in the road network ( Figure 6 Orange shaded area). For the single-period problem, consider a medium-sized static problem where 30 requests need to be assigned to 8 buses within 1 hour; for the multi-period problem, consider a dynamic scenario where 86 requests need to be assigned to 8 buses within 3 hours.
[0218] Assume that the time slice (|T|) of each cycle is 30, the average vehicle speed (vel) is 30 km / h, and the relevant unit transportation cost and penalty cost δ f ,δ e ,δ l ,δ b They are 1.2¥ / km, 0.25¥ / (min·pax), 0.5¥ / (min·pax) and 10¥ / pax respectively, the delay coefficient (α) is 2.5, the cost target weight (ρ) and the weight coefficients of the two types of rewards (β) are 0.8 and 20 respectively.
[0219] For the hyperparameter values, a two-layer fully connected RNN network is used as the deep neural network architecture. Each hidden layer consists of 64 neurons and the number of training steps (τ RL ) is 8000, the number of VND iterations (τ LS ) is 2000, the learning rate is 0.01, the discount rate (γ) is 0.95, the initial search rate (∈1,∈2) is 0.4 and 0.6, and the corresponding decay steps ( and ) are 4000 and 8000.
[0220] For experience replay, the sizes of the reinforcement learning RL buffer and the local search buffer are 20000 and 2000 respectively, ω RL and ω LS The minimum batch size is 32. The target network update interval is 100.
[0221] Single-cycle problem discussion
[0222] In order to verify the effectiveness of the algorithm in solving the single-period problem, 10 medium-sized examples are randomly generated. Figure 7 It can be seen that the algorithm proposed in this invention outperforms other algorithms in all instances. Compared with "DRL (improved)" and "VND", the target value of "DRL (improved) + VND" is greatly reduced, with an average reduction of 25.71% and 43.39% in all 10 examples, respectively, which proves the advantage of combining DRL with the local search algorithm.
[0223] In addition, by comparing "DRL (improved)" with "standard DRL", it can be found that the average reduction in the target value is 83.32%, which proves the effectiveness of the improved ∈-greedy greedy strategy. In addition, the performance of "greedy" is the worst among all instances. The above results demonstrate the superiority of the algorithm proposed in this paper compared with other algorithms and show its ability to effectively solve complex static problems.
[0224] Depend on Figure 8 It can be seen that the centralized training distributed execution method (called "CTDE") outperforms the distributed method (called "distributed") in almost all examples (except Example 1). In terms of training stability, regardless of ρ, the CTDE curves of all examples continue to rise and converge to a stable level after 5000 steps; while the distributed method fails to converge in most examples (5 out of 9), which shows that the algorithm proposed in this invention has strong scalability, thus ensuring reliable training performance.
[0225] In terms of convergence value, based on the average cumulative reward of the last 500 training steps, when ρ is 0, 0.5 and 1 respectively, the convergence value of CTDE is 61.23%, 32.24% and 32.1% higher than that of the decentralized method on average, which indicates that the algorithm proposed in the present invention has better convergence ability when searching for improved solutions. In addition, the gap between the two curves widens as the ρ value decreases, which indicates that the algorithm of the present invention has significant superiority in providing the optimal solution under the consideration of fairness objectives.
[0226] The training evolution process of the algorithm proposed in the present invention when solving Example 1 is measured by four evaluation indicators. For EAUC and WAFI, they initially fluctuate in the first 4000 steps, and then quickly converge to 6.268 and 3.485, respectively, with decreases of 36.66% and 68.32% compared with the initial values, respectively, which shows that the algorithm of the present invention has good performance in solving the dual-objective optimization problem of cost and fairness.
[0227] At the same time, the evaluation indicators of service quality (i.e., ALAT and RR) were also significantly improved, with ALAT reduced from a maximum of approximately 6.059 minutes to 0.142 minutes, and RR increased from a minimum of approximately 58% to 96%, further confirming the excellent performance of the algorithm of the present invention in indicator optimization.
[0228] Multi-period problem discussion
[0229] Table 2 lists the results of the three indicators when solving multi-period problems with and without demand forecasts, as well as the average planning time for each period. The results show that the operational performance with demand forecasts is always better than that without demand forecasts, with EAUC, WAFI, and ALAT significantly reduced by 58.42%, 73.4%, and 94.58%, respectively, indicating that demand forecasts have significant advantages in reducing costs, improving passenger fairness, and improving service quality when the forecasting method reaches sufficient accuracy.
[0230] Compared with no demand forecast, the planning time per cycle is longer with demand forecast (12.88 seconds on average), because additional computing time is required to correct the forecast error when each temporary request is submitted, including neighborhood movement and feasibility check. In addition, there is no significant difference in RR with or without demand forecast, indicating that demand forecast can improve the other three indicators to a great extent while ensuring a high response rate.
[0231] Table 2 Comparison results of three indicators with and without demand forecast
[0232]
[0233] Sensitivity analysis
[0234] The impact of different cycle lengths H on performance with and without demand forecasting is analyzed. As H increases, although the difference in RR with and without demand forecasting is small, the gaps in EAUC, WAFI, and ALAT are large. Without considering demand forecasting, when H increases from 5 to 10, EAUC decreases slightly by 1.56%, while when H further increases to 50, EAUC increases by 114.3%. This is because the larger H is, the more requests can be planned simultaneously, but at the cost of lower flexibility in scheduling adjustments. Therefore, when H exceeds the critical value, the negative impact of the reduced frequency of scheduling adjustments exceeds the benefits of centralized planning.
[0235] In contrast, when demand forecasting is considered, EAUC decreases with the increase of H for two reasons. First, demand forecasting can mitigate the negative impact of the reduced frequency of scheduling adjustments. Second, a longer look-ahead length (H) allows more future requests to be considered. Similarly, when demand forecasting is not considered, WAFI and ALAT increase significantly with the increase of H, while the change is not obvious when demand forecasting is considered. This is because temporary requests cannot be met in time when the scheduling adjustment frequency is low.
[0236] The impact of the target weight ρ on the four indicators was analyzed, and it was found that the RR difference was small. As ρ increased, EAUC decreased and WAFI increased, which showed the trade-off between cost and fairness. The change amplitude of EAUC and WAFI was different. Specifically, when ρ increased from 0 to 1, EAUC decreased by 17%; when ρ increased from 0 to 0.5, WAFI increased slightly by 1.523%, and when ρ increased to 1, WAFI increased significantly by 42.66%.
[0237] Based on this, when using demand forecasting, setting ρ to 0.5 can better balance the two indicators, because it can quickly reduce EAUC without causing a significant increase in WAFI. When there is no demand forecast, ALAT decreases significantly with the increase of ρ, while the change is not obvious when there is demand forecasting. This is mainly because cost optimization helps to reduce the time window penalty cost, while emphasizing fairness will deteriorate this indicator. However, the introduction of demand forecasting can alleviate this negative effect.
[0238] The impact of demand forecast error Ψ on performance is analyzed. The indicator results with demand forecast (regardless of whether there is a correction mechanism) are much better than those without demand forecast, at the cost of a slight decrease in RR, which verifies the benefit of introducing demand forecast. When there is demand forecast, as Ψ increases, all indicators seem to deteriorate, especially when Ψ increases from 0 to 0.1.
[0239] However, EAUC, ALAT, and RR with prediction error correction are always better than those without prediction error correction, and the gap between them becomes larger with the increase of Ψ, especially EAUC and ALAT, which indicates that the prediction error correction mechanism helps to reduce the negative impact of prediction error. The difference of WAFI is not significant, which indicates that the impact of prediction error on fairness is limited.
[0240] The above description is a detailed description of the preferred feasible embodiments of the present invention, but the embodiments are not intended to limit the scope of the patent application of the present invention. All equivalent changes or modified changes completed under the technical spirit disclosed by the present invention should fall within the patent scope covered by the present invention.
Claims
1. A flexible bus dynamic scheduling method considering mixed requests and fairness, It is characterized in that The following steps are involved: S1. Establish a Markov decision process model based on the rolling horizon framework, and explain the flexible bus dynamic scheduling problem considering mixed requests and fairness through the Markov decision process model; S2. Markov decision process model designs temporary request rejection mechanism, prediction error correction mechanism and overdue compensation mechanism to solve the problems arising from dynamic scheduling of flexible public transportation; S3. Determine the cost of flexible bus dynamic scheduling, establish the objective function of the Markov decision process model, and set the constraints of the Markov decision process model; S4. Based on the core elements of multi-agent reinforcement learning, a new multi-agent reinforcement learning framework is designed to solve the problem of flexible bus dynamic scheduling.
2. The flexible bus dynamic scheduling method considering mixed requests and fairness according to claim 1, It is characterized in that In step S1, a Markov decision process model is established based on a rolling horizon framework, specifically: The operation period is divided into |G| periods of length H. The request set corresponding to each period g is N. g , including a collection of reservation requests and temporary request collection In case of demand forecast, temporary request Expected to be submitted within cycle g, in the absence of demand forecast, temporary requests are submitted before cycle g, but are included in the temporary request set during the planning stage of cycle g In order to establish the Markov decision process model, each cycle g∈G is divided into |T| time slices. Decisions are made only at the beginning of each time slice. The maximum number of decisions for each vehicle in a cycle is |T|. The buffer time of the optimization execution phase is set to BT, and the next cycle is planned during the buffer time BT.
3. The flexible bus dynamic scheduling method considering mixed requests and fairness according to claim 2, It is characterized in that In step S2, a temporary request rejection mechanism is designed, specifically: When a temporary request cannot be assigned to any vehicle in the current cycle, consider including it in the next cycle for planning. By comparing the additional cost of serving the request in the next cycle with the penalty cost of rejecting the request, it is evaluated whether accepting the request is beneficial. If the additional cost of serving the request is lower than the penalty cost of rejecting the request, the request is included in the next cycle planning, otherwise the request is rejected. Design a prediction error correction mechanism, specifically: The prediction errors of request n include three types: passenger number error, submission time error, and station error. The condition for triggering correction is whether the constraint is violated. Whether the constraint is violated is derived from the planned route of the existing solution and the update information of request n; Once the forecast error does not meet the constraints, it needs to be corrected accordingly to ensure the effectiveness of the plan; Assume that the predicted number of passengers for request n is The actual number of passengers is q n , and plans to allocate to vehicle k; when Not only when accepting request n, but also in the subsequent routes of the plan, it is necessary to determine whether vehicle k still meets the capacity constraint; If vehicle k still meets the capacity constraint in the updated route, the existing solution can be executed. Otherwise, vehicle k cannot serve request n as expected, that is, the existing solution fails and needs to be corrected to ensure effective scheduling. The correction starts with searching whether there is a running vehicle that can serve request n. If no vehicle can serve request n, it will be merged into the request set of the next cycle. Design an overdue compensation mechanism, specifically: For vehicle k∈K, a variable AT is initialized in each cycle g,t,k , represents the timestamp when vehicle k completes the current decision in time slice t within cycle g. Therefore, when cycle g ends, AT g,|T|,k is the duration of its route; If AT g,|T|,k >g·H, then the route of vehicle k in period g The duration of AT is exceeded; in this case, it is necessary to update the usage time information of vehicle k in the next cycle g+1, that is, g,|T|,k Added to the initialization of the next cycle.
4. The flexible bus dynamic scheduling method considering mixed requests and fairness according to claim 3, It is characterized in that In step S3, the cost of flexible bus dynamic scheduling is determined, specifically: The cost includes transportation cost and passenger cost. The transportation cost is the product of mileage and unit mileage cost, expressed as In the formula, represents the transportation cost of cycle g; δ f represents the unit mileage cost; i g,t,k represents the station of vehicle k in time slice t within cycle g; i g,t+1,k represents the station of vehicle k at time slice t+1 in cycle g; DIS(i g,t,k ,i g,t+1,k ) indicates that from site i g,t,k To site g,t+1,k distance; Passenger costs include time window penalty costs and rejection penalty costs, and the calculation formula is: In the formula, represents the passenger cost of cycle g; is a 0-1 variable, Indicates that temporary request n is successfully responded to. Indicates that the temporary request n is rejected; δ e represents the penalty cost of early arrival per unit; q n Indicates the number of people boarding the bus with request n; Indicates the earliest departure time of reservation request n or the submission time of a temporary request; represents the access time of request n; δ l represents the unit late penalty cost; represents the latest departure time of request n; δ b N represents the unit refusal response cost; g Represents the set of requests within period g.
5. According to the flexible bus dynamic scheduling method considering mixed requests and fairness as described in claim 4, It is characterized in that The objective function of the Markov decision process model is established as follows: The first objective function minimizes the total cost, making the total cost of each cycle as small as possible, expressed as The second objective function optimizes the fairness of temporary request waiting time. The waiting time calculation formula is: Where W n Indicates the waiting time for request n; Introducing Fairness Indicators To measure the fairness of passenger waiting time, the second objective function considering the fairness index is expressed as In the formula, It represents the average waiting time of temporary requests in period g.
6. The flexible bus dynamic scheduling method considering mixed requests and fairness according to claim 5, It is characterized in that Set the constraints of the Markov decision process model, specifically: Vehicle capacity constraint: The vehicle must satisfy the capacity constraint when visiting each station, which is expressed as In the formula, z g,t,k represents the number of passengers that vehicle k can carry in time slice t within period g; Z represents the maximum number of passengers that the vehicle can carry; Running time constraint: For each vehicle k, all requests must be served within the operating time (|G|·H), and the running vehicle must return to the parking lot before the end of the operating time, which is expressed as In the formula, represents the waiting time of vehicle k in time slice t within cycle g, It indicates the total waiting time of vehicles during the operation hours; i |G|,|T|,k represents the station of vehicle k at the end of the operating time; Transit time constraint: The transit time of each request must not be greater than α times the shortest path direct time of the request, expressed as In the formula, represents the boarding station for request n; represents the alighting station of request n; vel represents the average speed of the vehicle.
7. The flexible bus dynamic scheduling method considering mixed requests and fairness according to claim 6, It is characterized in that In step S4, core elements are defined based on multi-agent reinforcement learning, specifically: The global state S is used by the vehicle state S K and request status S N Indicates that S = {S K , S N }, use S g,t represents the global state in time slice t within period g, then and They correspond to the vehicle status and request status at time slice t in cycle g, respectively. Request Status o g,t,k represents the local state of the intelligent vehicle k at time slice t in period g; The action space A of the intelligent vehicle k g,t,k (a g,t,k ∈A g,t,k ) is defined as In the formula, represents the next moving action of vehicle k in time slice t within period g; p n Indicates the access action of request n; d n Indicates the delivery action of request n; Indicates the action of returning to the parking lot; Indicates that vehicle k is moving Previous waiting time; The four pruning operations include pruning according to the access order, pruning according to the in-transit time constraint, pruning according to the running time constraint, and pruning according to the passenger capacity constraint; the state transfer includes the state transfer within the cycle and the state transfer between cycles; in view of the dual-objective optimization task of the Markov decision process model, two reward functions are set, namely, the cost reward R C and fair reward R ζ , and set the weight ρ to calculate the total reward function.
8. The flexible bus dynamic scheduling method considering mixed requests and fairness according to claim 7, It is characterized in that In step S5, a new multi-agent reinforcement learning framework is designed, including a rolling value decomposition network algorithm combined with demand forecasting, to enhance the forward-looking nature of each cycle planning, specifically: Each Q function is represented by a neural network. Before training in period g, for each intelligent vehicle k∈K, a neural network consisting of θ is initialized. g,k The local Q function Q k Considering that the local state with time-related information is used to represent the state information, let the joint state be O = (o 1 , o 2 ,…,o |K| ), the combined action is A=(a 1 , a 2 , …, a |K| ), then the joint network can be composed of each Q k Linear summation yields Therefore, we can get Q for training tot and Q for each agent vehicle decision k , the objective function of each cycle is converted to In the formula, Q tot represents the joint Q function; O g,1 represents the joint state at time slice t = 1 within period g; o g,0,k represents the local state of vehicle k at time slice t = 0 in period g; θ g,k represents the parameters of vehicle k in period g; o g,0 represents the local state at time slice t = 0 within period g; θ g Represents the parameters within the period g; π g represents the policy function within period g; π g,k represents the strategy function of vehicle k in period g; Q k represents the local Q function of vehicle k; Due to the introduction of the rolling time domain framework and demand forecast, cycle shift and demand forecast are incorporated into the optimization of each cycle, and the objective function of each cycle is further transformed into: In the formula, o g,1,k represents the local state of vehicle k at time slice t = 1 in period g; represents the set of prediction requests for period g; o g,1 represents the local state at time slice t = 1 within period g; o g-1,|T|,k represents the local state of vehicle k at time slice t=|T| in period g-1.
9. The flexible bus dynamic scheduling method considering mixed requests and fairness according to claim 7, It is characterized in that In step S5, a novel multi-agent reinforcement learning framework is designed, including improving the ∈-greedy action selection strategy through time-related information to improve the search efficiency during reinforcement learning training, specifically: In order to combine random search with search based on time-related information, a ∈-greedy greedy algorithm is proposed. At the beginning of training, two initial search rates ∈ 1 and ∈ 2 , where ∈ 1 +∈ 2 ≤1, the action selection strategy is In the formula, Represents the greedy action that can bring the maximum expected reward at the current moment; ∈ 1 (τ) indicates that the number of steps is τ∈ 1 The search rate, ∈ 2 (τ) indicates that the number of steps is τ∈ 2 Search rate; Under the decay mechanism ∈ 1 (v) and ∈ 2 The corresponding search rate calculation formula for (τ) is In the formula, for∈ 1 The maximum number of decay steps, for∈ 2 The maximum number of decay steps.
10. The flexible bus dynamic scheduling method considering mixed requests and fairness according to claim 7, It is characterized in that In step S5, a novel multi-agent reinforcement learning framework is designed, including combining multi-agent reinforcement learning with a local search strategy based on variable neighborhood descent and imitation learning, and designing a loss function, specifically: In order to improve the computational efficiency, three neighborhood operators are designed, and the concept of "entropy" is combined to guide the application of neighborhood operators. The calculation formulas of the three entropy indicators are: In the formula, p represents the target weight; Indicate route the costs associated with Indicate route Request set; β represents the weight coefficient of the two types of rewards; Indicate route duration of loop l; c(l) represents the cost associated with loop l; N(l) represents the set of requests for loop l; Δ(l) represents the duration of loop l; c(n) represents the cost associated with request n; Δ(n) represents the duration of request n; Each entropy indicator is designed according to the defined reward function, and divided by the duration to indicate the degree of reward increase per unit operation time; first, according to μ 1 (k) in descending order to construct a priority list 1, and then follow μ 2 (l) in descending order to construct the priority list 2, and finally according to μ 3 (n) in descending order to construct a priority list 3; The local search strategy includes intra-loop movement, inter-loop movement, and insert-reject-request movement. A local search strategy based on a variable neighborhood descent algorithm is proposed. Given an initial planning scheme for a cycle, that is, the initial solution x 0 , and the maximum number of iterations, based on the variable neighborhood descent algorithm are as follows: The total loss function is equal to the sum of the mean square error loss function of the TD error and the imitation learning loss, expressed as L=L TD +L IL Where, L TD represents the mean square error of TD error; L IL represents the imitation learning loss.
Citation Information
Patent Citations
User demand-based dynamic public traffic network system
CN106127325A
Demand response bus look-ahead scheduling method
CN115879620A
Bus scheduling method based on reinforcement learning
CN116307419A
Reinforcement learning with inductive logic programming
US20230143937A1
Cited By
Shared bicycle scheduling variable VRP search method based on deep reinforcement learning driving
CN121936782A
