Public transport network departure frequency optimization method, device, equipment and readable storage medium
Optimizing the departure frequency of bus network through the two-layer planning model and gradient descent algorithm, the shortcomings of existing methods when considering passenger selection behavior and crowding effects are solved, and more accurate bus system optimization and passenger flow distribution prediction are achieved.
Patent Information
- Application Number
- CN202410415483.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-08
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-04-08
AI Technical Summary
Existing bus frequency optimization methods have shortcomings when considering passenger selection behavior and traffic operator interactions, especially in large-scale networks with limited testing and often overlooking the crowding effect, resulting in inaccurate prediction results.
A two-layer planning model is adopted, including the upper and lower models. The upper model optimizes the departure frequency by minimizing the weighted sum of travel expenses and operating expenses of the bus network. The lower model considers the crowding effect through the traffic equalization allocation model and uses the gradient descent algorithm to solve it.
This method can more accurately reflect the interaction between traffic operators and travelers, optimize travel expenses and operating expenses of the bus system, effectively describe changes in passenger flow distribution, and provide a reliable basis for decision-making for traffic planning.
Smart Images

Figure CN118504856B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bus network data processing, and in particular to a bus network departure frequency optimization method, device, equipment and a readable storage medium. Background Art
[0002] Bus frequency design plays a vital role in the urban transportation system. Reasonable setting of route departure frequency can effectively improve the quality of bus services and passenger travel satisfaction, and enhance the attractiveness of public transportation to urban residents.
[0003] Early bus frequency design focused on building single-layer analytical models for frequency optimization. Although these studies have produced valuable models and solution algorithms, their single-layer nature often fails to fully consider passengers' choice behavior and the interaction between transportation operators and passengers. In order to better simulate this interaction, scholars in the past have proposed various double-layer frequency optimization models. At present, the research on bus departure frequency optimization has the following main problems: (1) When using bus allocation models to predict passenger flow distribution, the congestion effect is often ignored, and the prediction results cannot well reflect the impact of departure frequency on passenger travel choice behavior; (2) The optimization algorithms proposed at this stage are rarely tested in large-scale networks, which limits the scope of application of the algorithms. Summary of the invention
[0004] The purpose of the present invention is to provide a method, device, equipment and readable storage medium for optimizing the departure frequency of a public transportation network to improve the above-mentioned problems. In order to achieve the above-mentioned purpose, the technical solution adopted by the present invention is as follows:
[0005] In a first aspect, the present application provides a method for optimizing bus network departure frequency, comprising:
[0006] Acquiring first information, wherein the first information includes bus route information and passenger travel behavior information;
[0007] constructing a public transportation network according to the first information;
[0008] A two-level planning model is constructed based on the bus network, where:
[0009] The upper model of the two-level programming model includes an objective function and a first constraint condition, wherein the objective function is to minimize the weighted sum of the travel cost and the operating cost of the bus network, and the first constraint condition is that the departure frequency of any bus line in the bus network is not less than one, and the travel cost of the bus network is determined by the travel cost of the bus network considering the congestion effect and the departure frequency of the bus network;
[0010] The lower model of the two-level programming model includes a flow balance allocation model and a second constraint condition, the second constraint condition includes a flow conservation constraint and a flow non-negative constraint, the flow balance allocation model is a variational inequality of a super-path cost function of the public transportation network, and the super-path travel cost function is determined by the travel cost of the public transportation network considering the congestion effect;
[0011] The bi-level programming model is solved based on a gradient descent algorithm to obtain the departure frequency and objective function value of the bus network.
[0012] In a second aspect, the present application also provides a bus network departure frequency optimization device taking into account congestion effects, comprising:
[0013] An acquisition module, the acquisition module is used to acquire first information, the first information including bus route information and passenger travel behavior information;
[0014] A first construction module, the first construction module is used to construct a public transportation network according to the first information;
[0015] The second building module is used to build a double-layer planning model according to the public transportation network, wherein:
[0016] The upper model of the two-level programming model includes an objective function and a first constraint condition, wherein the objective function is to minimize the weighted sum of the travel cost and the operating cost of the bus network, and the first constraint condition is that the departure frequency of any bus line in the bus network is not less than one, and the travel cost of the bus network is determined by the travel cost of the bus network considering the congestion effect and the departure frequency of the bus network;
[0017] The lower model of the two-level programming model includes a flow balance allocation model and a second constraint condition, the second constraint condition includes a flow conservation constraint and a flow non-negative constraint, the flow balance allocation model is a variational inequality of a super-path cost function of the public transportation network, and the super-path travel cost function is determined by the travel cost of the public transportation network considering the congestion effect;
[0018] A solution module is used to solve the two-level programming model based on a gradient descent algorithm to obtain the departure frequency and objective function value of the bus network.
[0019] In a third aspect, the present application also provides a bus network departure frequency optimization device taking into account the congestion effect, including:
[0020] Memory for storing computer programs;
[0021] A processor is used to implement the steps of the method for optimizing the departure frequency of a public transportation network when executing the computer program.
[0022] In a fourth aspect, the present application further provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned method for optimizing departure frequency based on a public transportation network are implemented.
[0023] The beneficial effects of the present invention are as follows: the present invention can fully reflect the interaction between traffic operators and travelers through a two-level programming model that takes into account the congestion effect, conform to the actual situation of traffic network design, provide a reliable decision-making basis for traffic planners and decision makers, and can also effectively describe the changes in passenger flow distribution caused by adjustments to the departure frequency of the bus network.
[0024] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by implementing the embodiments of the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 It is a schematic diagram of the process flow of the method for optimizing the departure frequency of a public transportation network described in an embodiment of the present invention;
[0027] Figure 2 A schematic diagram of a bus stop in a bus network according to an embodiment of the present invention;
[0028] Figure 3 A schematic diagram of the structure of a public transportation network in an embodiment of the present invention;
[0029] Figure 4 Schematic diagram of the principle of a hyperpath in an embodiment of the present invention;
[0030] Figure 5 Schematic diagram of the principle of a two-layer programming model in an embodiment of the present invention;
[0031] Figure 6 Schematic diagram of the flow of the gradient descent algorithm in an embodiment of the present invention;
[0032] Figure 7 It is a schematic diagram of the structure of a bus network departure frequency optimization device considering congestion effect described in an embodiment of the present invention;
[0033] Figure 8 A schematic diagram of the structure of a Sioux-Falls network in an embodiment of the present invention;
[0034] Fig. 9 It is a graph showing the convergence curve of the objective function of the Sioux-Falls network in an embodiment of the present invention;
[0035] Fig.10 A schematic diagram of the structure of the Winnipeg network in an embodiment of the present invention;
[0036] Fig.11 It is a convergence curve diagram of the Winnipeg network objective function in an embodiment of the present invention.
[0037] Markings in the figure: 800, bus network departure frequency optimization device considering congestion effect; 801, processor; 802, memory; 803, multimedia component; 804, I / O interface; 805, communication component. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0039] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0040] Embodiment 1:
[0041] This embodiment provides a method for optimizing the departure frequency of a public transportation network.
[0042] See also Figure 1 , the figure shows that the method includes step S100, step S200, step S300 and step S400.
[0043] Step S100: Acquire first information, where the first information includes bus route information and passenger travel behavior information;
[0044] Step S200: constructing a public transportation network according to the first information;
[0045] Constructing a node set according to the bus stops where each bus line stops, wherein the node set includes transfer nodes and virtual station nodes;
[0046] Constructing a set of arcs according to the node set, wherein the set of arcs includes a boarding arc, an alighting arc, a driving arc, and a walking arc;
[0047] The public transportation network is constructed according to the node set and the arc set.
[0048] Step S300: constructing a two-layer planning model according to the public transportation network, wherein:
[0049] The upper model of the two-level programming model includes an objective function and a first constraint condition, wherein the objective function is to minimize the weighted sum of the travel cost and the operating cost of the bus network, and the first constraint condition is that the departure frequency of any bus line in the bus network is not less than one, and the travel cost of the bus network is determined by the travel cost of the bus network considering the congestion effect and the departure frequency of the bus network;
[0050] The lower model of the two-level programming model includes a flow balance allocation model and a second constraint condition, the second constraint condition includes a flow conservation constraint and a flow non-negative constraint, the flow balance allocation model is a variational inequality of a super-path cost function of the public transportation network, and the super-path travel cost function is determined by the travel cost of the public transportation network considering the congestion effect;
[0051] A two-layer planning model is constructed based on the bus network, specifically including:
[0052] Constructing a travel cost function, wherein the travel cost function is the sum of the travel costs of all the arcs in the bus network taking into account the congestion effect multiplied by the arc flow function, wherein the arc flow function is a nonlinear implicit function of the departure frequency of the bus network;
[0053] Constructing an operating cost function, wherein the operating cost function is a coefficient for converting the operating cost under the departure frequency of the current bus line into travel expenses multiplied by the sum of the products of the operating cost per unit departure frequency of all the bus lines in the bus network and the departure frequency of the bus line;
[0054] The objective function is constructed according to the travel cost function, the operating cost function, the preset travel cost weight and the preset operating cost weight.
[0055] A two-layer planning model is constructed according to the bus network, including:
[0056] Constructing a boarding arc cost function that takes into account the congestion effect, wherein the boarding arc cost function that takes into account the congestion effect is determined by the boarding flow and the passing flow;
[0057] constructing a disembarkation arc cost function, wherein the disembarkation arc cost function is determined by an average loss time of the disembarkation arc;
[0058] Constructing a travel arc cost function considering congestion effect, wherein the travel arc cost function considering congestion effect is determined by average in-vehicle travel time, the boarding flow and the passing flow;
[0059] constructing a walking arc cost function, wherein the walking arc cost function is determined by an average walking time;
[0060] The super path cost function is constructed according to the boarding arc cost function considering congestion effect, the alighting arc cost function, the traveling arc cost function considering congestion effect, the walking arc cost function and the waiting time function of passengers at the transfer node.
[0061] Constructing a super-path cost function of the bus network, wherein the super-path cost function of the bus network includes travel cost functions of all the arcs in the bus network taking into account congestion effects;
[0062] According to the hyperpath cost function of the public transportation network, constructing the flow balance allocation model based on the variational method;
[0063] Step S400: Solving the bi-level programming model based on a gradient descent algorithm to obtain the departure frequency and objective function value of the bus network.
[0064] The step of solving the two-level programming model based on the gradient descent algorithm specifically includes:
[0065] Initialization: determine the initial departure frequency of the bus network, set the number of iterations, the maximum number of iterations, the maximum number of bad iterations and the convergence accuracy;
[0066] Solving the lower layer model based on the GP-AIL algorithm to obtain a balanced flow solution;
[0067] Calculating an approximate gradient of the objective function;
[0068] Entering a loop, the loop comprising:
[0069] Checking convergence conditions, the convergence conditions including relative improvement of the objective function value, maximum number of bad iterations and maximum number of iterations;
[0070] Searching for step lengths based on a linear search procedure, performing a balanced allocation for each step length, obtaining an objective function value, and completing the search if the improvement of the objective function value exceeds a threshold, otherwise repeating the cycle;
[0071] Updating the departure frequency of the bus network;
[0072] Output the departure frequency of the bus network and the objective function value.
[0073] The GP-AIL algorithm is an existing algorithm, and its steps are briefly summarized below:
[0074] Initialization: Calculate the shortest hyperpath for any OD pair and distribute all the traffic of the OD pair to the hyperpath; update the cost and first-order derivative on all arcs;
[0075] Main loop: For any OD pair w, calculate the shortest hyperpath k of the OD pair. If k≠Kw, add it to the hyperpath set Kw.
[0076] Solve a single OD subproblem: Take the flow that does not belong to the 0-D pair w as a constant and solve a single OD pair subproblem. Update the cost and first-order derivative cost of the arc where the flow changes;
[0077] Enter the adaptive inner loop: calculate the convergence index of OD for the w subproblem, and then check the termination condition;
[0078] Convergence accuracy check: If the current convergence level has not met the accuracy condition or the maximum running time has not been reached, delete the unused super paths in the super path set Kw (the flow is zero) and return to the main loop, otherwise stop the loop.
[0079] Calculating the approximate gradient of the objective function includes:
[0080] The first calculation formula for constructing the gradient of the objective function Z with respect to the departure frequency f of the bus network is as follows:
[0081] F1(v s (f)) = c s (v s (f))·v s (f),F2(f)=θ∑ l∈L F l ·f l
[0082]
[0083]
[0084]
[0085]
[0086]
[0087] Where ρ1 represents the weight coefficient of the travel cost of the public transportation system, ρ2 represents the weight coefficient of the operating cost of the public transportation system, s represents the arc, and v s (f) represents arc flow, v represents arc flow function, A s represents the arc set, l represents the bus route, F l represents the operating cost of the bus line per unit departure frequency, θ represents the coefficient of converting the operating cost under the current departure frequency into travel expenses; c s represents the arc cost, v s represents the flow of the arc, L represents the set of routes in the bus network, and f l Indicates the departure frequency of the bus line;
[0088] The second calculation formula for constructing the derivative of arc flow with respect to the departure frequency f of the bus network is as follows:
[0089]
[0090]
[0091]
[0092]
[0093] Among them, h 0 represents the basic hyperpath solution, C 0 represents the path cost vector corresponding to the basic hyperpath solution, ∧ 0 Denotes the corresponding basic hyperpath solution h 0 The incidence matrix, μ 0 represents the Lagrange multiplier vector of the basic hyperpath solution, h represents the hyperpath solution, μ is the Lagrange multiplier vector of the hyperpath solution, and π' is the probability that hyperpath k uses arc s. A derivative of the frequency of departures of the bus network is formed;
[0094] The approximate gradient of the objective function is calculated according to the first calculation formula and the second calculation formula.
[0095] set up is a bus network, where N is the node set and A is the arc set. Figure 2 A schematic diagram of bus stops on the bus network is shown. Figure 2As shown in the figure, each bus line that stops at a bus station has a corresponding transfer node and a virtual station node created to construct boarding arcs and alighting arcs to describe the behavior of passengers using bus lines to get on and off the bus. Passengers can also transfer stations through walking arcs between transfer nodes. tf and N tt They represent the set of transfer nodes and virtual station nodes respectively. The node set of the network is N = N tf ∪N tt , assuming that the hyperpath network of the bus network is N k is the set of hyperpath nodes, A k is the hyperpath arc set, e k As the arc usage probability vector, it can be found that the hyperpath is composed of simple paths, each of which has a corresponding usage probability. Under the condition that the arrival of passengers and vehicles on each line has a certain randomness, the hyperpath can provide passengers with a variety of routes to their destinations and minimize the expected travel cost by using the optional route set.
[0096] The hyperpath network needs to meet the following four conditions:
[0097] is an acyclic network with at least one arc;
[0098] The starting point of any hyperpath has no preceding point, and the end point has no post-sequence point;
[0099] There is at least one path between the starting point and the end point passing through the node, and if the node is not a transfer node, it has at most one connected subsequent point;
[0100] e k Satisfies the following expression:
[0101]
[0102]
[0103] represents the probability that a passenger chooses arc (i, j) at node i, and O(i) represents the set of arcs starting from node i.
[0104] In order to reflect the travel characteristics of passengers, this application considers two crowding effects: boarding crowding and in-vehicle crowding. The bus network includes a collection of boarding arcs, alighting arcs, driving arcs and walking arcs.
[0105] The walking arc (i1, i2) connects two transfer nodes within an acceptable walking distance, describing the walking process of passengers between adjacent transfer nodes. is the average walking time on the walking arc (i1, i2), then the calculation formula of the walking arc cost is:
[0106]
[0107] Among them, α1 is the time parameter, A w For walking arc set.
[0108] Combination Figure 3 and Figure 4 As shown:
[0109] The travel arc (j1, j2) connects two adjacent virtual station nodes on a bus line, describing the travel process of passengers in the bus. The travel arc cost depends on the average travel time and the cost function caused by the congestion in the bus. The congestion cost function is determined by the passengers waiting to get on the bus (boarding flow) and the passengers in the bus (passing flow) on the same bus line. is the average in-vehicle travel time of arc (j1, j2), For the traffic waiting to board the bus, is the through flow of station i1, and the asymmetric congestion effect of the through flow on the boarding flow is quantified by γ2≥(0). The calculation formula of the travel arc cost is:
[0110]
[0111] Among them, κ is the capacity of a single bus, is the departure frequency on the boarding arc (i1, j1), α2, β2 and n are positive parameters, A t is the set of travel arcs.
[0112] The alighting arc (j1, i1) connects the virtual station node to a corresponding transfer node, describing the passenger's alighting process. is the average loss time of the alighting arc, and the calculation formula of the alighting arc cost is:
[0113]
[0114] Among them, α3 is the time parameter, A a For getting off arc set.
[0115] The boarding arc (i1, j1) connects the transfer node to a virtual station node, describing the passenger boarding process. The congestion effect of the boarding arc is determined by the boarding flow. With the flow rate The asymmetric congestion effect of boarding flow on passing flow is quantified by γ3 (>0), and the calculation formula of boarding arc cost is:
[0116]
[0117] Among them, β3 and n are positive parameters, A b For the arc set on board.
[0118] The congestion cost functions of the boarding arc and the travel arc can be used to simulate the crowding effect inside the vehicle, while the crowding effect of boarding at the bus stop can be reflected by calculating the waiting time of passengers at the transfer node.
[0119] There are multiple bus lines passing through transfer node i, use L i ={(i, j1), (i, j2), ...} represents the set of boarding arcs starting from node i, where each boarding arc (i, j) corresponds to a bus line with a departure frequency of f ij , in units of vehicles per hour. The rules that passengers follow to select routes at transfer nodes are defined as “strategies”. When applying the “strategy”, passengers use the route attraction set R i ∈L i The bus that arrives at the station first goes to the destination. According to the bus collinear theory, and assuming that (1) passengers do not have real-time bus information; (2) there is no fixed departure schedule; (3) passengers can accurately estimate the remaining travel time after boarding the bus; (4) the departure interval follows a negative exponential distribution, etc., then the passenger uses the attraction set R i The expected waiting time at the transfer node i is for:
[0120]
[0121] The probability e that a passenger chooses to use the boarding arc (i, j) ij It can be expressed as:
[0122]
[0123] Given the cost c of each boarding arc ij and the expected cost u from node j to destination d jd , the greedy algorithm can be used to obtain the optimal attraction set R.
[0124] The basic path set on hyperpath k is defined as ψ k , the basic path p∈ψ k The probability of being selected is defined as but:
[0125]
[0126]
[0127] in is a 0-1 variable. If arc (i, j) is on the basic path p, then otherwise
[0128] By enumerating ψk The basic path p in the example is obtained by adding its arc cost and station waiting time to obtain the basic path cost C. p , and then weight the selection probability to obtain the hyperpath cost C k .definition is the waiting time at the transfer node i on the basic path p, that is:
[0129]
[0130]
[0131] For large-scale bus networks, it is difficult to enumerate all basic paths, but the acyclic property of hyperpaths can be used to avoid enumeration. The probability of using arc (i, j) on hyperpath k is defined as According to the network topology order:
[0132]
[0133]
[0134]
[0135] Among them, r and s represent the starting point and end point of the hyperpath k respectively. represents the probability that hyperpath k passes through node i, and I(j) represents the set of arcs entering node j. Therefore, the hyperpath cost function C of the bus network is k The calculation formula is:
[0136]
[0137] In the formula, represents the line attraction set at the transfer node i on the hyperpath k, K w represents the set of hyperpaths of OD to W. The hyperpath cost C k The left half of the calculation formula represents the sum of the expected travel costs on all arcs, and the right half represents the sum of the expected waiting times at all transfer nodes.
[0138] Therefore, the traffic balance distribution model can be expressed as a variational inequality model for hyperpath cost (VIP):
[0139] The formula of the traffic balance distribution model is as follows:
[0140]
[0141] The formula of the second constraint is as follows:
[0142]
[0143] Where h represents the hyperpath flow vector, h * represents the superpath flow vector at the equilibrium solution, C(h * ) represents the cost vector of the hyperpath flow at the equilibrium solution, Ω represents the set of feasible hyperpaths, q represents the OD demand matrix, ∧ represents the OD-hyperpath association matrix, v represents the arc flow function, and π represents the arc-hyperpath probability association matrix.
[0144] The equilibrium condition of the traffic balance distribution model is:
[0145]
[0146] Among them, h k represents the flow of hyperpath k, u w represents the minimum hyperpath cost of OD for w.
[0147] This application establishes a two-level planning model for continuous bus network design based on the characteristics of the bus network. The upper model seeks the optimal solution to minimize the travel costs of the bus system under the premise of controlling costs, reflecting the interaction between transportation operators and travelers on the setting of departure frequency. The purpose of the lower model is to accurately estimate the impact of departure frequency changes on passenger travel choice behavior.
[0148] The objective function is:
[0149]
[0150] The first constraint condition is:
[0151]
[0152] The arc flow v s (f) is obtained from the underlying model, in which:
[0153] The traffic balance distribution model is:
[0154]
[0155] The second constraint is:
[0156]
[0157] Where ρ1 represents the weight coefficient of the travel cost of the public transportation system, ρ2 represents the weight coefficient of the operating cost of the public transportation system, s represents the arc, and v s (f) represents arc flow, v represents arc flow function, A s represents the arc set, l represents the bus route, F lrepresents the operating cost of the bus line per unit departure frequency, θ represents the coefficient of converting the operating cost under the current departure frequency into travel expenses; c s represents the arc cost, v s represents the flow of the arc, L represents the set of routes in the bus network, and f l represents the departure frequency of the bus line, where the departure frequency f of the bus network is the departure frequency f of all bus routes l composition;
[0158] like Figure 5 As shown, the upper model is a continuous network design model, and its objective function is to minimize the weighted sum of travel costs and operating costs of the public transportation system. The first constraint ensures that at least one bus departs from the bus line per unit time. The second constraint includes flow conservation and flow non-negative constraints.
[0159] For a given decision variable f (i.e., the departure frequency of the bus network), the upper-level decision maker adjusts his decision according to the equilibrium flow distribution obtained by the lower-level model and resets
[0160] Set the departure frequency to minimize the upper objective function. Repeat this process until the two-level programming model reaches equilibrium. It is worth noting that the Jacobian matrix of the arc cost function vector is asymmetric, so the lower-level programming model is an asymmetric user equilibrium problem and it is impossible to write a direct objective function. However, for the lower-level model, if c is strictly monotonic and continuous, then the solution of the lower-level model is unique, that is, v in the equilibrium state s (f) is unique.
[0161] The upper model is a constrained nonlinear frequency optimization problem. In order to simplify the calculation process, this application proposes a heuristic solution algorithm based on gradient descent to solve this problem. The idea is to obtain the descent direction by finding the gradient of the objective function at the current point, and then move to the next iteration point after searching the step size in the feasible domain. Repeat the above process until a certain convergence condition is met. Figure 6 As shown, the solution algorithm is as follows:
[0162] Step 1: Determine the initial deviation frequency f 0 , maximum number of iterations n max , maximum number of bad iterations max_bad_iter, convergence accuracy ε1 and ε2; set the number of iterations n = 0 and bad_iter_num = 0.
[0163] Since the algorithm uses a local search method, the optimal solution will depend on the starting point in the iteration process, so the initial departure frequency of the bus line is selected as the starting point.
[0164] Step 2: Use the GP-AIL algorithm to solve the transport balance allocation problem and obtain the equilibrium flow solution v *n And calculate the objective function value Z of the upper layer n .
[0165] Since the calculation of the descending direction involves solving the disturbance rate of the arc flow caused by the disturbance of the departure frequency f, the following method can be used to specifically calculate the gradient of the objective function Z with respect to f;
[0166] Step 3: Calculate the approximate gradient of the objective function Then determine the descending direction as
[0167] Step 4.1: Determine whether the convergence condition |(Z n -Z n-1 ) / Z n-1 |<ε1. If satisfied, set bad_iter_num=1; otherwise, set bad_iter_num=0.
[0168] Step 4.2: Determine whether the convergence condition |(Z n -Z n-1 ) / Z n-1 |<ε1 and bad_iter_num>max_bad_iter or n>n max If satisfied, the algorithm is terminated; otherwise, proceed to step 5.1.
[0169] Since the bi-level programming model is a non-convex optimization problem, even solving the local optimal solution of the model is an NP-hard problem, so the selected convergence criterion should ensure that the algorithm can converge to a better local optimal solution. This application defines the iteration with a relatively small improvement in the objective function value as a "bad iteration", that is, bad_iter, and defines the number of consecutive occurrences of "bad iterations" as bad_iter_num. If the number of consecutive occurrences of "bad iterations" is large, that is, bad_iter_num is large, then it is considered that the algorithm has converged to a local optimal solution, and if bad_iter_num exceeds a certain limit, then it can be considered that the algorithm cannot converge to a better local optimal solution within a reasonable time. Therefore, a combination of the relative improvement of the objective function value, the maximum number of "bad iterations" and the maximum number of iterations is selected as the convergence criterion of the algorithm.
[0170] Step 5.1: Calculate the maximum step size Make the updated frequency satisfy the constraint
[0171]
[0172] Step 5.2.1: Order The number of search iterations j = 0, and the maximum number of search iterations j max , and let Z (n,0) = Z(f n ).
[0173] Step 5.2.2: Use the updated frequency obtained through the transport balance allocation to obtain the updated equilibrium flow solution v *j , and calculate the upper objective function Z (n,j) The corresponding value.
[0174] Z (n,j) = Z(f n +α j ·r n ).
[0175] Step 5.2.3: Determine whether the convergence condition Z is met (n,0) -Z (n,j) >ε2. If satisfied, let α n =α j And terminate the algorithm; otherwise, execute step 5.2.4.
[0176] Step 5.2.4: Determine whether the condition j=j is satisfied max If satisfied, let Otherwise, let α j =α j / θ, j=j+1, execute step 5.2.2.
[0177] Because v s (f) is a nonlinear implicit function, so an accurate linear search is computationally demanding. This application utilizes an Armijo-style linear search procedure: for each tentative step size α j ∈[0,α max ], perform a traffic balance distribution, obtain the objective function value, if the improvement of the objective function value exceeds the threshold, the search is completed; otherwise, set α j =α j / θ, and repeat the above steps. This application adopts the advanced GP-AIL algorithm, which can accurately solve the problem of traffic balance distribution in a short time, which provides a guarantee for the application of the algorithm in large-scale networks.
[0178] Step 6: Set f n =f n +α n *r n , n=n+1, go to step 2.
[0179] In order to construct the descent direction of the upper model, it is necessary to calculate the gradient of the objective function Z with respect to f. The calculation formula is as follows.
[0180] F1(v s (f)) = c s (v s (f))·v s (f), F2(f)=θ∑ l∈L F l ·f l
[0181]
[0182]
[0183]
[0184]
[0185]
[0186] Since the arc flow v s The relationship between (f) and the departure frequency f of the bus network is implicitly defined and cannot be directly expressed analytically. Therefore, this application uses sensitivity analysis to calculate the partial derivatives and The modified restricted network method is used to calculate the sensitivity analysis of the traffic balance distribution model. The expression of sensitivity analysis is derived based on the VI form of the traffic balance distribution model. Let f = 0, then:
[0187] C(h * , 0)-λ-∧ T μ=0
[0188] λ T h * =0
[0189] ∧h * -q(0)=0
[0190] λ ≥ 0
[0191] h * ≥0
[0192] λ and μ are h * ≥0 and ∧h * -The Lagrange multiplier vector corresponding to q(0)=0.
[0193] Assumption 1: The cost functions of the boarding arc and the travel arc are increasing functions of the arc flow, and the travel cost mainly depends on the own flow, that is, the derivative of the cost function of the boarding arc and the travel arc with respect to the own flow is greater than the derivative with respect to the flow on the related arc.
[0194] Assumption 2: Path flow solution h at equilibrium solution * is non-degenerate.
[0195] Assumption 1 ensures that the cost functions of the boarding arc and the driving arc are continuously differentiable with respect to the arc flow and f. Assumption 2 excludes the existence of degenerate equilibrium path solutions and ensures that the equilibrium solution is differentiable at the current point. T σ T ] T Select the maximum irrelevant column vector in , that is, select the basic hyperpath solution h in the balanced hyperpath 0 , the above expression can be simplified to:
[0196] C 0 (h * , 0)-∧ 0T μ=0
[0197] ∧ 0 h 0* -q(0))=0
[0198] The calculation formula of the derivative of the arc flow with respect to the departure frequency f of the bus network is as follows:
[0199]
[0200]
[0201]
[0202]
[0203] Among them, h 0 represents the basic hyperpath solution, C 0 represents the path cost vector corresponding to the basic hyperpath solution, ∧ 0 Denotes the corresponding basic hyperpath solution h 0 The incidence matrix, μ 0 represents the Lagrange multiplier vector of the basic hyperpath solution, h represents the hyperpath solution, μ is the Lagrange multiplier vector of the hyperpath solution, and π' is the probability that hyperpath k uses arc s. A derivative of the frequency of departures of the bus network is formed;
[0204] In the above formula Substitute into the above formula In the calculation, the approximate gradient of the objective function Z with respect to f can be obtained.
[0205] The present invention will be further described below through specific application examples:
[0206] The algorithm tested was compiled in the C++ class library provided by the TNM platform, which can be used for analysis and algorithm practice of bus networks. The computer program was run on an Intel(R) Core(TM) i7-11700@2.50GHz processor, 64GB memory, and 64-bit Win10 operating system. The algorithm was applied to the Sioux-Falls and Winnipeg networks for performance testing, where the Sioux-Falls network is a medium-sized network given by Szeto, and the Winnipeg network is a real large-scale network in Winnipeg, Canada.
[0207] The basic information of the two networks is shown in Table 1:
[0208] Table 1
[0209]
[0210] The basic parameter information is shown in Table 2:
[0211] Table 2
[0212]
[0213] This embodiment uses relative error RG as the convergence criterion of the traffic balance distribution model. The calculation formula of RG is as follows:
[0214]
[0215] τ is the total waiting time, ∑ s∈A c s v s is the total travel cost, u w The minimum travel cost of OD for w, the solution accuracy of RG will affect the accuracy of passenger flow distribution prediction. In this section, the solution accuracy of RG is set to 10-7 in medium-sized networks, and the solution accuracy of RG is set to 10-4 in large networks, which can meet actual needs.
[0216] Other experimental conditions include: setting the bus network's departure frequency capped at 30 buses per hour; and setting the weight ratio of bus system travel costs to operating costs to 60:1. The purpose of this setting is to increase operating costs to a certain extent while reducing passengers' travel costs to increase the attractiveness of the bus system. This weight ratio can be flexibly adjusted according to actual conditions.
[0217] The present application also sets up a control group, that is, the algorithm that does not consider the crowding effect ignores the boarding and in-vehicle crowding effects in the lower-level bus equilibrium model, that is, the expected waiting time of passengers at the transfer node is 0, and the cost functions of the boarding arc and the travel arc that consider the crowding effect are both 0. Other experimental conditions are the same as those in the present embodiment.
[0218] The optimization algorithm considering the crowding effect is used in the Sioux-Falls network structure as follows: Figure 8 The calculation results are shown as Fig. 9 As shown in the figure, the horizontal axis represents the calculation time of the algorithm in seconds, and the vertical axis represents the objective function value, which is used to measure the weighted sum of travel costs and operating costs of the public transportation system in hours. Overall, the algorithm can converge to the optimization solution in a relatively short time, and the objective function value reaches a converged solution within 20 seconds. It is worth noting that the objective function value drops rapidly in the first ten iterations and is relatively close to the local optimal value, with a difference of no more than 0.011%. The algorithm then continues to search for a better local optimal solution until the maximum number of convergences is reached. This phenomenon shows that the optimization algorithm proposed in this application can significantly optimize system performance in a relatively short period of time, which is of great significance in engineering applications.
[0219] The basic information of the Sioux-Falls network is shown in Table 3:
[0220] Table 3
[0221]
[0222] In order to verify the rationality of the optimization scheme, this section calculates the adjustment scheme without considering the congestion effect, and simulates and analyzes the two schemes. Table 4 gives two departure frequency schemes and their travel costs. In general, the optimization scheme considering the congestion effect can better optimize the performance of the bus system. Specifically, compared with the initial scheme, this optimization scheme can significantly reduce the travel cost of the bus system by 3.9%. The adjustment scheme without considering the congestion effect cannot reduce the travel cost, which has increased by 6.4% compared with the initial scheme. This is because the lower-level bus allocation model does not consider the congestion effect and cannot truly reflect the travel choice behavior of passengers. Therefore, it is impossible to accurately predict the impact of changes in departure frequency on passenger flow distribution, resulting in poor adjustment scheme effects. Therefore, the optimization algorithm considering the congestion effect is more suitable for the departure frequency optimization of the bus network.
[0223] Table 4
[0224]
[0225] Table 5 gives four initial departure frequency schemes. Table 6 shows the optimization schemes and their objective function values under different initial departure frequencies. In general, although the initial departure frequencies are different, the optimization schemes will fluctuate slightly around a certain scheme. Specifically, the objective function values of the optimization schemes do not differ by more than 0.05%. This means that the optimization algorithm can converge to a relatively close local optimal solution under different initial schemes, further verifying the reliability of the algorithm in the optimization of departure frequency.
[0226] Table 5
[0227]
[0228] Table 6
[0229]
[0230] The optimization algorithm is applied to the Winnipeg network structure as follows Fig.10 The calculation results are as follows Fig.11 As shown. Overall, the algorithm is able to converge to the optimization solution in a relatively short time, and the objective function value reaches a converged solution within 3.8 hours. It is worth noting that the optimization algorithm can significantly optimize the system performance in the first four iterations, and the objective function value of the fourth iteration is no more than 0.001% different from the local optimal solution, which is similar to the conclusion of the medium-sized network numerical experiment. This means that in medium and large networks, the algorithm proposed in this application can achieve the optimization of bus line departure frequency in a relatively short time.
[0231] Table 7 shows the basic information of the four bus routes with the largest increase in frequency before and after optimization. The route numbers are 24, 74, 83 and 100, and the frequencies increased by 3.55, 3.55, 3.55 and 3.66 respectively. The main reason for the large difference in frequency before and after optimization is related to the attributes of the route itself and the design direction. The commonality of these routes is that they pass through a large number of stations, have a long travel time, have a large travel demand between the OD pairs where they are located, and lack alternative transit routes for transfer demand. In addition, the design directions of these routes are located in the main flow direction of passengers, and can be transferred with multiple routes, which are highly irreplaceable. Therefore, by increasing the departure frequency of these routes, the carrying pressure of the remaining bus routes can be alleviated, and passengers in the bus network can be transported more efficiently, thereby achieving the purpose of optimizing system performance.
[0232] Table 7
[0233]
[0234] Through the above analysis of the calculation results of medium and large networks, it can be concluded that the optimization algorithm considering the congestion effect can optimize the departure frequency of the bus system in a shorter time and can be applied to large-scale bus networks.
[0235] Compared with the prior art, the present invention has the following advantages:
[0236] (1) Since traditional bus network design usually does not consider the travel behavior assumptions of bus users, there is a certain deviation from the actual situation, resulting in certain limitations in the feasibility of the design scheme in practical application. The two-level planning model proposed in this paper can fully reflect the interaction between transportation operators and travelers, conform to the actual situation of transportation network design, and provide a reliable decision-making basis for transportation planners and decision makers.
[0237] (2) The optimization model considering the crowding effect can effectively describe the changes in passenger flow distribution caused by the adjustment of the bus network departure frequency. This is due to the fact that the lower-level bus allocation model takes the crowding effect into account and can better reflect the travel characteristics of bus users. Numerical results also show that the optimization scheme considering the crowding effect can better optimize the performance of the bus system. Compared with the adjustment scheme without considering the crowding effect, the travel cost is reduced by 9.7%.
[0238] (3) The heuristic gradient descent algorithm is an effective algorithm for solving the departure frequency optimization problem. Numerical experiments show that the optimization algorithm can find a convergent solution in a relatively short time. In the Sioux-Falls network, the algorithm reaches a convergent solution within 20 seconds, and in the Winnipeg network, the algorithm reaches a convergent solution within 3.8 hours.
[0239] Embodiment 2:
[0240] This embodiment provides a bus network departure frequency optimization device taking into account congestion effects, the device comprising:
[0241] An acquisition module, the acquisition module is used to acquire first information, the first information including bus route information and passenger travel behavior information;
[0242] A first construction module, the first construction module is used to construct a public transportation network according to the first information;
[0243] The second building module is used to build a double-layer planning model according to the public transportation network, wherein:
[0244] The upper model of the two-level programming model includes an objective function and a first constraint condition, wherein the objective function is to minimize the weighted sum of the travel cost and the operating cost of the bus network, and the first constraint condition is that the departure frequency of any bus line in the bus network is not less than one, and the travel cost of the bus network is determined by the travel cost of the bus network considering the congestion effect and the departure frequency of the bus network;
[0245] The lower model of the two-level programming model includes a flow balance allocation model and a second constraint condition, the second constraint condition includes a flow conservation constraint and a flow non-negative constraint, the flow balance allocation model is a variational inequality of a super-path cost function of the public transportation network, and the super-path travel cost function is determined by the travel cost of the public transportation network considering the congestion effect;
[0246] A solution module is used to solve the two-level programming model based on a gradient descent algorithm to obtain the departure frequency and objective function value of the bus network.
[0247] A third construction module, the third construction module is used to construct a node set according to the bus stops where each bus line stops, the node set including transfer nodes and virtual station nodes;
[0248] A fourth construction module, the fourth construction module is used to construct a set of arcs according to the node set, the set of arcs including a boarding arc, a disembarking arc, a driving arc, and a walking arc;
[0249] A fifth construction module, the fifth construction module is used to construct the public transportation network according to the node set and the arc set;
[0250] A sixth construction module, the sixth construction module is used to construct a travel cost function, the travel cost function is the sum of the travel costs of all the arcs in the bus network considering the congestion effect multiplied by the arc flow function, and the arc flow function is a nonlinear implicit function of the departure frequency of the bus network;
[0251] A seventh building block, the seventh building block is used to build an operating cost function, the operating cost function is a coefficient for converting the operating cost under the departure frequency of the current bus line into travel expenses multiplied by the sum of the products of the operating cost per unit departure frequency of all the bus lines in the bus network and the departure frequency of the bus line;
[0252] An eighth construction module, the eighth construction module is used to construct the objective function according to the travel cost function, the operating cost function, the preset travel cost weight and the preset operating cost weight.
[0253] A ninth building block, the ninth building block is used to build a boarding arc cost function considering congestion effect, wherein the boarding arc cost function considering congestion effect is determined by boarding flow and passing flow;
[0254] a tenth building block, the tenth building block is used to build a get-off arc cost function, the get-off arc cost function is determined by an average loss time of the get-off arc;
[0255] An eleventh construction module, the eleventh construction module is used to construct a travel arc cost function considering congestion effect, wherein the travel arc cost function considering congestion effect is determined by average in-vehicle travel time, the boarding flow and the passing flow;
[0256] A twelfth building block, the twelfth building block is used to build a walking arc cost function, the walking arc cost function is determined by an average walking time;
[0257] A thirteenth construction module, the thirteenth construction module is used to construct the super path cost function according to the boarding arc cost function considering the congestion effect, the alighting arc cost function, the traveling arc cost function considering the congestion effect, the walking arc cost function and the waiting time function of the passengers at the transfer node.
[0258] It should be noted that, regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.
[0259] Embodiment 3:
[0260] Corresponding to the above method embodiment, this embodiment also provides a bus network departure frequency optimization device that takes into account the congestion effect. The bus network departure frequency optimization device that takes into account the congestion effect described below and the bus network departure frequency optimization method described above can refer to each other.
[0261] Figure 7 FIG. 8 is a block diagram of a bus network departure frequency optimization device 800 considering congestion effect according to an exemplary embodiment. Figure 7 As shown, the bus network departure frequency optimization device 800 considering congestion effect may include: a processor 801 and a memory 802. The bus network departure frequency optimization device 800 considering congestion effect may also include one or more of a multimedia component 803, an I / O interface 804, and a communication component 805.
[0262] The processor 801 is used to control the overall operation of the bus network departure frequency optimization device 800 considering the congestion effect, so as to complete all or part of the steps in the above-mentioned bus network departure frequency optimization method. The memory 802 is used to store various types of data to support the operation of the bus network departure frequency optimization device 800 considering the congestion effect, and these data may include, for example, instructions for any application or method operating on the bus network departure frequency optimization device 800 considering the congestion effect, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 802 or sent via the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules can be keyboards, mice, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the bus network departure frequency optimization device 800 considering congestion effect and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 can include: Wi-Fi module, Bluetooth module, NFC module.
[0263] In an exemplary embodiment, the bus network departure frequency optimization device 800 considering the congestion effect can be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), digital signal processors (Digital Signal Processor, referred to as DSP), digital signal processing devices (Digital Signal Processing Device, referred to as DSPD), programmable logic devices (Programmable Logic Device, referred to as PLD), field programmable gate arrays (Field Programmable Gate Array, referred to as FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned bus network departure frequency optimization method.
[0264] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned bus network departure frequency optimization method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 802 including program instructions, and the above-mentioned program instructions can be executed by the processor 801 of the bus network departure frequency optimization device 800 considering congestion effect to complete the above-mentioned bus network departure frequency optimization method.
[0265] Embodiment 4:
[0266] Corresponding to the above method embodiment, a readable storage medium is also provided in this embodiment. The readable storage medium described below and the bus network departure frequency optimization method described above can refer to each other.
[0267] A readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for optimizing the departure frequency of a public transportation network of the above method embodiment.
[0268] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0269] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0270] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for optimizing bus network departure frequency, characterized in that: include: Acquiring first information, wherein the first information includes bus route information and passenger travel behavior information; constructing a public transportation network according to the first information; A two-level planning model is constructed based on the bus network, where: The upper model of the two-level programming model includes an objective function and a first constraint condition, wherein the objective function is to minimize the weighted sum of the travel cost and the operating cost of the bus network, and the first constraint condition is that the departure frequency of any bus line in the bus network is not less than one, and the travel cost of the bus network is determined by the travel cost of the bus network considering the congestion effect and the departure frequency of the bus network; The lower model of the bi-level programming model includes a flow balance allocation model and a second constraint condition, the second constraint condition includes a flow conservation constraint and a flow non-negative constraint, the flow balance allocation model is a variational inequality of a super-path cost function of the bus network, and the super-path travel cost function is determined by the travel cost of the bus network considering the congestion effect; the bi-level programming model is solved based on a gradient descent algorithm to obtain the departure frequency and objective function value of the bus network; The step of constructing a public transportation network according to the first information includes: Constructing a node set according to the bus stops where each bus line stops, wherein the node set includes transfer nodes and virtual station nodes; Constructing a set of arcs according to the node set, wherein the set of arcs includes a boarding arc, an alighting arc, a driving arc, and a walking arc; Constructing the public transportation network according to the node set and the arc set; Wherein, a two-layer planning model is constructed according to the bus network, including: Constructing a travel cost function, wherein the travel cost function is the sum of the travel costs of all the arcs in the bus network taking into account the congestion effect multiplied by the arc flow function, wherein the arc flow function is a nonlinear implicit function of the departure frequency of the bus network; Constructing an operating cost function, wherein the operating cost function is a coefficient for converting the operating cost under the departure frequency of the current bus line into travel expenses multiplied by the sum of the products of the operating cost per unit departure frequency of all the bus lines in the bus network and the departure frequency of the bus line; Constructing the objective function according to the travel cost function, the operating cost function, the preset travel cost weight and the preset operating cost weight; Wherein, a two-layer planning model is constructed according to the bus network, including: Constructing a boarding arc cost function that takes into account the congestion effect, wherein the boarding arc cost function that takes into account the congestion effect is determined by the boarding flow and the passing flow; constructing a disembarkation arc cost function, wherein the disembarkation arc cost function is determined by an average loss time of the disembarkation arc; Constructing a travel arc cost function considering congestion effect, wherein the travel arc cost function considering congestion effect is determined by average in-vehicle travel time, the boarding flow and the passing flow; constructing a walking arc cost function, wherein the walking arc cost function is determined by an average walking time; Constructing the super path cost function according to the boarding arc cost function considering the congestion effect, the getting off arc cost function, the travel arc cost function considering the congestion effect, the walking arc cost function and the waiting time function of the passenger at the transfer node; Wherein, solving the two-level programming model based on the gradient descent algorithm specifically includes: Initialization: determine the initial departure frequency of the bus network, set the number of iterations, the maximum number of iterations, the maximum number of bad iterations and the convergence accuracy; Solving the lower layer model based on the GP-AIL algorithm to obtain a balanced flow solution; Calculating an approximate gradient of the objective function; Entering a loop, the loop comprising: Checking convergence conditions, the convergence conditions including relative improvement of the objective function value, maximum number of bad iterations and maximum number of iterations; Searching for step lengths based on a linear search procedure, performing a balanced allocation for each step length, obtaining an objective function value, and completing the search if the improvement of the objective function value exceeds a threshold, otherwise repeating the cycle; Updating the departure frequency of the bus network; Output the departure frequency of the bus network and the objective function value.
2. A bus network departure frequency optimization device considering congestion effect, characterized in that: include: An acquisition module, which acquires first information, wherein the first information includes bus route information and passenger travel behavior information; A first construction module, constructing a public transportation network according to the first information; The second building module builds a two-layer planning model based on the bus network, wherein: The upper model of the two-level programming model includes an objective function and a first constraint condition, wherein the objective function is to minimize the weighted sum of the travel cost and the operating cost of the bus network, and the first constraint condition is that the departure frequency of any bus line in the bus network is not less than one, and the travel cost of the bus network is determined by the travel cost of the bus network considering the congestion effect and the departure frequency of the bus network; The lower model of the two-level programming model includes a flow balance allocation model and a second constraint condition, the second constraint condition includes a flow conservation constraint and a flow non-negative constraint, the flow balance allocation model is a variational inequality of a super-path cost function of the public transportation network, and the super-path travel cost function is determined by the travel cost of the public transportation network considering the congestion effect; A solution module, which solves the bi-level programming model based on a gradient descent algorithm to obtain the departure frequency and objective function value of the bus network; Wherein, the first building block includes: A third construction module constructs a node set according to the bus stops where each bus line stops, wherein the node set includes transfer nodes and virtual station nodes; A fourth construction module, constructing a set of arcs according to the node set, wherein the set of arcs includes a boarding arc, an alighting arc, a driving arc, and a walking arc; A fifth construction module, constructing the public transportation network according to the node set and the arc set; Wherein, the second building block comprises: A sixth construction module is to construct a travel cost function, wherein the travel cost function is the sum of the travel costs of all the arcs in the bus network taking into account the congestion effect multiplied by the arc flow function, and the arc flow function is a nonlinear implicit function of the departure frequency of the bus network; A seventh construction module is to construct an operating cost function, wherein the operating cost function is a coefficient for converting the operating cost under the departure frequency of the current bus line into travel expenses multiplied by the sum of the product of the operating cost per unit departure frequency of all the bus lines in the bus network and the departure frequency of the bus line; An eighth construction module, constructing the objective function according to the travel cost function, the operating cost function, the preset travel cost weight and the preset operating cost weight; Wherein, the second building block comprises: A ninth construction module is to construct a boarding arc cost function considering congestion effect, wherein the boarding arc cost function considering congestion effect is determined by boarding flow and passing flow; A tenth construction module, constructing a get-off arc cost function, wherein the get-off arc cost function is determined by an average loss time of the get-off arc; An eleventh construction module is used to construct a travel arc cost function considering congestion effect, wherein the travel arc cost function considering congestion effect is determined by average in-vehicle travel time, the boarding flow and the passing flow; A twelfth construction module constructs a walking arc cost function, wherein the walking arc cost function is determined by an average walking time; A thirteenth construction module constructs the super path cost function according to the boarding arc cost function considering the congestion effect, the alighting arc cost function, the travel arc cost function considering the congestion effect, the walking arc cost function and the waiting time function of the passenger at the transfer node; Wherein, solving the two-level programming model based on the gradient descent algorithm specifically includes: Initialization: determine the initial departure frequency of the bus network, set the number of iterations, the maximum number of iterations, the maximum number of bad iterations and the convergence accuracy; Solving the lower layer model based on the GP-AIL algorithm to obtain a balanced flow solution; Calculating an approximate gradient of the objective function; Entering a loop, the loop comprising: Checking convergence conditions, the convergence conditions including relative improvement of the objective function value, maximum number of bad iterations and maximum number of iterations; Searching for step lengths based on a linear search procedure, performing a balanced allocation for each step length, obtaining an objective function value, and completing the search if the improvement of the objective function value exceeds a threshold, otherwise repeating the cycle; Updating the departure frequency of the bus network; Output the departure frequency of the bus network and the objective function value.
3. A bus network departure frequency optimization device considering congestion effect, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the bus network departure frequency optimization method as claimed in claim 1 when executing the computer program.
4. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for optimizing the departure frequency of a public transportation network as claimed in claim 1 are implemented.