Public transit network optimization method and system based on reinforcement learning technology, electronic equipment and storage medium

Through the bus line network optimization method based on reinforcement learning technology, local and global optimal bus lines are constructed, and the bus line network is optimized using the Monte Carlo tree search model, which solves the optimal solution problem in large-scale bus line planning, and improves operational efficiency and resource utilization.

CN120258281AActive Publication Date: 2025-07-04SHENZHEN NAT HIGH-TECH IND INNOVATION CENT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510733508.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-07-04
Estimated Expiration
2045-06-04

AI Technical Summary

Technical Problem

When the existing bus network optimization method faces the increase of large-scale lines and stations, it cannot effectively solve the optimal solution problem of bus line solutions, resulting in increased computing complexity and low operational efficiency.

Method used

The bus line network optimization method based on reinforcement learning technology is adopted. By obtaining the passenger flow intensity between bus stations, a Monte Carlo tree search model is constructed, local optimal and global optimal bus lines are selected, and the line probability selection weight is adjusted using the Monte Carlo tree search model to optimize the bus line network structure.

Benefits of technology

It has improved the passenger flow intensity of the bus network, reduced the phenomenon of air travel of bus vehicles, improved the operating efficiency of bus companies, achieved cost reduction and efficiency improvement, and reduced human experience deviations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120258281A_ABST
    Figure CN120258281A_ABST
Patent Text Reader

Abstract

According to the public transit network optimization method and system based on the reinforcement learning technology, the electronic equipment and the storage medium provided by the invention, the method comprises the following steps: constructing a local optimal public transit route based on the passenger flow intensity, obtaining the first passenger flow intensity, constructing a Monte Carlo tree search model, and constructing an optimal public transit network for a public transit route set; the first passenger flow intensity and the second passenger flow intensity are compared and judged to obtain a final public transport line network; the public transport line is planned based on the passenger flow intensity; the passenger flow can be accurately matched; resources are reasonably allocated to hot spot areas according to the passenger flow intensity of different areas and time periods; the Monte Carlo tree search model is adopted to quickly generate a scheme, the search weight is calculated by utilizing multiple attributes of the line, the line is comprehensively analyzed, line selection and line network construction are more scientific, decision is made based on data and an algorithm, and human experience deviation is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of public transportation, and particularly to a bus network optimization method, system, electronic device, and storage medium based on reinforcement learning technology. Background Art

[0002] In recent years, with the development of the economic society and the acceleration of the urbanization process, problems such as urban traffic congestion and inconvenient travel for the masses have become increasingly prominent. Prioritizing the development of public transportation is an inevitable requirement for alleviating traffic congestion and transforming the urban traffic development mode. The important carrier of the urban public system is the bus network. How to scientifically analyze the conventional bus network and thus put forward optimization suggestions is of great significance for improving the operation efficiency of conventional buses and enhancing the attractiveness of conventional buses. Currently, the passenger flow of urban buses has dropped significantly, there are a large number of empty runs of buses on the road, and the operating pressure of bus enterprises is increasing, resulting in the difficulty of sustainable public transportation services.

[0003] Currently, the solutions adopted for bus network optimization are all methods that combine operational research optimization and heuristic algorithms. The above methods are applicable to smaller network scales. With the increase in bus lines and stops, the number of potential bus line plans will increase exponentially. Considering the balance of computational complexity, the existing methods often constrain the number of possible bus line plans, so generally the optimal solution cannot be obtained either. Summary of the Invention

[0004] The technical problem to be solved by this application is that the current solutions adopted for bus network optimization are all methods that combine operational research optimization and heuristic algorithms. The above methods are applicable to smaller network scales. With the increase in bus lines and stops, the number of potential bus line plans will increase exponentially. Considering the balance of computational complexity, the existing methods often constrain the number of possible bus line plans, so generally the optimal solution cannot be obtained either.

[0005] To solve the above problems, or at least partially solve the above technical problems, this application provides a bus network optimization method, system, electronic device, and storage medium based on reinforcement learning technology.

[0006] In the first aspect, the present invention discloses a bus network optimization method based on reinforcement learning technology, which specifically includes: Obtain bus stops, draw bus lines between the bus stops, construct a set of alternative bus lines, calculate the passenger flow intensity of each bus line in the set of alternative bus lines, and the set of alternative bus lines needs to meet a preset non - straight - line coefficient threshold and a preset passenger flow intensity threshold; Screen the bus lines one by one from the set of alternative bus lines, add them to the set of selected bus lines, calculate the average passenger flow intensity of the set of selected bus lines, obtain the set of selected bus lines with the maximum average passenger flow intensity corresponding to the number of bus lines, and stop selecting bus lines when the total number of bus lines in the set of selected bus lines reaches the preset first quantity, or the total bus demand ratio of the set of selected bus lines is greater than the preset total bus demand ratio, to obtain a locally optimal bus network, calculate the average passenger flow intensity of the locally optimal bus network, and obtain the first passenger flow intensity; Construct a Monte Carlo tree search model, assign the same initial probability selection weight to each bus line in the set of alternative bus lines, randomly search for sets of selected bus lines composed of different bus lines with a preset first quantity, all of which are changed to the set of selected bus lines, distinguish them from the set of alternative bus lines, make modifications in subsequent searches, calculate the average passenger flow intensity, and obtain the second passenger flow intensity; Compare the second passenger flow intensity with the first passenger flow intensity. If it is greater than the first passenger flow intensity, increase the probability selection weight of the selected bus lines with a preset first quantity to obtain an updated probability selection weight. Based on the updated probability selection weight, re-run the Monte Carlo tree search, screen the selected bus lines, and repeatedly iterate the updated probability selection weight and the selected bus lines until finally generating a line combination plan with the optimal passenger flow intensity to obtain a globally optimal bus network.

[0007] Preferably, for obtaining bus stops, drawing bus lines between bus stops, constructing a set of alternative bus lines, and calculating the passenger flow intensity of each bus line in the set of alternative bus lines, the set of alternative bus lines needs to meet a preset non-straightness coefficient threshold and a preset passenger flow intensity threshold, which specifically includes the following steps: Obtain a road traffic network diagram, draw bus lines based on the stops and sections in the diagram, establish a set of bus terminal pairs according to the stops in the road traffic network diagram, establish a bus demand OD matrix indexed by sections, and preset a non-straightness coefficient threshold and a preset passenger flow intensity threshold; Expand the nodes of the first stops in the set of bus terminal pairs. Expand any one of the first stops to obtain a list of adjacent stops. Traverse the list of adjacent stops, and form a list of nodes by combining the adjacent stops in the list of adjacent stops with the corresponding first stops to obtain a list of nodes for all first stops; Calculate the non-straightness coefficient and passenger flow intensity of the list of nodes for all first stops, determine whether they meet the construction requirements, and construct an initial line list from the list of nodes for all first stops that meet the construction requirements to obtain an initial line list. The construction requirements include that the non-straightness coefficient of the list of nodes is less than the preset non-straightness coefficient threshold and the passenger flow intensity is greater than the preset passenger flow intensity threshold. The list of nodes of the first stops is the initial line; The adjacent stations in the initial line list are used as the first stations to expand nodes again, obtain the corresponding list of adjacent stations, and generate a list of derivative lines that meet the construction requirements; When the adjacent station in the derivative line list is the last station of the bus terminal, stop node expansion, integrate the initial line list and the derivative line list into bus lines, and obtain a set of alternative bus lines.

[0008] Preferably, screen the bus lines one by one for the set of alternative bus lines, add them to the set of selected bus lines and calculate the average passenger flow intensity of the set of selected bus lines, obtain the set of selected bus lines with the largest average passenger flow intensity under the corresponding number of bus lines, and stop selecting bus lines when the number of bus lines in the set of selected bus lines reaches the total number of bus lines of the preset first quantity, or the total bus demand ratio of the set of selected bus lines is greater than the preset total bus demand ratio, obtain a locally optimal bus network, calculate the average passenger flow intensity of the locally optimal bus network, and obtain the first passenger flow intensity, which specifically includes the following steps: For the set of alternative bus lines, preset the maximum number of bus lines included in the locally optimal bus network and the minimum service bus demand ratio threshold that the locally optimal bus line set needs to meet; Preprocess the lines in the set of alternative bus lines, sort them according to the passenger flow intensity of each line, initialize the set of selected lines, and initialize the set of locally optimal bus networks; Select the line with the largest passenger flow intensity in the set of alternative bus lines as the first line in the set of locally optimal bus networks, and at the same time add it to the set of selected lines, and remove this line from the set of alternative bus lines; Select the second line of the locally optimal bus network set, add each bus line in the set of alternative bus lines to the set of selected lines respectively, calculate the average passenger flow intensity of the set of selected lines after different lines are added, obtain the line that makes the average passenger flow intensity of the set of selected lines the largest, and add it to the set of locally optimal bus networks as the second line, and calculate the total bus demand ratio served by the current locally optimal bus network; The total bus demand ratio includes the passenger flow intensity of direct bus demand and the passenger flow intensity of one-time same-platform transfer bus demand; Update the bus demand OD matrix of the set of bus terminals, remove the bus demand served by the current locally optimal bus network from the bus demand OD matrix, and update the set of alternative bus lines and the set of selected lines; The update of the set of alternative bus lines includes deleting the newly selected line from the set of alternative bus lines and deleting the lines in the set of alternative bus lines with a passenger flow intensity lower than the preset passenger flow intensity threshold to obtain the updated set of alternative bus lines. The update of the set of selected lines includes keeping the set of selected lines consistent with the current locally optimal bus network; Repeat the above steps to obtain the next route in the set of locally optimal bus routes, update the bus demand OD matrix, the set of alternative bus routes, and the set of selected routes, and calculate the total bus demand ratio served by the current locally optimal bus network until the total bus demand ratio served by the current locally optimal bus network exceeds the preset minimum service bus demand ratio threshold, or the number of bus routes in the current locally optimal bus route set is equal to the total number of bus routes with the preset first quantity. Then, output the set of selected routes as the set of locally optimal bus routes and calculate the passenger flow intensity of this locally optimal bus network.

[0009] Preferably, when constructing the Monte Carlo tree search model, for each bus route in the set of alternative bus routes, assign the same initial probability selection weight, randomly search for the selected bus routes composed of different bus routes with the preset first quantity, calculate the average passenger flow intensity, and obtain the second passenger flow intensity. The specific steps are as follows: Preset the total number of runs of the Monte Carlo tree search and the total number of routes in the globally optimal bus network plan; initialize the bus demand OD matrix, the set of line probability selection weights, and the set of selected routes; According to the set of line probability selection weights, randomly select a bus route from the set of alternative routes, add it to the set of selected routes, update the set of alternative routes, and remove the selected bus route; update the set of line probability selection weights and remove the selected bus route; Judge whether the total number of routes in the set of selected routes is greater than the total number of routes in the preset globally optimal bus network. If it is less than the preset value, select another bus route from the updated set of alternative bus routes again, and then perform repeated update processing until the total number of routes in the set of selected bus routes is equal to the preset value; calculate the average passenger flow intensity of the set of selected routes as the second passenger flow intensity.

[0010] Preferably, compare the second passenger flow intensity with the first passenger flow intensity. If it is greater than the first passenger flow intensity, increase the probability selection weight of the selected bus routes with the preset first quantity to obtain the updated probability selection weight. Based on the updated probability selection weight, re-run the Monte Carlo tree search, screen the selected bus routes, and repeatedly iterate to update the probability selection weight and the selected bus routes. Finally, generate the route combination plan with the optimal passenger flow intensity to obtain the globally optimal bus network. The specific steps are as follows: When the second passenger flow intensity is greater than the first passenger flow intensity, use the ratio of the two as the weight increase factor for the current line probability selection. Multiply the probability selection weight of each line in the current set of selected routes in the set of line probability selection weights by the weight increase factor, and update the initial line probability weight set; Compare the number of Monte Carlo tree searches with the preset total number of runs. If the number of Monte Carlo tree searches is less than the preset total number of runs, save the selected route set to the global optimal bus network plan set and re-run the Monte Carlo tree search; If the number of Monte Carlo tree searches is greater than the preset total number of runs, output the selected route set with the second largest passenger flow intensity as the global optimal bus network.

[0011] Preferably, calculating the passenger flow intensity of the direct bus demand specifically includes the following steps: Split the selected bus route into multiple consecutive road segments, select any two road segments to construct a road segment combination, and obtain a road segment combination set; Select any road segment combination from the road segment combination set, and determine whether the road segment combination is included in the bus demand matrix. If it is, allocate the passenger demand corresponding to the bus demand matrix to the selected bus route to obtain the passenger flow of the bus route; if not, re-select a road segment combination and mark the loaded road segment combination; Obtain the passenger volume of the largest passenger flow road segment on the selected bus route, sum it with the passenger flow of the bus route, and determine whether the sum value is greater than the maximum cross-section passenger capacity of the bus route; If the sum value is greater than the maximum cross-section passenger capacity of the bus route, the passenger flow value of the bus route is the passenger flow intensity of the direct bus demand of the selected bus route; If the sum value is equal to or less than the maximum cross-section passenger capacity of the bus route, the passenger flow intensity of the direct bus demand of the selected bus route is the maximum cross-section passenger capacity of the selected bus route minus the passenger volume of the largest passenger flow road segment on the selected bus route.

[0012] Preferably, calculating the passenger flow intensity of the one-stop transfer bus demand specifically includes the following steps: Determine the bus routes and transfer road segments that can be used for one-stop transfer for the selected bus route, and construct a transfer route set; Select the transfer routes passing through the same road segments as the selected bus route from the transfer route set, and construct a transfer road segment set; Select the first transfer road segment from the transfer road segment set and combine it with the selected bus route to construct a first pre-segment set and a first post-segment set. The first pre-segment set includes all road segments between the starting road segment of the bus route and the first transfer road segment, and the first post-segment set includes all road segments between the first transfer road segment and the ending road segment of the bus route; Based on the first transfer section, combine it with the transfer lines in the set of transfer lines to construct a second set of preceding sections and a second set of following sections. The second set of preceding sections includes all sections between the starting section of the transfer line and the first transfer section, and the second set of following sections includes all sections between the second transfer section and the ending section of the bus line; Select a first selected preceding section and a second selected following section from the first set of preceding sections and the second set of following sections respectively to form a selected section combination, determine whether the selected section combination is in the bus demand matrix, and obtain the first passenger demand; Allocate the passenger demand corresponding to the selected section combination to the corresponding first transfer section and transfer line. Increase the passenger volume of all sections in the first selected preceding section and the passenger volume of all sections in the second selected following section by the first passenger demand to obtain the first selected preceding section passenger volume set and the second selected following section passenger volume set; Obtain the maximum cross-sectional passenger capacity of the lines corresponding to the first selected preceding section and the second selected following section. Obtain the maximum passenger flow section and maximum passenger flow volume of the first selected preceding section from the first selected preceding section passenger volume set and the second selected following section passenger volume set, and the maximum passenger flow section and maximum passenger flow volume of the second selected following section. Compare the maximum passenger flow volume of the first selected preceding section with the maximum cross-sectional passenger capacity of the line corresponding to the first selected preceding section, and compare the maximum passenger flow volume of the second selected following section with the maximum cross-sectional passenger capacity of the line corresponding to the second selected following section. When the maximum passenger flow volume is less than the maximum cross-sectional passenger capacity of the line, the passenger flow intensity of the one-time same-platform transfer bus demand for the first selected preceding section and the second selected following section is the first passenger demand. When the maximum passenger flow volume is greater than the maximum cross-sectional passenger capacity of the line, the passenger flow intensity of the one-time same-platform transfer bus demand for the first selected preceding section and the second selected following section is the difference between the maximum cross-sectional passenger capacity of the line and the passenger volume of all sections in the first selected preceding section, and the difference between the maximum cross-sectional passenger capacity of the line and the passenger volume of all sections in the second selected following section; Repeat the above process for the first set of following sections and the second set of following sections to calculate the passenger flow intensity of the corresponding one-time same-platform transfer bus demand.

[0013] In a second aspect, the present invention discloses a bus network optimization system based on reinforcement learning technology, which includes a bus network optimization method based on reinforcement learning technology.

[0014] In a third aspect, the present invention discloses an electronic device, which includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus; The memory is used to store a computer program; A processor, when executing a program stored in a memory, implements the steps of a bus network optimization method based on reinforcement learning technology.

[0015] In a fourth aspect, the present invention discloses a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of a bus network optimization method based on reinforcement learning technology.

[0016] The above technical solutions provided by this application have the following advantages compared with the prior art: The bus network optimization method, system, electronic device, and storage medium based on reinforcement learning technology provided by this application. The method mentions constructing a locally optimal bus network based on passenger flow intensity, obtaining the first passenger flow intensity, constructing a Monte Carlo tree search model, constructing a globally optimal bus network for the bus line set, calculating its average passenger flow intensity to obtain the second passenger flow intensity, comparing and judging the first passenger flow intensity and the second passenger flow intensity to obtain a globally optimal bus network for passenger flow intensity, and planning bus routes based on passenger flow intensity, which can accurately match the passenger flow, rationally allocate resources to hot spots according to the passenger flow intensity in different regions and time periods, flexibly respond to passenger flow changes, can quickly generate solutions using the Monte Carlo tree search model, calculate search weights using multiple attributes of the lines, comprehensively analyze the lines, make the line selection and network construction more scientific, and make decisions based on data and algorithms to reduce human experience bias.

[0017] Furthermore, the method can optimize the bus network structure, greatly reduce the phenomenon of buses running empty, on the basis of meeting the original bus passenger service requirements, the overall mileage scale of the bus lines decreases, and the passenger flow intensity of the bus network can be increased to twice the original, which will greatly improve the operation efficiency of bus enterprises and achieve cost reduction and efficiency increase. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present invention, and are used together with the specification to explain the principles of the present invention.

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for describing the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0020] Figure 1 It is a schematic flowchart of a bus network optimization method based on reinforcement learning technology provided by this application; Figure 2 It is a specific schematic flowchart of step S1 of a bus network optimization method based on reinforcement learning technology provided by this application; Figure 3 It is a schematic diagram of the specific process of step S2 of a bus network optimization method based on reinforcement learning technology provided by this application; Figure 4 It is a schematic diagram of the specific process of step S3 of a bus network optimization method based on reinforcement learning technology provided by this application; Figure 5 It is a schematic diagram of the specific process of step S4 of a bus network optimization method based on reinforcement learning technology provided by this application. Specific implementation manners

[0021] To make the objectives, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below with reference to the accompanying drawings in this application. Obviously, the described embodiments are some but not all of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts shall fall within the scope of protection of this application.

[0022] In a first aspect, referring to Figures 1-5 , this invention discloses a bus network optimization method based on reinforcement learning technology, which specifically includes: Step S1: Obtain bus stops, draw bus lines between the bus stops, construct a set of alternative bus lines, and calculate the passenger flow intensity of each bus line in the set of alternative bus lines. The set of alternative bus lines needs to meet a preset non - straight - line coefficient threshold and a preset passenger flow intensity threshold; Step S2: Screen the bus lines one by one from the set of alternative bus lines, add them to the set of selected bus lines and calculate the average passenger flow intensity of the set of selected bus lines. Obtain the set of selected bus lines with the maximum average passenger flow intensity corresponding to the number of bus lines. When the total number of bus lines in the set of selected bus lines reaches the preset first number of bus lines, or the total bus demand ratio of the set of selected bus lines is greater than the preset total bus demand ratio, stop selecting bus lines to obtain a locally optimal bus network, calculate the average passenger flow intensity of the locally optimal bus network, and obtain the first passenger flow intensity; Step S3: Construct a Monte Carlo tree search model, assign the same initial probability selection weight to each bus line in the set of alternative bus lines, randomly search for the selected bus lines composed of the preset first number of different bus lines, and calculate the average passenger flow intensity to obtain the second passenger flow intensity; Step S4: Compare the second passenger flow intensity with the first passenger flow intensity. If it is greater than the first passenger flow intensity, increase the probability selection weight of the selected preset first number of bus lines to obtain the updated probability selection weight. Based on the updated probability selection weight, re-run the Monte Carlo tree search to screen the selected bus lines. By repeatedly iterating the updated probability selection weight and the selected bus lines, finally generate a line combination plan with the optimal passenger flow intensity to obtain the globally optimal bus network.

[0023] Specifically, in step S1, obtain bus stop information and construct a large-scale set of alternative bus lines for subsequent search of line combinations in the reinforcement learning process. When constructing the set of alternative bus lines, comprehensively consider the geometric constraints and passenger flow intensity constraints of the lines. Adopt the idea of node expansion and evaluate whether the currently expanded line meets the non-straightness coefficient constraint of the line and the passenger flow intensity constraint of the bus line service at each step. The line passenger flow intensity can reflect the distribution of bus passenger flow and help understand the passenger flow demand in different regions.

[0024] Specifically, in step S2, the passenger flow intensity of a bus line refers to the number of passengers transported per unit length of each public transportation line, which can reflect the operation efficiency of the bus network to a certain extent. Initially construct a locally optimal set of bus lines according to the heuristic method and obtain its passenger flow intensity to get the first passenger flow intensity. The core idea is that at each step of selecting a bus line, it is a locally optimal solution to ensure that the newly added line maximizes the passenger flow intensity of the existing network.

[0025] Specifically, in step S3, construct a Monte Carlo tree search model, input the set of bus lines into the search space of the model, calculate the search weights of the lines in the search space, form a set of model lines and a set of spatial line search weights, and initialize the bus demand matrix. Select lines from the set of model lines to join the public transportation network. Each time a line is added, update the relevant sets and matrices until the line counter exceeds the total number of bus network lines preset. Integrate the lines added to the public transportation network to obtain an initial optimal set of bus networks and calculate its average passenger flow intensity, that is, the second passenger flow intensity. Using the Monte Carlo tree search model, comprehensively consider various line combinations and passenger flow factors to optimize the bus network from a global perspective and improve the overall efficiency of the network.

[0026] Specifically, in step S4, when the second passenger flow intensity is greater than the first passenger flow intensity, the ratio of the two is used as the weight increase factor for the current line probability selection. For each line in the current selected line set in the line probability selection weight set, the probability selection weight of the line is multiplied by the weight increase factor, and the initial line probability selection weight set is updated. It is determined whether the number of Monte Carlo tree searches is less than the preset total number of runs. If it is less, the selected line set is saved to the global optimal bus network plan set, and the Monte Carlo tree search is restarted. If it is greater, the selected line set with the largest second passenger flow intensity is output as the global optimal bus network plan. By comparing the passenger flow intensities of the local and global optimized networks, it is ensured that the finally output bus network achieves global optimality while taking into account local demands, improving the overall utilization efficiency of bus resources, and ensuring the best operation effect on the premise of meeting the passenger flow demands of different regions. Further, if the ratio of the first passenger flow intensity to the second passenger flow intensity is less than the preset weight increase factor value, the globally optimized bus network is discarded, and the construction process of the globally optimized bus network is restarted, and the optimization process is carried out again to obtain a globally optimized bus network that meets the requirements, avoiding the use of a globally optimized solution that may have poor effects, preventing the destruction of the originally good local bus network due to unreasonable global optimization, ensuring the overall stability and effectiveness of the bus network, and ensuring that the optimization of the bus network is always guided by the actual passenger flow demand and operation effect, without blindly pursuing global optimization and ignoring local demands.

[0027] It can be understood that based on the passenger flow intensity, a locally optimal bus network is constructed to obtain the first passenger flow intensity, a Monte Carlo tree search model is constructed, a globally optimal bus network is constructed for the bus line set, its average passenger flow intensity is calculated to obtain the second passenger flow intensity, and the first passenger flow intensity and the second passenger flow intensity are compared and judged to obtain a globally optimal bus network with respect to passenger flow intensity. Planning bus routes based on passenger flow intensity can accurately match the passenger flow. According to the passenger flow intensity in different regions and time periods, resources are reasonably allocated to hot spots, flexibly responding to passenger flow changes. Using the Monte Carlo tree search model can quickly generate solutions, calculate search weights using multiple attributes of the lines, comprehensively analyze the lines, making the line selection and network construction more scientific, and making decisions based on data and algorithms, reducing human experience bias.

[0028] Furthermore, the method can optimize the bus network structure, greatly reducing the phenomenon of buses running empty. On the basis of meeting the original bus passenger service demands, the overall mileage scale of the bus lines decreases, and the passenger flow intensity of the bus network can be increased to twice the original, which will greatly improve the operation efficiency of bus enterprises and achieve cost reduction and efficiency increase.

[0029] As an embodiment, for the final bus network, the passenger flow of each station is obtained in real time; according to the travel characteristics and needs of different population identities, a differential bus departure time adjustment strategy is formulated; for the lines with large passenger flow determined through data analysis and on-site investigation, the number of trips on the line is increased during peak hours. At the same time, a shortened itinerary version of the line is designed and added.

[0030] Specifically, the passenger flow of each station is obtained through high-precision passenger flow statistical equipment installed at bus stops, including infrared induction counters, video analysis systems, as well as the integration of multiple data such as smart bus card systems and mobile APP ride data. The collection frequency of various data is not less than once per minute to ensure the real-time and accuracy of passenger flow data; at the same time, image recognition technology is used to analyze the facial features and clothing styles of passengers, and combined with data such as age and gender in the card swiping information, to judge the identity of the passenger flow population at the corresponding station, including students, office workers, the elderly, tourists, etc.; among them, a bus departure time adjustment strategy is formulated according to different population identities. For example, for the student group, the number of trips is increased 20 to 30 minutes in advance on school days in the morning, and the departure interval is shortened from 15 minutes to 8 to 10 minutes on the lines around schools during the school dismissal period; for office workers, during the morning and evening peak hours on weekdays, for the lines connecting major residential areas and commercial areas and office areas, the departure interval is shortened to 5 to 8 minutes, and the departure time is dynamically adjusted according to real-time road conditions to avoid congestion; for the elderly, between 9 am and 11 am and 2 pm and 4 pm, the number of trips is appropriately increased, and the departure interval is set to 15 to 20 minutes. For the lines with large passenger flow, the itinerary of the line can be designed to be shortened. For example, for the lines passing through multiple commercial areas and residential areas and with large passenger flow in some sections, a short-distance line that only runs at the main stations in these commercial areas and their surrounding areas is set, and the departure interval is set to 8 to 12 minutes to increase the trip coverage of this section to meet the lines with large passenger flow.

[0031] In addition, regarding the distribution of some schools along the line, considering factors such as the line length, transport capacity, road traffic capacity, and surrounding traffic conditions, a reasonable limit is set for the number of schools on the line. A real-time traffic monitoring system is established. Combining bus operation data and information from the traffic management department, the traffic conditions on the line and the boarding situation of passengers are monitored in real time. When it is judged that due to an excessive number of schools on the line, problems such as traffic jams and difficulties for passengers to board occur during school arrival and departure times (such as a significant decrease in vehicle speed, a long queuing time for passengers at stations, and a high load factor of vehicles), measures to adjust the departure time are taken. For example, for a bus line within 10 kilometers in length, with narrow roads and limited transport capacity, the number of schools it passes through is restricted to no more than 3; for bus lines on main roads, the number of schools it passes through is restricted to no more than 5, fully considering information such as school arrival and departure times and the number of students when setting this. During the peak school arrival and departure times, the fixed departure interval is adjusted to a dynamic departure interval. According to the real-time passenger flow and road traffic conditions, the departure interval is adjusted from 10 minutes to 6 to 8 minutes. At the same time, the departure times of vehicles are reasonably arranged, with some trips advanced or postponed by 10 to 15 minutes so that they pass through the school area when the road is relatively unobstructed.

[0032] Finally, by collaborating with the urban planning department and community management agencies, the distribution of schools and elderly communities on the line is counted, and information such as school types, scales, arrival and departure times, the population quantity and age structure of elderly communities is recorded in detail. At the same time, with the help of high-definition cameras on buses and image analysis algorithms, information such as the age range of boarding passengers and the number of stops they take is monitored in real time to judge the categories of the population carried on the line; according to the distribution of schools and elderly communities on the line and the real-time population category information, a fare adjustment strategy is formulated; for lines with a large number of elderly people, comfortable vehicle models equipped with soft seats, wide aisles, and barrier-free facilities (such as wheelchair ramps and handrails) are selected.

[0033] Specifically, since students and the elderly have a greater demand for public transportation, the ticket prices of routes with a large number of such people can be adjusted. Although students have student discounts, there are some routes with long distances that may have high ticket prices. In addition, the elderly have senior citizen preferential cards, which may offer discounts or free rides, but there are still some elderly people close in age or with disabilities. For these people, the ticket prices can be correspondingly reduced to make the bus routes more beneficial to the people. For example, for routes passing by many schools, preferential ticket prices can be offered to students during school hours, such as half price or discounts for student cards; for routes with concentrated elderly communities, preferential discounts for senior citizen cards can be set or monthly and quarterly ticket packages can be launched. When the elderly travel, the overall ticket price can be adjusted accordingly, such as reducing it by 20%-40%. Moreover, the ticket price can be dynamically adjusted according to the real-time population category. For example, when there are more elderly people, the ticket price can be further reduced, and when there is a large passenger flow of office workers, the ticket price can be appropriately increased. Further, on some routes with a large number of elderly people, drivers with more driving experience can be arranged to drive. Through multi-dimensional evaluations of the driver's driving experience, safety records, and passenger evaluations, drivers with higher driving ages and better evaluations can be matched for this route. The driver needs to undergo special training for the travel characteristics and needs of the elderly, and speed limits are required on this route to avoid poor riding experiences caused by the driver's too fast driving speed. In addition, signs for elderly routes need to be posted outside the bus to facilitate passengers to distinguish the vehicles. Further, the vehicle type can be dynamically adjusted according to the real-time population category information. For example, when there are many passengers carrying large luggage, vehicles that can accommodate large luggage can be deployed.

[0034] As an embodiment, for some emergencies, it is necessary to adjust bus routes in real time. An all-round and multi-level emergency monitoring system is constructed, which deeply integrates multi-channel information sources such as real-time road condition data and accident report data of the traffic management department, weather forecasts and disaster warning data of the meteorological department, and real-time news reports of the news media. At the same time, the urban surveillance camera system and sensor data on buses (such as vehicle driving status, location information, etc.) are accessed to achieve 24-hour uninterrupted real-time monitoring of emergencies that may affect bus operations. The types of emergencies involved include but are not limited to natural disasters (such as heavy rain, heavy snow, earthquakes, typhoons, etc.), traffic accidents (such as vehicle collisions, road construction, etc.); a scientific, rigorous, classified and graded early warning mechanism is formulated. According to multi-dimensional factors such as the severity, impact range, and development trend of the event, the early warning signals are divided into different levels, such as blue early warning (general event, may have a slight impact on bus operations), yellow early warning (relatively large event, may cause some bus routes to be blocked), orange early warning (major event, may cause multiple bus routes to be suspended or severely delayed), and red early warning (especially major event, may paralyze the entire bus network). For different levels of early warning signals, the corresponding release processes, release channels, and release scopes are clearly defined. For example, the blue early warning can be pushed through the bus APP and displayed on the bus stop display screens; for orange and above early warnings, in addition to the above channels, it is also necessary to be widely released through media such as radio and television to ensure that bus operation departments, drivers, and passengers can obtain accurate early warning information in a timely manner and gain sufficient preparation time for emergency response. For different types of emergency events, detailed, specific and operable emergency response strategies are formulated. When encountering natural disasters (such as waterlogging on the road caused by heavy rain): Immediately activate the road waterlogging monitoring mechanism, and the water depth information is fed back in real time through water level sensors installed at key positions on the road. For sections where the water depth exceeds the safety threshold, quickly adjust the routes of affected bus routes, use geographic information system (GIS) and real-time road condition data to plan and select alternative routes to avoid waterlogged sections. At the same time, according to the waterlogging situation and road traffic capacity, reasonably adjust the operating speed and departure intervals of vehicles to ensure driving safety. For bus routes that cannot be adjusted, promptly issue suspension or diversion notices and arrange staff at relevant stations for guidance and explanation work. When a traffic accident occurs: Obtain detailed information about the accident in the first place, including the location, severity, and types of vehicles involved in the accident. Take corresponding measures according to the impact of the accident on road traffic. If the accident causes some lanes to be closed, adjust the driving routes of affected lines and guide vehicles to detour; if the accident is relatively serious and causes the road to be completely blocked, suspend the relevant lines and promptly release information to passengers through channels such as the bus APP and radio, informing passengers of the recovery time of the suspended lines and alternative travel suggestions.Meanwhile, cooperate with the traffic management department to handle accidents and conduct on-site traffic guidance work to ensure that rescue vehicles and personnel can reach the scene smoothly.

[0035] As an embodiment, strengthen the integration of the bus network with other transportation modes such as urban rail transit, shared bicycles, and taxis. By establishing an integrated transportation information platform, realize data sharing and coordinated dispatching among different transportation modes; formulate a unified transportation plan to promote the coordinated development among different transportation modes.

[0036] For example, reasonably layout bus stops and subway stations to achieve seamless transfer, provide a special parking area for shared bicycles and connect it with bus stops to facilitate passengers' short-distance trips, cooperate with taxi companies to achieve complementary operation of taxis and buses, and improve the overall efficiency of urban transportation. By adjusting bus fares and fare discounts, guide passengers to give priority to taking the bus, encourage shared bicycle enterprises and taxi companies to adopt green and environmentally friendly operation models, and jointly contribute to the sustainable development of the city. At the same time, strengthen the construction and management of integrated transportation hubs, improve the service level and transfer efficiency of transportation hubs, and provide passengers with a more convenient travel experience.

[0037] Step S1 specifically includes the following steps: Step S11: Obtain the road traffic network diagram, draw bus lines based on the stations and road sections in the diagram, establish a set of bus terminal pairs according to the stations in the road traffic network diagram, establish a bus demand OD matrix indexed by road sections, and preset a non-straight-line coefficient threshold and a preset passenger flow intensity threshold; Step S12: Expand the nodes of the first stations in the set of bus terminal pairs. Expand the nodes of any one of the first stations to obtain an adjacent station list. Traverse the adjacent station list, and form a node list by combining the adjacent stations in the adjacent station list with the corresponding first stations to obtain the node lists of all first stations; Step S13: Calculate the non-straight-line coefficient and passenger flow intensity of the node lists of all first stations, determine whether they meet the construction requirements, and construct an initial line list from the node lists of all first stations that meet the construction requirements to obtain an initial line list. The construction requirements include that the non-straight-line coefficient of the node list is less than the preset non-straight-line coefficient threshold and the passenger flow intensity is greater than the preset passenger flow intensity threshold. The node list of the first station is the initial line; Step S14: Use the adjacent stations in the initial line list as the first stations to expand the nodes again, obtain the corresponding adjacent station list, and generate a derivative line list that meets the construction requirements; Step S15: When the adjacent stations in the derivative line list are the last stations of the bus terminals, stop expanding the nodes, and integrate the initial line list and the derivative line list into bus lines to obtain a set of alternative bus lines.

[0038] It is understandable that by using a high-precision Geographic Information System (GIS) and real-time traffic data, the accurate location information of bus stops and the surrounding road network conditions are obtained, so as to obtain a precise road traffic network diagram. The road traffic network diagram includes bus stops and bus sections. The bus lines are drawn by combining the bus stops and bus sections. When drawing, various factors such as road traffic capacity, traffic congestion conditions, and the travel needs of surrounding residents are comprehensively considered to ensure that the drawn lines not only conform to the actual traffic conditions but also can meet the travel needs of passengers to the greatest extent. The stops in the road traffic network diagram are combined in pairs to construct a set of bus terminal pairs. Each pair of terminals represents the start and end points of a potential bus line. The customer demand information of each line in the bus line is collected through various channels, and the acquisition channels include bus card swiping records, online questionnaires, on-site interviews, etc. According to the customer demand data, the travel frequency, travel time, travel purpose, etc. of passengers on different lines can be reflected. For each starting point in the set of bus terminal pairs, a node expansion operation is carried out. With the help of the road traffic network diagram, all adjacent stops directly connected to the starting point are found to form an adjacent stop list. The adjacent stop list is traversed, and each adjacent stop is combined with the corresponding starting point to form a node list. Through this operation, a series of possible starting segments of the line are generated for each starting point. For the node lists of all starting points, their non-direct coefficient and passenger flow intensity are calculated respectively. Among them, the non-direct coefficient reflects the degree of circuitousness of the line, and the calculation method is the ratio of the actual length of the line to the straight-line distance between the starting and ending stops; the passenger flow intensity reflects the size of the passenger flow of the line and can be calculated through the previously collected customer demand data. According to the preset non-direct coefficient and passenger flow intensity standards, the node list is screened, and the initial line represents the starting segment of the potential bus line that meets the basic operation requirements. Regarding the adjacent stops in the initial line list as new starting points, repeat the node expansion operation in step S12 to obtain a new adjacent stop list, and screen the new adjacent stop list to generate a list of derivative lines that meet the construction requirements (the non-direct coefficient is less than the preset value and the passenger flow intensity is greater than the preset value). These derivative lines are further extended and expanded on the basis of the initial line. During the generation process of the derivative line list, check whether the adjacent stop is the ending stop of the bus terminal. If it is the ending stop, stop the node expansion operation, indicating that a complete bus line has been constructed. Integrate the initial line list and the derivative line list to form a complete bus line. Finally, summarize all the qualified bus lines to obtain a set of bus lines. During the process of screening the lines, using indicators such as the non-direct coefficient and passenger flow intensity for evaluation can ensure that the generated bus lines have high operation efficiency and service quality. Avoid overly circuitous lines, improve the running speed and punctuality rate of vehicles, and at the same time ensure that the lines have sufficient passenger flow to improve the operation efficiency.

[0039] Step S1 runs as follows: Preparation work: Road traffic network graph G(V, E), which consists of stations V and road segments E. Indexed by road segments, construct a bus demand matrix DicOD, in the form of (Link1, Link2, Vol), indicating that the passenger demand from the bus stop on road segment Link1 to the bus stop on road segment Link2 is Vol, the non-straight-line coefficient threshold NL between nodes, the bus line passenger flow intensity threshold D, and the set of bus terminal pairs Terminals.

[0040] Select a pair of bus terminal nodes (StartTerminal, EndTerminal) from the set of bus terminal pairs Terminals (bus terminal pairs with short distances have been excluded), and add the starting terminal node StartTerminal to the node list NodeList; perform node expansion on the starting terminal node StartTerminal, select an adjacent node Nodeadd from the adjacent node list NextnodeList of the starting terminal node, and add it to the node list NodeList; calculate the non-straight-line coefficient and the passenger flow intensity of the direct bus demand served for (StartTerminal, Nodeadd) in the NodeList. If the non-straight-line coefficient is less than the threshold NL and the passenger flow intensity is greater than the threshold D, then add the node list NodeList as r0 to the line list LinesList; select the next adjacent node Nodeadd in the NextnodeList, and repeat the above process until all adjacent nodes in the NextnodeList are traversed to generate r1, r2..., and establish the initial line list LinesList. Secondly, repeat steps S1b, S1c, and S1d for the tail nodes of each line r0, r1, r2... in the LinesList to perform node expansion and continuously generate new lines. If the tail node of a line r is the terminal node EndTerminal, then the node expansion of this line stops. If the tail nodes of all lines in the line list LinesList are terminal nodes, then stop the node expansion of the bus terminal pair (StartTerminal, EndTerminal), and add LinesList to the line pool LinePool. If the tail nodes of all lines in the line list LinesList are terminal nodes, then return to select the next bus terminal pair in Terminals and repeat the above process until all bus terminal pairs in Terminals are traversed, and finally output the line pool LinePool.

[0041] Step S2 specifically includes the following steps: Step S21: Corresponding to the set of alternative bus lines, preset the maximum number of bus lines included in the locally optimal bus network and the threshold of the minimum service bus demand ratio required for the set of locally optimal bus lines. Step S22: Preprocess the lines in the set of alternative bus lines, sort them according to the passenger flow intensity of each line, initialize the set of selected lines, and initialize the set of locally optimal bus networks. Step S23: Select the line with the largest passenger flow intensity in the set of alternative bus lines as the first line in the set of locally optimal bus networks, and at the same time add it to the set of selected lines. In addition, remove this line from the set of alternative bus lines. Step S24: Select the second line of the set of locally optimal bus networks. Add each bus line in the set of alternative bus lines to the set of selected lines respectively, calculate the average passenger flow intensity of the set of selected lines after different lines are added, and obtain the line that makes the average passenger flow intensity of the set of selected lines the largest as the second line to be added to the set of locally optimal bus networks. Calculate the total bus demand ratio served by the current locally optimal bus network; the total bus demand ratio includes the passenger flow intensity of direct bus demand and the passenger flow intensity of one-time same-platform transfer bus demand. Step S25: Update the bus demand OD matrix of the set of bus terminal pairs, remove the bus demand served by the current locally optimal bus network from the bus demand OD matrix, and update the set of alternative bus lines and the set of selected lines; the update of the set of alternative bus lines includes deleting the newly selected line from the set of alternative bus lines and deleting the lines with passenger flow intensity lower than the preset passenger flow intensity threshold in the set of alternative bus lines to obtain the updated set of alternative bus lines. The update of the set of selected lines includes making the set of selected lines consistent with the current locally optimal bus network. Step S26: Repeat the above steps to obtain the next line of the set of locally optimal bus lines, update the bus demand OD matrix, the set of alternative bus lines and the set of selected lines, and calculate the total bus demand ratio served by the current locally optimal bus network until the total bus demand ratio served by the current locally optimal bus network exceeds the preset minimum service bus demand ratio threshold, or the number of bus lines in the current locally optimal bus line set is equal to the total number of bus lines with the preset first quantity, then output the set of selected lines as the set of locally optimal bus lines and calculate the passenger flow intensity of this locally optimal bus network.

[0042] Specifically, for the set of alternative bus lines, preset the maximum number of bus lines included in the locally optimal bus network and the threshold of the minimum service bus demand ratio required for the set of locally optimal bus lines. Sort the lines in the set of alternative bus lines according to the passenger flow intensity. At the same time, initialize the set of selected lines and the set of locally optimal bus networks. Select the line with the largest passenger flow intensity from the set of alternative bus lines as the first line of the set of locally optimal bus networks, add it to the set of selected lines, and remove this line from the set of alternative bus lines. For the second line to be added, add each line in the set of alternative bus lines to the set of selected lines respectively, calculate the average passenger flow intensity of the set of selected lines after different lines are added, and obtain the line that makes the average passenger flow intensity of the set of selected lines the largest as the second line to be added to the set of locally optimal bus networks. Calculate the total bus demand ratio served by the current locally optimal bus network (including the passenger flow intensity of direct bus demand and the passenger flow intensity of one-time same-platform transfer bus demand). Update the OD matrix of bus demand for the set of bus terminal pairs, remove the bus demand served by the current locally optimal bus network, and update the set of alternative bus lines: delete the newly selected line from the set of alternative bus lines, and at the same time delete the lines in the set of alternative bus lines with passenger flow intensity lower than the preset passenger flow intensity threshold. Update the set of selected lines to be consistent with the current locally optimal bus network. Repeat step 4 and step 5 to continuously obtain the next line of the set of locally optimal bus lines, update the OD matrix of bus demand, the set of alternative bus lines and the set of selected lines, and calculate the total bus demand ratio served by the current locally optimal bus network. When the total bus demand ratio served by the current locally optimal bus network exceeds the preset minimum service bus demand ratio threshold or the number of bus lines in the current locally optimal bus line set is equal to the total number of bus lines with the preset first quantity, stop the loop processing. When the loop stops, output the set of selected lines as the set of locally optimal bus lines, and calculate the passenger flow intensity of this locally optimal bus network.

[0043] It can be understood that in the set of bus lines, any two lines are respectively selected as the first line and the second line. Through channels such as bus card swiping data, questionnaires, and intelligent ticketing systems, the passenger demand information from each bus stop on the first line to each bus stop on the second line is collected. The first line, the second line, and the passenger demand are combined into a bus demand matrix. Each element in the matrix represents the number of passenger demands from a certain stop on the first line to a certain stop on the second line. The minimum service bus demand ratio can be set according to the corresponding actual situation. According to the goals and actual situation of bus operation, the minimum service bus demand ratio that the locally optimal bus line set needs to meet is preset in advance as the subsequent screening and judgment criterion. Based on the global passenger flow intensity, the line with the largest passenger flow intensity is selected and added to the selected line set, and removed from the original set. The selected line set is traversed and coordinated with the candidate lines to calculate the passenger flow intensity (including direct and one-time same-platform transfers). The line with the largest intensity is selected into the real-time local optimal set, and the current total service demand ratio is calculated. The serviced demand is removed from the demand matrix, and the screened line set and candidate set are updated. The corresponding lines and low-passenger-flow lines are removed, and the current local optimal network is used to replace the candidate set. Repeat the above steps until the total service demand ratio exceeds the preset value, output the locally optimal line set and calculate its passenger flow intensity. Through the screening and combination of bus lines, a locally optimal bus line set can be obtained, enabling the bus network to reach a better state in terms of passenger flow intensity on the premise of meeting a certain service demand ratio, improving the overall operation efficiency of the bus network. Based on the bus demand matrix for line screening and optimization can ensure that the bus network covers the travel needs of passengers to the greatest extent, improving the quality and satisfaction of bus services. During the screening process, line selection and update based on passenger transport intensity and passenger flow intensity help to reasonably allocate bus resources and avoid waste and idleness of resources.

[0044] The specific operations are as follows: Input the bus line set LinePool, the proportion q of the minimum service bus demand of the local optimal line network plan, and the bus demand matrix DicOD. Sort the lines in the bus line set LinePool in descending order of passenger flow intensity, select the line with the largest passenger flow intensity as the first line of the local optimal bus line network LocalPlan, add it to the candidate line set Paths, and remove it from the bus line set LinePool. Traverse all the lines in the bus line set LinePool, and calculate the passenger flow intensity of the candidate line set Paths if line 1 is added to the candidate line set Paths. Mainly calculate the increased served bus demand, including the passenger flow intensity of direct bus demand and the passenger flow intensity of one-time same-platform transfer bus demand. Add the line that makes the passenger flow intensity of the candidate line set Paths the largest to the local optimal bus line network LocalPlan. Calculate the total proportion Q of the served bus demand of the current local optimal bus line network LocalPlan. Remove the served bus demand from the demand matrix DicOD. The passenger flow intensity of some lines in the bus line set LinePool will not meet the requirements, so update the bus line set LinePool and remove the lines with the passenger flow intensity affected below the threshold. Update the candidate line set Paths, and replace the candidate line set Paths with the local optimal bus line network LocalPlan. Repeat the above steps, and search for the current optimal line each time, that is, the line with the largest increased served traffic demand, and add it to the local optimal bus line network LocalPlan until the total proportion Q of the served bus demand of the line network plan is greater than the minimum served bus demand proportion q. Calculate the passenger flow intensity LocalDensity of the local optimal bus line network LocalPlan as the input for the MCTS tree search.

[0045] Among them, the passenger flow intensity of direct bus demand and the passenger flow intensity of one-stop same-platform transfer bus demand are important components in calculating the passenger flow intensity of the lines in the set. The passenger flow intensity of the lines in the set reflects the overall passenger flow carrying capacity of the lines. It covers the passenger flow generated by passengers traveling through direct means and the passenger flow brought by traveling through one-stop same-platform transfer means. Only by comprehensively considering these two parts of passenger flow intensity can the passenger flow intensity of the lines in the set be accurately calculated, so as to comprehensively understand the actual passenger flow demand of the lines. Calculating the passenger flow intensity of the lines in the set can help determine which lines need to be focused on and optimized, while the passenger flow intensity of direct bus demand and the passenger flow intensity of one-stop same-platform transfer bus demand further refine the optimization direction. For example, when the passenger flow intensity of a certain line in the set is relatively high, and through analysis, it is found that the proportion of the passenger flow intensity of direct bus demand is relatively large, then during optimization, it may be more focused on ensuring the direct service of this line, such as increasing vehicles or increasing the frequency of trips; when the proportion of the passenger flow intensity of one-stop same-platform transfer bus demand is relatively large, it may be necessary to optimize the transfer facilities and transfer plans to improve the transfer efficiency.

[0046] Calculating the passenger flow intensity of direct bus demand in step S23 specifically includes the following steps: Split the selected bus line into multiple consecutive sections, select any two sections to construct a section combination, and obtain a set of section combinations; Select any section combination in the set of section combinations, and determine whether the section combination is included in the bus demand matrix. If it is, allocate the passenger demand corresponding to the bus demand matrix to the selected bus line to obtain the passenger flow volume of the bus line; if not, re-select a section combination and mark the loaded section combination; Obtain the passenger volume of the section with the largest passenger flow on the selected bus line, perform a summation process with the passenger flow volume of the bus line, and determine whether the sum value is greater than the maximum cross-sectional passenger capacity of the bus line; If the sum value is greater than the maximum cross-sectional passenger capacity of the bus line, then the passenger flow value of the bus line is the passenger flow intensity of the direct bus demand of the selected bus line; If the sum value is equal to or less than the maximum cross-sectional passenger capacity of the bus line, then the passenger flow intensity of the direct bus demand of the selected bus line is the maximum cross-sectional passenger capacity of the selected bus line minus the passenger volume of the section with the largest passenger flow on the selected bus line.

[0047] Specifically, the passenger flow intensity of the direct bus demand directly reflects the degree of demand of passengers for bus services that do not require transfers and can directly reach the destination from the starting point. A higher passenger flow intensity of the direct bus demand means that on the corresponding line section, a large number of passengers expect to travel directly to save time and energy. This provides a clear direction for the bus network planning, that is, to prioritize ensuring these high-demand direct lines to improve the travel experience and satisfaction of passengers. By analyzing the passenger flow intensity of the direct bus demand, some potential important line directions can be found. For those areas with a large passenger flow intensity of the direct demand, the bus operation department can consider adding or optimizing bus lines to better cover these areas and improve the overall coverage and accessibility of the bus network.

[0048] Calculating the passenger flow intensity of the one-stop transfer bus demand in step S23 specifically includes the following steps: Determine the bus lines and transfer sections that can perform one-stop transfers for the selected bus line, and construct a transfer line set; Select the transfer lines passing through the same section as the selected bus line in the transfer line set, and construct a transfer section set; Select the first transfer section in the transfer section set, and combine it with the selected bus line to construct a first preceeding section set and a first subsequent section set. The first preceeding section set includes all sections (including the starting section) between the starting section of the bus line and the first transfer section, and the first subsequent section set includes all sections (including the ending section) between the first transfer section and the ending section of the bus line; Based on the first transfer section, combine it with the transfer lines in the transfer line set to construct a second preceeding section set and a second subsequent section set. The second preceeding section set includes all sections (including the starting section) between the starting section of the transfer line and the first transfer section, and the second subsequent section set includes all sections (including the ending section) between the second transfer section and the ending section of the bus line; Select the first selected preceeding section and the second selected subsequent section from the first preceeding section set and the second subsequent section set respectively to form a selected section combination, determine whether the selected section combination is in the bus demand matrix, and obtain the first passenger demand; Allocate the passenger demand corresponding to the selected section combination to the corresponding first transfer section and transfer line. The passenger volume of all sections in the first selected preceeding section and the passenger volume of all sections in the second selected subsequent section are increased by the first passenger demand to obtain the first selected preceeding section passenger volume set and the second selected subsequent section passenger volume set; Obtain the maximum cross-sectional passenger capacity of the line corresponding to the first selected previous section and the second selected subsequent section. Obtain the maximum passenger flow section and maximum passenger flow of the first selected previous section from the passenger volume set of the first selected previous section and the maximum passenger flow section and maximum passenger flow of the second selected subsequent section from the passenger volume set of the second selected subsequent section. Compare the maximum passenger flow of the first selected previous section with the maximum cross-sectional passenger capacity of the line of the first selected previous section, and compare the maximum passenger flow of the second selected subsequent section with the maximum cross-sectional passenger capacity of the line of the second selected subsequent section. When the maximum passenger flow is less than the maximum cross-sectional passenger capacity of the line, the passenger flow intensity of the one-time same-platform transfer bus demand between the first selected previous section and the second selected subsequent section is the first passenger demand. When the maximum passenger flow is greater than the maximum cross-sectional passenger capacity of the line, the passenger flow intensity of the one-time same-platform transfer bus demand between the first selected previous section and the second selected subsequent section is the difference between the maximum cross-sectional passenger capacity of the line and the passenger volume of all sections within the first selected previous section, and the difference between the maximum cross-sectional passenger capacity of the line and the passenger volume of all sections within the second selected subsequent section; Repeat the above process for the first subsequent section set and the second subsequent section set, and calculate the passenger flow intensity of the corresponding one-time same-platform transfer bus demand.

[0049] Specifically, in actual bus trips, not all passengers can achieve direct access. One-time same-platform transfer can meet the diverse travel needs of passengers to a certain extent. The passenger flow intensity of one-time same-platform transfer bus demand reflects the demand situation of passengers for traveling through the same-platform transfer method. By analyzing this indicator, the bus operation department can understand which transfer nodes and transfer lines have greater demand, so as to optimize transfer facilities and transfer services, and improve the convenience and comfort of passengers' transfers; through the analysis of the passenger flow intensity of one-time same-platform transfer bus demand, some key transfer nodes and transfer lines can be determined, and these nodes and lines can be planned and laid out as important components of the bus network, which helps to optimize the structure of the bus network.

[0050] Step S3 specifically includes the following steps: Step S31: Preset the total number of runs of Monte Carlo tree search, and preset the total number of lines in the global optimal bus network plan; Initialize the bus demand OD matrix, initialize the line probability selection weight set, and initialize the set of selected lines; Step S32: According to the line probability selection weight set, randomly select a bus line from the set of alternative lines, add it to the set of selected lines, update the set of alternative lines, and remove the selected bus line; Update the line probability selection weight set and remove the selected bus line; Step S33: Determine whether the total number of lines in the selected line set is greater than the preset total number of lines in the global optimal bus network. If it is less than the preset value, select another bus line from the updated alternative bus line set, and then perform repeated update processing until the total number of lines in the selected bus line set is equal to the preset value; calculate the average passenger flow intensity of the selected line set as the second passenger flow intensity.

[0051] Specifically, preset the total number of searches and the number of target lines, initialize the bus demand matrix (recording the passenger flow demand between stations), the line weight set, and the selected line set; in the first iteration, randomly select a line according to the current weight, add it to the selected set, update the alternative lines and weights until the number of selected lines reaches the preset target. Calculate the average passenger flow intensity of the selected lines to obtain the second passenger flow intensity. Initially, assign the same weight to all alternative lines, randomly select lines to construct a candidate solution, increase the weight of the lines with excellent performance (i.e., the lines that improve the passenger flow intensity) in subsequent iterations to increase the probability of being selected, repeat the search process, gradually focus on a better line combination, and finally generate the global optimal bus network. Further, through random search and probability weight adjustment, find a bus line combination with a high proportion of covered bus demand and the optimal passenger flow intensity. The initial random line selection ensures exploration diversity, and the subsequent weight adjustment ensures efficient use of known information. Obtain an approximate optimal solution quickly through a limited number of iterations, which is suitable for large-scale transportation networks and can adapt to different scales of bus systems by adjusting the number of searches and the number of lines, improving scalability. Further, through the probability iteration mechanism of Monte Carlo tree search, the balance between computational efficiency and optimization quality is achieved in bus network planning, especially suitable for dealing with large-scale and high-complexity transportation network optimization problems.

[0052] Step S4 specifically includes the following steps: Step S41: When the second passenger flow intensity is greater than the first passenger flow intensity, use the ratio of the two as the weight increase factor for the current line probability selection. For each line in the current selected line set in the line probability selection weight set, multiply the probability selection weight of the line by the weight increase factor, and update the initial line probability weight set. Step S42: Compare the number of Monte Carlo tree searches with the preset total number of runs. If the number of Monte Carlo tree searches is less than the preset total number of runs, save the selected line set to the global optimal bus network solution set and restart the Monte Carlo tree search. Step S43: If the number of Monte Carlo tree searches is greater than the preset total number of runs, output the selected line set with the maximum second passenger flow intensity as the global optimal bus network.

[0053] It can be understood that the passenger flow intensity of the initial optimal bus network set is compared with that of the locally optimal bus network obtained in step S3 to judge the advantages and disadvantages of the initial optimal bus network set and the locally optimal bus network in terms of passenger flow carrying capacity. This judgment can continuously optimize the line combination and weight allocation of the bus network, ensuring that the finally output bus network reaches the optimal state in terms of passenger flow carrying capacity, and improving the overall service quality and operation efficiency of the bus network. According to the comparison result of the passenger flow intensity, the search weight of the line is adjusted. If the passenger flow intensity of the initial optimal bus network set is greater than that of the locally optimal bus network, it means that the initial optimal bus network set performs better in terms of passenger flow. If the passenger flow intensity of the initial optimal bus network set is less than that of the locally optimal bus network, the weight setting of the line needs to be re-examined. During the adjustment process, a weight increase factor is obtained for the subsequent specific adjustment of the line weight. When the passenger flow intensity of the initial optimal bus network set is greater than that of the locally optimal bus network, the weight increase factor is calculated through a specific calculation method to obtain the initial weight increase factor. This calculation method may involve factors such as the difference and ratio of the passenger flow intensities of the two. The initial optimal bus network set is copied into the final bus network as the current candidate final network. When the passenger flow intensity of the initial optimal bus network set is less than that of the locally optimal bus network, the Monte Carlo tree search is re-run. In the optimization process of the bus network, both the initial optimal bus network set obtained through the Monte Carlo tree search model in the global scope and the results of the locally optimal bus network are considered. Through the comparison and weight adjustment of the two, the balance between global and local optimality is achieved, avoiding the situation of only pursuing local optimality while ignoring the global situation, and making the bus network more reasonable and scientific.

[0054] It can be understood that the specific operations of steps S3 and S4 are as follows: Initialize the total number of runs of the Monte Carlo tree search as Runs, initialize the total number of lines of the public transport network plan as LinesNum; initialize the bus demand matrix as DicOD, initialize the line counter LinesCount = 0 of the target plan of the public transport network; initialize the Monte Carlo tree search space to obtain the model line set AllChoices, which is all the lines of the bus line set LinePool, initialize the search weight set of all lines in the search space to obtain the space line search weight set Allwts = [100, 100,..,..., 100], and the current weight increase factor Curfactor = 0; Copy the model route set AllChoices to the public transport network CurChoices, and copy all route search weight sets Allwts to the current route search weight set Curwts; randomly select a public transport route LineChoiced in the public transport network CurChoices according to the current route selection weight set Curwts, and add it to the optimal bus network set GlobePlan; increment the route counter LinesCount by 1. Calculate the increased service bus demand of the optimal bus network set GlobePlan, update the bus demand matrix DicOD, and delete the bus demand served by the network; update the public transport network CurChoices, delete the selected bus route LineChoiced, update the current route selection weight set, obtain the updated spatial route search weight set Curwts, and delete the weight of the selected route LineChoiced; determine whether the route counter LinesCount is greater than LinesNum, if not, return to step S3c to select the next route; if the route counter LinesCount is greater than LinesNum, then evaluate the passenger flow intensity of the generated optimal bus network set GlobePlan. Calculate the average passenger flow intensity GlobeDensity of the optimal bus network set GlobePlan, and use the passenger flow intensity LocalDensity of the local optimal network plan LocalPlan as a reference for adjusting the route search weight. When the passenger flow intensity GlobeDensity is greater than LocalDensity, calculate the weight increase factor factor = GlobeDensity / LocalDensity. Update the route search weight set Allwts, and multiply the weight of each bus route in the optimal bus network set GlobePlan by the weight increase factor factor; otherwise, factor = 0. If factor > Curfactor, then Curfactor = factor, and copy the bus network GlobePlan to the final bus network LinePlan. Determine whether the number of Monte Carlo tree search runs is greater than the total number of runs Runs, if greater, end the search and output the final bus network LinePlan, otherwise return to step S3.

[0055] In a second aspect, the present invention discloses a bus network optimization system based on reinforcement learning technology, which includes a bus network optimization method based on reinforcement learning technology.

[0056] Specifically, in the system, the bus network optimization method based on reinforcement learning technology disclosed in the first aspect is adopted. A locally optimal bus route is constructed based on the passenger flow intensity, the first passenger flow intensity is obtained, a Monte Carlo tree search model is constructed, the optimal bus network is constructed for the set of bus routes, its average passenger flow intensity is calculated to obtain the second passenger flow intensity, and the first passenger flow intensity is compared with the second passenger flow intensity for judgment to obtain the final bus network. Planning bus routes based on the passenger flow intensity can accurately match the passenger flow, reasonably allocate resources to hot spots according to the passenger flow intensity in different regions and time periods, flexibly respond to changes in the passenger flow. Using the Monte Carlo tree search model can quickly generate solutions, calculate search weights using multiple attributes of the routes, comprehensively analyze the routes, make the route selection and network construction more scientific, and make decisions based on data and algorithms to reduce human experience bias.

[0057] In a third aspect, the present invention discloses an electronic device, which includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus; The memory is used to store a computer program; The processor is used to implement the steps of the bus network optimization method based on reinforcement learning technology when executing the program stored on the memory.

[0058] Specifically, the electronic device can implement the steps of the bus network optimization method based on reinforcement learning technology disclosed in the first aspect through the processor. A locally optimal bus route is constructed based on the passenger flow intensity, the first passenger flow intensity is obtained, a Monte Carlo tree search model is constructed, the optimal bus network is constructed for the set of bus routes, its average passenger flow intensity is calculated to obtain the second passenger flow intensity, and the first passenger flow intensity is compared with the second passenger flow intensity for judgment to obtain the final bus network. Planning bus routes based on the passenger flow intensity can accurately match the passenger flow, reasonably allocate resources to hot spots according to the passenger flow intensity in different regions and time periods, flexibly respond to changes in the passenger flow. Using the Monte Carlo tree search model can quickly generate solutions, calculate search weights using multiple attributes of the routes, comprehensively analyze the routes, make the route selection and network construction more scientific, and make decisions based on data and algorithms to reduce human experience bias.

[0059] In a fourth aspect, the present invention discloses a storage medium, on which a computer program is stored, and the computer program implements the steps of the bus network optimization method based on reinforcement learning technology when executed by a processor.

[0060] Specifically, the storage medium stores a computer program related to the bus network optimization method based on reinforcement learning technology disclosed in the first aspect, which can be run by a computer to implement. Based on the passenger flow intensity, a locally optimal bus route is constructed, the first passenger flow intensity is obtained, a Monte Carlo tree search model is constructed, the bus route set is constructed to obtain the optimal bus network, its average passenger flow intensity is calculated to obtain the second passenger flow intensity, and the first passenger flow intensity is compared with the second passenger flow intensity to obtain the final bus network. Planning bus routes based on passenger flow intensity can accurately match the passenger flow, reasonably allocate resources to hot spots according to the passenger flow intensity in different regions and time periods, flexibly respond to passenger flow changes, and use the Monte Carlo tree search model to quickly generate solutions. The search weights are calculated using the multi-attributes of the routes, and the routes are comprehensively analyzed to make the route selection and network construction more scientific. Decision-making is based on data and algorithms, reducing human experience bias.

[0061] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0062] In the description of the present invention, it should be understood that the orientation or positional relationships indicated by the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc. are based on the orientation or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention.

[0063] In addition, the terms "first" and "second" are only used for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "a plurality" means two or more unless otherwise specifically defined.

[0064] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed", etc. should be understood in a broad sense. For example, it may be a connection, a detachable connection, or integrated; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal communication of two components or the interaction relationship between two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0065] In the present invention, unless otherwise clearly defined and limited, the first feature being "above" or "below" the second feature may include direct contact between the first and second features, or may include the first and second features not being in direct contact but in contact through additional features therebetween. Moreover, the first feature being "above", "over" and "on top of" the second feature includes the first feature being directly above and obliquely above the second feature, or merely indicating that the horizontal height of the first feature is higher than that of the second feature. The first feature being "below", "beneath" and "under" the second feature includes the first feature being directly below and obliquely below the second feature, or merely indicating that the horizontal height of the first feature is less than that of the second feature.

[0066] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms should not be understood as necessarily referring to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification.

[0067] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, provided that these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these changes and modifications therein.

[0068] The above is the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A bus network optimization method based on reinforcement learning technology, characterized in that Specifically, it includes: Obtain bus stops, draw bus lines between the bus stops, construct a set of alternative bus lines, and calculate the passenger flow intensity of each bus line in the set of alternative bus lines. The set of alternative bus lines needs to meet a preset non - straight - line coefficient threshold and a preset passenger flow intensity threshold; Screen the bus lines one by one from the set of alternative bus lines, add them to the set of selected bus lines and calculate the average passenger flow intensity of the set of selected bus lines. Obtain the set of selected bus lines with the maximum average passenger flow intensity corresponding to the number of bus lines. When the total number of bus lines in the set of selected bus lines reaches the preset first quantity, or the total bus demand ratio of the set of selected bus lines is greater than the preset total bus demand ratio, stop selecting bus lines to obtain a locally optimal bus network, calculate the average passenger flow intensity of the locally optimal bus network, and obtain the first passenger flow intensity; Construct a Monte Carlo tree search model. For each bus line in the set of alternative bus lines, assign the same initial probability selection weight, randomly search for the selected bus lines composed of the preset first quantity of different bus lines, calculate the average passenger flow intensity, and obtain the second passenger flow intensity; Compare the second passenger flow intensity with the first passenger flow intensity. If it is greater than the first passenger flow intensity, increase the probability selection weight of the selected preset first quantity of bus lines to obtain an updated probability selection weight. Based on the updated probability selection weight, re - run the Monte Carlo tree search to screen the selected bus lines. By repeatedly iterating the updated probability selection weight and the selected bus lines, finally generate a line combination plan with the optimal passenger flow intensity to obtain a globally optimal bus network.

2. The method according to claim 1, characterized in that The steps of obtaining bus stops, drawing bus lines between the bus stops, constructing a set of alternative bus lines, and calculating the passenger flow intensity of each bus line in the set of alternative bus lines, where the set of alternative bus lines needs to meet a preset non - straight - line coefficient threshold and a preset passenger flow intensity threshold, specifically include the following steps: Obtain a road traffic network diagram. Based on the stops and road segments in the diagram, draw bus lines, establish a set of bus terminal pairs according to the stops in the road traffic network diagram, establish a bus demand OD matrix indexed by road segments, and preset a non - straight - line coefficient threshold and a preset passenger flow intensity threshold; Expand the nodes of the first stop of the set of bus terminal pairs. Expand any first stop to obtain an adjacent stop list. Traverse the adjacent stop list, and form a node list by combining the adjacent stops in the adjacent stop list with the corresponding first stop to obtain the node lists of all first stops; Calculate the non - straight - line coefficient and passenger flow intensity of the node lists of all first stops, determine whether they meet the construction requirements, and construct an initial line list from the node lists of all first stops that meet the construction requirements to obtain an initial line list. The construction requirements include that the non - straight - line coefficient of the node list is less than the preset non - straight - line coefficient threshold and the passenger flow intensity is greater than the preset passenger flow intensity threshold. The node list of the first stop is the initial line; Use the adjacent stops in the initial line list as the first stops to expand the nodes again, obtain the corresponding adjacent stop list, and generate a derivative line list that meets the construction requirements; When the adjacent station in the derived line list is the terminal station of a bus terminus, stop node expansion, integrate the initial line list and the derived line list into bus lines, and obtain a set of alternative bus lines.

3. The method according to claim 1, characterized in that For each bus line in the set of alternative bus lines, screen the bus lines one by one, add them to the set of selected bus lines, calculate the average passenger flow intensity of the set of selected bus lines, and obtain the set of selected bus lines with the maximum average passenger flow intensity for the corresponding number of bus lines. When the total number of bus lines in the set of selected bus lines reaches the preset first quantity, or the total bus demand ratio of the set of selected bus lines is greater than the preset total bus demand ratio, stop selecting bus lines, obtain a locally optimal bus network, calculate the average passenger flow intensity of the locally optimal bus network, and obtain the first passenger flow intensity. The specific steps are as follows: For the set of alternative bus lines, preset the maximum number of bus lines included in the locally optimal bus network and the minimum service bus demand ratio threshold that the locally optimal bus line set needs to meet. Preprocess the lines in the set of alternative bus lines, sort them according to the passenger flow intensity of each line, initialize the set of selected lines, and initialize the set of locally optimal bus networks. Select the line with the maximum passenger flow intensity in the set of alternative bus lines as the first line of the set of locally optimal bus networks, and at the same time add it to the set of selected lines. In addition, remove this line from the set of alternative bus lines. Select the second line of the set of locally optimal bus networks. Add each bus line in the set of alternative bus lines to the set of selected lines respectively, calculate the average passenger flow intensity of the set of selected lines after different lines are added, obtain the line that makes the average passenger flow intensity of the set of selected lines the largest, and add it as the second line to the set of locally optimal bus networks. Calculate the total bus demand ratio served by the current locally optimal bus network; the total bus demand ratio includes the passenger flow intensity of direct bus demand and the passenger flow intensity of one-time same-platform transfer bus demand. Update the bus demand OD matrix of the bus terminus pair set, remove the bus demand served by the current locally optimal bus network from the bus demand OD matrix, and update the set of alternative bus lines and the set of selected lines; the update of the set of alternative bus lines includes deleting the newly selected line from the set of alternative bus lines and deleting the lines in the set of alternative bus lines with a passenger flow intensity lower than the preset passenger flow intensity threshold to obtain the updated set of alternative bus lines. The update of the set of selected lines includes keeping the set of selected lines consistent with the current locally optimal bus network. Repeat the above steps to obtain the next route in the set of locally optimal bus routes, update the bus demand OD matrix, the set of alternative bus routes, and the set of selected routes, and calculate the total bus demand ratio served by the current locally optimal bus network until the total bus demand ratio served by the current locally optimal bus network exceeds the preset minimum service bus demand ratio threshold, or the number of bus routes in the current locally optimal bus route set is equal to the total number of bus routes with a preset first quantity. Then, output the set of selected routes as the set of locally optimal bus routes, and calculate the passenger flow intensity of this locally optimal bus network.

4. The method according to claim 1, wherein Construct the Monte Carlo tree search model. For each bus route in the set of alternative bus routes, assign the same initial probability selection weight, randomly search for the selected bus routes composed of a preset first quantity of different bus routes, calculate the average passenger flow intensity, and obtain the second passenger flow intensity. The specific steps are as follows: Preset the total number of runs of the Monte Carlo tree search and the total number of routes in the globally optimal bus network plan; initialize the bus demand OD matrix, initialize the set of line probability selection weights, and initialize the set of selected routes; According to the set of line probability selection weights, randomly select a bus route from the set of alternative routes, add it to the set of selected routes, update the set of alternative routes, and remove the selected bus route; update the set of line probability selection weights and remove the selected bus route; Judge whether the total number of routes in the set of selected routes is greater than the total number of routes in the preset globally optimal bus network. If it is less than the preset value, select another bus route from the updated set of alternative bus routes, and then perform repeated update processing until the total number of routes in the set of selected bus routes is equal to the preset value; calculate the average passenger flow intensity of the set of selected routes as the second passenger flow intensity.

5. The method according to claim 1, characterized in that, Compare the second passenger flow intensity with the first passenger flow intensity. If it is greater than the first passenger flow intensity, increase the probability selection weight of the preset first quantity of selected bus routes, obtain the updated probability selection weight, and based on the updated probability selection weight, re-run the Monte Carlo tree search, screen the selected bus routes, and repeatedly iterate the updated probability selection weight and the selected bus routes to finally generate the route combination plan with the optimal passenger flow intensity and obtain the globally optimal bus network. The specific steps are as follows: When the second passenger flow intensity is greater than the first passenger flow intensity, use the ratio of the two as the weight increase factor for the current line probability selection. Multiply the probability selection weight of each line in the current set of selected routes in the set of line probability selection weights by the weight increase factor, and update the initial line probability weight set; Compare the number of Monte Carlo tree search times with the preset total number of runs. If the number of Monte Carlo tree search times is less than the preset total number of runs, save the set of selected routes to the set of globally optimal bus network plans and re-run the Monte Carlo tree search; If the number of Monte Carlo tree search times is greater than the preset total number of runs, output the set of selected routes with the largest second passenger flow intensity as the globally optimal bus network.

6. The method according to claim 3, characterized in that Calculate the passenger flow intensity of the direct bus demand. The specific steps are as follows: The selected bus line is split into multiple consecutive road segments. Any two road segments are selected to construct a road segment combination, and a set of road segment combinations is obtained; Select any one road segment combination from the set of road segment combinations, and determine whether the road segment combination is included in the bus demand matrix. If it is, allocate the passenger demand corresponding to the bus demand matrix to the selected bus line to obtain the passenger flow of the bus line; if not, select another road segment combination and mark the loaded road segment combinations; Obtain the passenger volume of the road segment with the largest passenger flow on the selected bus line, sum it with the passenger flow of the bus line, and determine whether the sum value is greater than the maximum cross-section passenger capacity of the bus line; If the sum value is greater than the maximum cross-section passenger capacity of the bus line, the passenger flow value of the bus line is the passenger flow intensity of the direct bus demand of the selected bus line; If the sum value is equal to or less than the maximum cross-section passenger capacity of the bus line, the passenger flow intensity of the direct bus demand of the selected bus line is the maximum cross-section passenger capacity of the selected bus line minus the passenger volume of the road segment with the largest passenger flow on the selected bus line.

7. The method according to claim 3, wherein Calculate the passenger flow intensity of the same-platform transfer bus demand, which specifically includes the following steps: Determine the bus lines and transfer road segments that can perform the same-platform transfer for the selected bus line, and construct a set of transfer lines; Select the transfer lines that pass through the same road segments as the selected bus line from the set of transfer lines, and construct a set of transfer road segments; Select the first transfer road segment from the set of transfer road segments, and combine it with the selected bus line to construct the first preceeding road segment set and the first following road segment set. The first preceeding road segment set includes all road segments between the starting road segment of the bus line and the first transfer road segment, and the first following road segment set includes all road segments between the first transfer road segment and the ending road segment of the bus line; Based on the first transfer road segment, combine it with the transfer lines in the set of transfer lines to construct the second preceeding road segment set and the second following road segment set. The second preceeding road segment set includes all road segments between the starting road segment of the transfer line and the first transfer road segment, and the second following road segment set includes all road segments between the second transfer road segment and the ending road segment of the bus line; Select the first selected preceeding road segment and the second selected following road segment from the first preceeding road segment set and the second following road segment set respectively, form a selected road segment combination, determine whether the selected road segment combination is in the bus demand matrix, and obtain the first passenger demand; Allocate the passenger demand corresponding to the selected road segment combination to the corresponding first transfer road segment and transfer line. The passenger volume of all road segments within the first selected preceeding road segment and the passenger volume of all road segments within the second selected following road segment are increased by the first passenger demand to obtain the first selected preceeding road segment passenger volume set and the second selected following road segment passenger volume set; Obtain the maximum cross-sectional passenger capacity of the line corresponding to the first selected previous section and the second selected subsequent section. Obtain the maximum passenger flow section and the maximum passenger flow volume of the first selected previous section from the passenger volume set of the first selected previous section and the maximum passenger flow section and the maximum passenger flow volume of the second selected subsequent section from the passenger volume set of the second selected subsequent section. Compare the maximum passenger flow volume of the first selected previous section with the maximum cross-sectional passenger capacity of the line of the first selected previous section, and compare the maximum passenger flow volume of the second selected subsequent section with the maximum cross-sectional passenger capacity of the line of the second selected subsequent section. When the maximum passenger flow volume is less than the maximum cross-sectional passenger capacity of the line, the passenger flow intensity of the one-time same-platform transfer bus demand between the first selected previous section and the second selected subsequent section is the first passenger demand. When the maximum passenger flow volume is greater than the maximum cross-sectional passenger capacity of the line, the passenger flow intensity of the one-time same-platform transfer bus demand between the first selected previous section and the second selected subsequent section is the difference between the maximum cross-sectional passenger capacity of the line and the passenger volume of all sections within the first selected previous section, and the difference between the maximum cross-sectional passenger capacity of the line and the passenger volume of all sections within the second selected subsequent section; Repeat the above process for the first subsequent section set and the second subsequent section set, and calculate the passenger flow intensity of the corresponding one-time same-platform transfer bus demand.

8. A bus network optimization system based on reinforcement learning technology, characterized in that, Including the bus network optimization method based on reinforcement learning technology according to any one of claims 1-7.

9. An electronic device, characterized in that, Including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus; The memory is used to store a computer program; The processor, when executing the program stored on the memory, implements the steps of the bus network optimization method based on reinforcement learning technology according to any one of claims 1-7.

10. A storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by the processor, it implements the steps of the bus network optimization method based on reinforcement learning technology according to any one of claims 1-7.

Citation Information

Patent Citations

  • Visual analysis method and system for analyzing and planning bus routes

    CN111897868A

  • Urban bus microcirculation route calculation method based on travel big data

    CN115049122A