A bus line network optimization method, device and equipment

By constructing a bus network diagram and OD matrix, using the cross-mutation processing of ant colony algorithm and genetic algorithm, and dynamically adjusting the importance factors, the problems of difficult parameter adjustment and local optimality in bus network optimization are solved, and efficient and accurate optimization of bus routes is achieved to meet the needs of urban bus operation.

CN120387565BActive Publication Date: 2025-10-17NORTHWEST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510882743.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-28
Publication Date
2025-10-17
Estimated Expiration
2045-06-28

AI Technical Summary

Technical Problem

The existing technology has problems in bus network optimization, such as difficulty in parameter adjustment, genetic algorithms easily falling into local optimal solutions, and inability to find the global optimal solution, resulting in low accuracy in bus route optimization and inability to meet the needs of urban bus operation.

Method used

By constructing a bus network diagram and OD matrix, using the ant colony algorithm to build the optimization objective function, and combining the crossover and mutation processing of the genetic algorithm, the importance factor is dynamically adjusted to optimize path selection, avoid local optimality, and improve the global search capability.

Benefits of technology

It has achieved efficient and accurate optimization of the bus network, improved the operating efficiency and applicability of bus routes, met the needs of efficient operation of urban buses, and improved the operating accuracy and applicability of the bus network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387565B_ABST
    Figure CN120387565B_ABST
Patent Text Reader

Abstract

The application discloses a bus line network optimization method, device and equipment, and relates to the technical field of traffic scheduling. A line network optimization model is constructed based on an ant colony algorithm, a bus line network diagram and an OD matrix are input into the line network optimization model for iteration until a preset iteration number is reached, and an optimal path is obtained; an optimization target module is used for defining an optimization target function of the line network optimization model, initializing ant colony parameters and an importance factor according to the bus line network diagram and the OD matrix; a path selection module is used for constructing a path selection strategy according to the ant colony parameters to select a path, and a first path is obtained; a crossover and mutation module is used for performing crossover and mutation processing on the first path after punishment processing, obtaining a second path, and evaluating the second path to determine a first optimized path. The method can dynamically adjust the line network optimization model, accelerate the convergence speed and improve the global search capability. The operation efficiency of the bus line network diagram is optimized, and the operation demand of urban buses is met.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of traffic scheduling, in particular to a bus line network optimization method, device and equipment. BACKGROUND

[0002] With the continuous acceleration of urbanization and the continuous growth of urban population, the urban public transportation system plays an important role in relieving traffic congestion and improving the efficiency of residents' travel. As the basis of the urban public transportation system, the optimization degree of the bus line network is directly related to the operation efficiency and service quality of the public transportation system. Therefore, the optimization algorithm of the public transportation system has also emerged as the times require.

[0003] Under this development background, in the optimization problem of the bus line network, the existing technology usually adopts the ant colony algorithm to construct the solution space in the actual problem, and to guide the search direction of the ants through the accumulation and volatilization of pheromone. In actual application, the performance of the ant colony algorithm is sensitive to parameter setting, and the adjustment of the parameters has a great influence on the performance of the algorithm, so there is a problem of difficult adjustment of parameters, which increases the processing cost.

[0004] In addition, the current optimization method of the bus line network also has a method of collecting mobile phone signaling data to determine the mobile phone point trajectory, and constructing an OD matrix based on this, combining it with the shortest path algorithm to generate a bus candidate line, and then using a genetic algorithm to select the optimal solution. Although it makes full use of the spatial distribution characteristics of spatiotemporal big data and the exploration ability of genetic algorithm in complex path space, it improves the efficiency in handling large-scale path optimization problems. However, the traditional genetic algorithm may converge to a local optimal solution too early, resulting in the inability to find a global optimal solution, making the optimization result prone to local optimization and lacking diversity of solutions. At the same time, it cannot guarantee the convergence speed and quality of the solution in a complex traffic network environment. SUMMARY

[0005] The embodiments of the present application provide a bus line network optimization method, device and equipment, which solve the problem of low precision of bus line optimization in the prior art and do not meet the demand of urban bus operation. By constructing a bus line network graph and an OD matrix, using an ant colony algorithm to construct an optimization objective function, using a path selection strategy to select a path that meets the constraints of the optimization objective function, and combining the cross variation processing of the genetic algorithm to dynamically adjust the importance factor, the optimal path is obtained. The ability to obtain a global optimal bus line network solution is improved, so that the optimal path, i.e. the optimized bus line, is more in line with the demand of efficient operation of urban buses, and the accuracy, applicability and efficiency of the operation of the bus line network are improved.

[0006] In a first aspect, the embodiments of the present application provide a bus line network optimization method, comprising: obtaining bus station data, bus GPS running data and passenger card swiping data; constructing a bus line network diagram according to the bus station data and the bus GPS running data; constructing an OD matrix according to the bus line network diagram and the passenger card swiping data; constructing a line network optimization model based on an ant colony algorithm, inputting the bus line network diagram and the OD matrix into the line network optimization model for iteration until a preset iteration number is reached, and obtaining an optimal path; wherein the line network optimization model comprises an optimization target module, a path selection module, a penalty module, a crossover and mutation module and an adjustment module; the optimization target module is configured to define an optimization objective function of the line network optimization model according to the bus line network diagram and the OD matrix, and initialize ant colony parameters and importance factors; the path selection module is configured to construct a path selection strategy according to the ant colony parameters to select a path, and obtain a first path; the penalty module is configured to perform penalty processing on the first path that meets a limit condition, to update pheromone on the first path; the crossover and mutation module is configured to perform crossover and mutation processing on the first path after the penalty processing, to obtain a second path, and evaluate the second path to determine a first optimized path; and the adjustment module is configured to adjust the importance factors of the first optimized path according to the iteration number until the preset iteration number is reached, to obtain the optimal path.

[0007] In a possible implementation, the bus line network diagram is constructed according to the bus station data and the bus GPS running data, comprising: determining bus station sequences and actual driving paths by one-to-one correspondence between the bus GPS running data and the bus station data; constructing nodes according to the bus station sequences; taking the actual driving paths between each bus station as edges; and constructing the bus line network diagram according to the nodes and the edges.

[0008] In a possible implementation, the OD matrix is constructed according to the bus line network diagram and the passenger card swiping data, comprising: determining card swiping location information by time matching the bus GPS running data and the passenger card swiping data; extracting geographical location information of each node in the bus line network diagram; performing spatial matching between the geographical location information and the card swiping location information to determine passenger boarding nodes; defining a distance function according to the geographical location information to construct passenger travel chains and determine passenger alighting nodes; and determining passenger flows between origin-destination points of each bus line according to the passenger boarding nodes and the passenger alighting nodes, to construct the OD matrix.

[0009] In a possible implementation, the method of defining the optimization objective function of the network optimization model and initializing the ant colony parameters and importance factors based on the bus network diagram and the OD matrix includes: determining constraints based on the bus network diagram and the OD matrix; wherein the method of defining the optimization objective function of the network optimization model and initializing the ant colony parameters and importance factors based on the bus network diagram and the OD matrix includes: determining constraints based on the bus network diagram and the OD matrix; wherein the constraints include node spacing, line length, and line non-linear coefficient; defining the optimization objective function based on the constraints; setting pheromones on each bus line, and based on the optimization objective function, using the starting point of each bus line in the bus network diagram as the initial position of the ant colony; setting the initial values ​​of the ant colony parameters and the initial values ​​and maximum values ​​of the importance factors; wherein the importance factors include the pheromone importance factor and the heuristic importance factor, and the ant colony parameters include the number of ants, pheromone concentration, pheromone volatility, and number of iterations; wherein the optimization objective function is as follows:

[0010] ;in,

[0011] ;

[0012] ;

[0013] ;

[0014] Where, represents the optimization objective function value of the wire mesh optimization model, Indicates the first bus routes, represents the set of bus routes in the bus network diagram, , Indicates the current node, represents the total number of nodes in the bus network graph, Indicates the first nodes, and ≠ , Indicates that from the current node To The direct passenger flow between nodes, Indicates the minimum length of the preset bus route. Indicates the The actual value of the bus line length, Indicates the maximum length of the preset bus route. They represent the non-linear coefficient of the current bus route and the preset maximum non-linear coefficient of the bus route. and They represent the minimum and maximum values ​​of the distance between two adjacent nodes in the bus route. Indicates the current node in the bus network diagram To the next node The node spacing, Indicates the first The straight-line distance between the starting point and the end point of a bus route.

[0015] In a possible implementation, constructing a path selection strategy based on the ant colony parameters to select a path and obtain a first path includes: iteratively executing a judgment step until the end point of the current bus route is traversed to obtain the first path; the judgment step is as follows: calculating the transition probability of the ants at the current node based on the ant colony parameters to determine the next node and obtain the first node; after obtaining the first node, randomly generating a probability value; if the probability value is less than a preset decision value, randomly exploring unvisited nodes to obtain a second node; if the probability value is greater than or equal to the preset decision value, calculating the transition probability of the first node and using its next node as the second node; determining whether the second node is the same as the end point of the current bus route; if the second node is different from the end point of the current bus route, executing the judgment step with the next node of the current second node as the first node; if the second node is the same as the end point of the current bus route, executing the judgment step with the current second node as the first node.

[0016] In one possible implementation, the penalty processing is performed on the first path that meets the restriction conditions to update the pheromones on the first path, including: the restriction conditions include: the wire network optimization model detects nodes that ants have walked through during the exploration of the first path; and / or, the first path does not meet the preset length; and / or, the first path does not meet the non-straight line coefficient constraint.

[0017] In one possible implementation, the crossover mutation processing is performed on the first path that has been penalized to obtain a second path, and the second path is evaluated to determine a first optimized path, including: selecting two bus lines with an intersection in the first path that has been penalized, and using the intersection as a common node; performing single-point crossover processing on the section between the common node and the end point of the current bus line to obtain an intersecting line; randomly replacing one node in the intersecting line with a preset node to obtain the second path; determining the optimization objective function value of the second path, and if it is better than the optimization objective function value of the first path that has been penalized, updating the pheromone on the second path to obtain the first optimized path; otherwise, using the first path that has been penalized as the first optimized path.

[0018] In one possible implementation, adjusting the importance factor of the first optimization path according to the number of iterations until a preset number of iterations is reached to obtain the optimal path includes dynamically adjusting the pheromone importance factor and the heuristic importance factor according to an adjustment formula to obtain the optimal path; wherein the adjustment formula is as follows:

[0019] ;

[0020] ;

[0021] Where, and Indicates the The pheromone importance factor and the heuristic importance factor at the iteration, and represent the initial value and maximum value of the pheromone importance factor, respectively. and denote the initial value and minimum value of the heuristic importance factor, respectively, and represents the control parameters, represents the number of iterations of the wire mesh optimization model, Represents a mathematical constant.

[0022] In a second aspect, the embodiments of the present application provide a bus line network optimization device, comprising: a data acquisition module configured to acquire bus station data, bus GPS operation data and passenger card swiping data; a line network construction module configured to construct a bus line network diagram according to the bus station data and the bus GPS operation data, and construct an OD matrix according to the bus line network diagram and the passenger card swiping data; a model construction module configured to construct a line network optimization model based on an ant colony algorithm, input the bus line network diagram and the OD matrix into the line network optimization model for iteration until a preset iteration number is reached, and obtain an optimal path; wherein the line network optimization model comprises an optimization target module, a path selection module, a penalty module, a crossover mutation module and an adjustment module; the optimization target module is configured to define an optimization objective function of the line network optimization model according to the bus line network diagram and the OD matrix, and initialize ant colony parameters and importance factors; the path selection module is configured to construct a path selection strategy according to the ant colony parameters to perform path selection and obtain a first path; the penalty module is configured to perform penalty processing on the first path that meets a limit condition, to update pheromone on the first path; the crossover mutation module is configured to perform crossover mutation processing on the first path that has been subjected to the penalty processing to obtain a second path, evaluate the second path, and determine a first optimized path; and the adjustment module is configured to adjust the importance factors of the first optimized path according to the iteration number until the preset iteration number is reached, to obtain the optimal path.

[0023] In a third aspect, the embodiments of the present application provide a device for executing a bus line network optimization method, the device comprising: a processor; a memory for storing processor executable instructions; and the processor executes the executable instructions to implement the method according to the first aspect or any possible implementation manner of the first aspect.

[0024] The one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0025] The bus line network optimization method, device and equipment provided by the embodiments of the present application can improve the utilization efficiency of bus line network data by constructing a bus line network graph and an OD matrix, and make the bus line network data more in line with actual passenger flow. A line network optimization model is constructed, an optimization objective function is defined, a path is selected based on a path selection strategy, the diversity of solutions is improved, and the problems of local optimization and prematureness of the line network optimization model are avoided. The parameters of the line network optimization model are dynamically adjusted by combining punishment processing and crossover mutation processing, and the optimization objective function is used as a guide for path evaluation to obtain an optimal path. The convergence speed of the line network optimization model is accelerated, the global search capability and the feasibility of solutions are improved, and the problem of low precision of bus line optimization and unsatisfied urban bus operation requirements in the prior art is effectively solved. The line network optimization model can be dynamically adjusted, the convergence speed and the global search capability are accelerated, the precision of the exploration path of the optimization objective function is improved, the operation efficiency of the bus line network is optimized, and the operation requirements of urban buses are better met, so the method has stronger universality. BRIEF DESCRIPTION OF DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0027] Figure 1 A flowchart of a bus line network optimization method provided by the embodiments of the present application is shown in FIG. 1.

[0028] Figure 2 A flowchart of a passenger boarding node identification method provided by the embodiments of the present application is shown in FIG. 2.

[0029] Figure 3 A flowchart of a passenger alighting node identification method provided by the embodiments of the present application is shown in FIG. 3.

[0030] Figure 4 A flowchart of a line network optimization model provided by the embodiments of the present application is shown in FIG. 4.

[0031] Figure 5 An experimental comparison diagram of bus line 268 provided by the embodiments of the present application is shown in FIG. 5.

[0032] Figure 6 An experimental comparison diagram of bus line 311 provided by the embodiments of the present application is shown in FIG. 6.

[0033] Figure 7 An experimental comparison diagram of bus line 600 provided by the embodiments of the present application is shown in FIG. 7.

[0034] Figure 8An experimental comparison chart of bus line 616 provided by the embodiment of the present application is shown in the following table.

[0035] Figure 9 An experimental comparison chart of bus line 734 provided by the embodiment of the present application is shown in the following table.

[0036] Figure 10 A structural schematic diagram of an optimization device of a bus line network provided by the embodiment of the present application is shown in the following table. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0038] The following describes some technologies related to the embodiments of the present application to help understanding, which should be considered only as exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Also, for clarity and conciseness, the description of some well-known functions and structures is omitted in the following description.

[0039] Figure 1 A flowchart of a bus line network optimization method provided by the embodiment of the present application is shown in the following table, which includes steps 101 to 111. Figure 1 The execution sequence shown in the embodiments of the present application is only one execution sequence, and does not represent the only execution sequence of the bus line network optimization method. As long as the final result can be achieved, Figure 1 The steps shown can be executed in parallel or in reverse, as follows.

[0040] Step 101: Obtain bus station data, GPS running data of buses and passenger card swiping data.

[0041] In the embodiments of the present application, the bus station data of bus lines, the GPS running data of buses and the passenger card swiping data are obtained from the traffic management department. The passenger card swiping data includes the ID (CARDID) of the bus IC card and the card swiping time (CREATETIME). The obtained data is preprocessed, which includes removing duplicate data, missing data and invalid data, performing data consistency check and processing abnormal data.

[0042] Step 102: According to the bus station data and the GPS running data of the bus, a bus line network diagram is constructed. The GPS running data of the bus is corresponded with the bus station data one by one, the bus station sequence and the actual driving path are determined. According to the bus station sequence, nodes are constructed; the actual driving path between each bus station is taken as an edge; and according to the nodes and the edges, the bus line network diagram is constructed.

[0043] Specifically, the GPS running data of the bus includes longitude and latitude, bus driving speed, bus ID and collection time. The bus station data includes station name, longitude and latitude, and bus line. According to the longitude and latitude, the GPS running data of the bus can be corresponded with the bus station data, the actual stop point of the bus vehicle is anchored, the driving direction of the bus, i.e. the bus station sequence and the actual driving path are determined. The GPS running data of the bus can obtain specific real-time information of the bus vehicle, the map matching algorithm such as hidden Markov model is used to convert the GPS running data of the bus into a geographic coordinate system (such as WGS84) so as to be matched with the bus station data, the GPS running data of the bus is mapped to the actual road, the accuracy of the station position can be verified, and the bus line network diagram containing the bus line, the station position and the connection relationship between the lines is generated.

[0044] Step 103: According to the bus line network diagram and the passenger card swiping data, an OD matrix is constructed.

[0045] The GPS running data of the bus and the passenger card swiping data are time-matched to determine the card swiping position information; the geographic position information of each node in the bus line network diagram is extracted; the geographic position information is spatially matched with the card swiping position information to determine the passenger boarding node; the distance function is defined according to the geographic position information to construct a passenger travel chain and determine the passenger alighting node.

[0046] In the embodiment of the present application, the bus line network diagram is used to describe the supply capacity of the bus line network system and the road connection relationship. Especially when the bus line is adjusted, the travel selection of the passenger may also change accordingly, and the geographic position information of the node, i.e. the bus station can be more accurately corresponded with the actual road. Figure 2 As shown in the figure, it is a flow chart of the passenger boarding node identification method. The GPS running data of the bus and the passenger card swiping data after preprocessing are time-matched to infer the position of the bus vehicle corresponding to the passenger card swiping time, so as to determine the current card swiping position information of the passenger. The unified time reference and the geographic coding method can be used to standardize the node coordinates.

[0047] Exemplarily, the UTC (Coordinated Universal Time) timestamp and the Geocoding (a kind of address standardization tool) can be used for time matching.

[0048] Specifically, based on bus node data, the geographic location of each node is extracted. A spatial matching algorithm is used to calculate the spatial distance between the card swipe location and the node's geographic location. The node closest to the node is selected as the passenger boarding node. A spatial matching algorithm such as the best-first search (BFS) algorithm is used.

[0049] like Figure 3 The figure shows a flow chart of the passenger alighting node identification method. For example, bus stop data and passenger card swiping data with passenger boarding node data are input, the distance between two adjacent nodes is calculated based on longitude and latitude, a distance function is defined, and a passenger travel chain is constructed.

[0050] The distance function is as follows:

[0051] ;

[0052] Where, represents the distance between two nodes in the bus network graph, and represent the sine function and cosine function respectively, and Respectively and The latitude and longitude of the node, and Represent any two nodes respectively.

[0053] In this embodiment of the application, a temporary list A is established to store all IC records with the same ID in table A. Since the last record in the IC record has no next adjacent node, the records in table A except the last record in each IC record are studied. The card swiping data of passengers who swipe the card more than twice in one day are selected and the current record is defined as the first record. Records. Iterate the card swiping process until the final passenger alighting node is determined. The card swiping process includes:

[0054] Judge the Check whether the record is the last passenger card swiping data of the day. If it is the last passenger card swiping data, match it with the passenger card swiping data record of the first trip of the day, that is, the corresponding bus route. If it is the same bus route, the first passenger card swiping data is defined as the passenger getting off node of the current record; if it is not the last passenger card swiping data, check the data with the first passenger card swiping data. The subsequent adjacent records ( If the bus routes recorded by the passenger card swiping data are the same, then the boarding node in the passenger card swiping data of the adjacent subsequent bus route is marked as the passenger getting off node of the current record; if the bus routes are the same as the first If the bus routes of the adjacent passenger card swiping data records are different, the first one is selected based on the preset space threshold. The boarding node of the record is the same as the current The node closest to the subsequent node of the boarding node is recorded as the passenger alighting node; until all passenger alighting nodes are determined.

[0055] The transfer step is determined based on the passenger's alighting node. If the time difference between the passenger's card swiping data between the passenger's alighting node and the next boarding node meets the preset time threshold, it is determined to be a transfer trip, and the invalid intermediate passenger card swiping data in the transfer process is deleted, and only the first If the time difference between the passenger card swiping data of the getting-off node and the next boarding node is not within the preset time threshold, it is determined to be an independent trip, and the first The alighting node of each record is set as the passenger alighting node that meets the spatial judgment requirements.

[0056] The preset time threshold is calculated by calculating the walking time required for the passenger to walk from the current node to the next boarding node corresponding to the card swiping data record, which can be 10 minutes. The boarding card swiping data records the time and place of getting off the bus The boarding time of each ride card swipe record is used to calculate the time the passenger spends transferring. The preset spatial threshold can be 1 kilometer.

[0057] Based on the passenger boarding and alighting nodes, we determine the passenger flow between the origin and destination of each bus route to construct an OD matrix. Table 1 shows the OD matrix results for some bus routes. The rows in the OD matrix represent the destinations, and the columns represent the origins.

[0058] For example, , indicating that the passenger flow from the 7th location to the 7th location is 110 people, that is, this is a closed travel chain, and the starting and ending points of the passengers are the same.

[0059] Table 1 OD matrix results of some bus routes

[0060]

[0061] Step 104: Build a network optimization model based on the ant colony algorithm, input the bus network diagram and the OD matrix into the network optimization model, and iterate until a preset number of iterations is reached. The network optimization model includes an optimization target module, a path selection module, a penalty module, a crossover mutation module, and an adjustment module.

[0062] like Figure 4The figure shows a flow chart of the wire mesh optimization model. This application obtains an optimized ant colony algorithm based on the ant colony algorithm and the genetic algorithm, and constructs a wire mesh optimization model based on the optimized ant colony algorithm.

[0063] Step 105: An optimization target module is used to define the optimization target function of the bus network optimization model according to the bus network diagram and the OD matrix, and initialize the ant colony parameters and importance factors.

[0064] According to the bus network diagram and OD matrix, the constraints are determined; the constraints include node spacing, line length and line non-linear coefficient.

[0065] Specifically, the straight-line distance between each node of the bus line is determined based on the distance function, and then the line non-linear coefficient is determined. The line length, line non-linear coefficient and the distance between stations are used as constraints to construct the line network optimization model.

[0066] Based on the constraints, define the optimization objective function. The optimization objective function is as follows:

[0067] ;in,

[0068] ;

[0069] ;

[0070] ;

[0071] Where, represents the optimization objective function value of the wire network optimization model, Indicates the first bus routes, represents the set of bus routes in the bus network diagram. , Indicates the current node, represents the total number of nodes in the bus network graph, Indicates the first nodes, and ≠ , Indicates that from the current node To The direct passenger flow between nodes, Indicates the minimum length of the preset bus route. Indicates the The actual value of the bus line length, Indicates the maximum length of the preset bus route. They represent the non-linear coefficient of the current bus route and the preset maximum non-linear coefficient of the bus route. and They represent the minimum and maximum values ​​of the distance between two adjacent nodes in the bus route. Indicates the current node in the bus network diagram To the next node The node spacing, Indicates the bus network diagram The straight-line distance between the starting point and the end point of a bus route.

[0072] For example, the preset The bus routes are designed to have a total length range of 15-25 kilometers, with the distance between adjacent nodes within the preset range of 1-3 kilometers. The default nonlinearity coefficient is no greater than 1.4. The objective of maximizing the optimization function is to find a bus route with the highest direct passenger flow, a low nonlinearity coefficient, and a length that falls within the constraints. This improves passenger flow and ultimately optimizes the entire bus network.

[0073] Pheromones are set on each bus line, and based on the optimization objective function, the starting point of each bus line in the bus network diagram is used as the initial position of the ant colony.

[0074] Set the initial values ​​of ant colony parameters and the initial and maximum values ​​of importance factors; among them, importance factors include pheromone importance factor and heuristic importance factor, and ant colony parameters include ant number, pheromone concentration, pheromone volatility and number of iterations.

[0075] For example, the number of ants is , represents the total number of nodes in the bus network graph, the pheromone concentration can be 1, the pheromone volatilization rate can be 20%-50%, and the number of iterations is 200.

[0076] In the embodiment of the present application, setting a certain amount of pheromone on the bus route can avoid the deviation caused by the large difference of pheromone in the subsequent selection. The pheromone set on each bus route is initialized according to the pheromone setting formula.

[0077] The pheromone setting formula is as follows:

[0078] ;

[0079] Where, Indicates that from the current node To The pheromone concentration between nodes, Represents a constant value, which can be 1. an optimization objective function value of the bus line network optimization model.

[0080] Step 106: a path selection module, configured to construct a path selection strategy according to the ant colony parameters to perform path selection and obtain a first path.

[0081] The judgment step is iteratively performed until the end point of the current bus line is reached to obtain the first path. The judgment step is as follows: based on the ant colony parameters, a transition probability of the ant at a current node is calculated to determine a next node to obtain a first node; after the first node is obtained, a probability value is randomly generated, and if the probability value is less than a preset decision value, a node that has not been visited is randomly explored to obtain a second node; if the probability value is greater than or equal to the preset decision value, a transition probability of the first node is calculated, and a next node of the second node is taken as the second node; it is judged whether the second node is the same as the end point of the current bus line; if the second node is not the same as the end point of the current bus line, a next node of the current second node is taken as the first node to perform the judgment step; and if the second node is the same as the end point of the current bus line, the current second node is taken as the first node to perform the judgment step.

[0082] Specifically, the total number of nodes of the bus line in the bus line network diagram is , which is represented as . The traditional bus line optimization usually uses the ant colony algorithm to perform path selection, but the pheromone of the ant colony algorithm is usually uniformly distributed, the path selection of the ant is close to random, and a large number of iterations are required to form a significant difference in pheromone concentration. Although the positive feedback mechanism can accelerate convergence, in a large-scale problem, the pheromone accumulation process is slow, resulting in low solving efficiency and slow convergence speed. According to the path selection strategy, the application can guide the selection of the path to accelerate the convergence speed and improve the global search ability.

[0083] The traditional heuristic information is usually defined as the reciprocal of the distance between two points, and the application adds multiple parameters to define the heuristic information. Specifically, the multiple parameters include direct passenger flow, line length, and line non-straight coefficient.

[0084] According to the ant colony parameters, a transition strategy is constructed, the transition probability of the ant is calculated through a transition formula, and a transition path is selected. Then a random strategy is constructed, the ant is guided to explore more different paths through a random formula, the problem of falling into a local optimal solution is avoided, and the possibility of finding a global optimal solution is improved.

[0085] The transition formula is specifically as follows:

[0086] ; wherein

[0087] ;

[0088] In the formula, Indicates the Only ants from the current node Departure transfer The transition probability of a node, Indicates the current node, represents a candidate node that has not been visited. Indicates the first nodes, represents the pheromone concentration, represents heuristic information, Indicates that from the current node To The pheromone concentration on the path between nodes, Indicates that from the current node To the candidate node that has not been visited The pheromone concentration on the path between Indicates that from the current node To Heuristic information of nodes, Indicates that from the current node To a candidate node that has not been visited Heuristic information, Represents the set of nodes that have been visited by the current ant, represents the pheromone importance factor, represents the heuristic importance factor, and represents the direct passenger flow from the next candidate node to the node that has been traveled and the direct passenger flow from the node that has been traveled to the next candidate node. Indicates the length of the route that the ant has traveled when it reaches the next candidate node. Indicates the non-linearity coefficient of the bus route currently traveled.

[0089] The random formula is as follows:

[0090] ;

[0091] Where, represents the second node decided by random strategy, Indicates the next node determined by the transfer strategy. represents a candidate node that has not been visited. Represents a random probability value, Indicates the probability of randomly selecting other nodes, which is a preset decision value and a fixed value of 0-1.

[0092] The pheromone concentration on the first path is updated based on the ant-based search result, i.e., the first path, to encourage the ant to subsequently explore other possible paths. In the random strategy, although the pheromone concentration and heuristic information are relied on in selecting a path, a certain randomness is introduced through a probability selection mechanism after the pheromone concentration and heuristic information are used to select the next node each time, and a preset decision value is used to determine whether the random strategy is used The judgment of whether to perform the random strategy can avoid the premature optimization of the ant colony algorithm.

[0093] Step 107: A punishment module is configured to perform punishment processing on the first path that meets a limit condition, so as to update the pheromone on the first path. The limit condition includes:

[0094] The line network optimization model detects the nodes that have been passed by the ant during the exploration of the first path; and / or,

[0095] The first path does not meet a preset length; and / or,

[0096] The first path does not meet a non-straight line coefficient constraint.

[0097] Specifically, the pheromone on the first path that meets the limit condition is updated. Since there may be some infeasible solutions in the first path determined according to the path selection strategy, the pheromone on the first path that does not meet the constraint condition is evaporated additionally as punishment processing. The preset length is 15-25 kilometers, and the non-straight line coefficient constraint is 1-1.4.

[0098] Step 108: A crossover and mutation module is configured to perform crossover and mutation processing on the first path that has been punished to obtain a second path, and to evaluate the second path to determine a first optimized path.

[0099] Two bus lines with intersection points are selected from the first path that has been punished, and the intersection points are taken as common nodes. Single-point crossover processing is performed on the road sections between the common nodes and the terminal points of the current bus lines to obtain intersection lines. A preset node is randomly replaced with a node in the intersection lines to obtain the second path.

[0100] Exemplarily, the first path that has been punished is processed by crossover and mutation based on a genetic algorithm. Two bus lines with intersection points that need to be optimized can be selected and The sequence of the stations of the bus line is defined as , and the sequence of the stations of the bus line is defined as .

[0101] An appropriate intersection point is selected on the two bus lines The cross processing is performed. Exemplarily, the cross point is and wherein, At the cross point , the single-point cross processing is performed. Specifically, it is represented as exchanging the road sections of the two bus routes after the cross point . For the bus route , the sequence of bus stops from the starting point to the cross point is kept unchanged, and the sequence of bus stops of the bus route from to the ending point is continued, i.e. . For the bus route , the sequence of bus stops from the starting point to the cross point is kept unchanged, and the sequence of bus stops of the bus route from to the ending point is continued, i.e. .

[0102] The new cross route is generated as follows:

[0103] ,

[0104] ;

[0105] A node in the new cross route is randomly selected, and the mutation processing is performed at the position of the node. Exemplarily, the node is replaced by an alternative node , which can be selected from the nodes in the bus network diagram except the starting and ending points, and the alternative node is adjacent to the node and , i.e. the distance between the alternative node and the node and is within 1 km, and the alternative node is connected to the node by an edge. Similarly, the mutation processing is performed on the new bus route to obtain a second path.

[0106] The optimization objective function value of the second path is determined, and if it is better than the optimization objective function value of the first path after the penalty processing, the pheromone on the second path is updated to obtain the first optimization path.

[0107] Specifically, the optimization objective function value of the second path after the cross mutation processing is calculated and evaluated. If it is better than the optimization objective function value of the first path after the penalty processing, the first path is replaced by the second path, and the pheromone concentration is updated to obtain the first optimization path; otherwise, the first path after the penalty processing is taken as the first optimization path.

[0108] Step 109: An adjustment module is used to adjust the importance factor of the first optimization path according to the number of iterations until a preset number of iterations is reached to obtain the optimal path.

[0109] The pheromone importance factor and the heuristic importance factor are dynamically adjusted according to the adjustment formula to obtain the optimal path.

[0110] The adjustment formula is as follows:

[0111] ;

[0112] ;

[0113] Where, and Indicates the The pheromone importance factor and heuristic importance factor at the iteration, and Represent the initial value and maximum value of the pheromone importance factor, and represent the initial value and minimum value of the heuristic importance factor, respectively. and represents the control parameters, represents the number of iterations of the network optimization model, Represents a mathematical constant.

[0114] in, and For control and Gradually approach the maximum and minimum values ​​of the preset importance factor, and make the iterative convergence change graph smoother, thereby improving the global search capability and convergence speed of the optimized ant colony algorithm. Based on the definition of the optimization objective function of the optimized ant colony algorithm, the update step is iteratively executed until the preset number of iterations is reached. The update step includes: updating the pheromone on the first optimization path, adjusting the pheromone importance factor and the heuristic factor. Determine whether the preset number of iterations has been reached. As the number of iterations increases, Gradually increase, Gradually decrease until reaching Minimum value. Dynamically adjust the formula at different stages of the ant colony algorithm optimization and , so that it can enhance the influence of pheromones in the early stage, increase exploration efforts, and find more possible solutions. In the later stage, it can strengthen development, weaken the influence of heuristic information, make full use of the existing first optimization path, and achieve a more effective balance between exploration and development.

[0115] Step 110: judging whether the preset iteration number is reached. If the preset iteration number is not reached, steps 106 to 109 are continuously executed until the preset iteration number is reached. The iteration number is 200 times.

[0116] Step 111: obtaining the optimal path. If the preset iteration number is reached, the iteration is ended, and the optimal path is obtained, that is, the optimized bus line network diagram is obtained.

[0117] In the embodiments of the present application, the effects of the optimized ant colony algorithm, the traditional ant colony algorithm and the genetic algorithm are verified by comparing the optimization objective function and the direct passenger flow. The ability of the optimized ant colony algorithm to meet the global optimal objective is evaluated. The direct passenger flow is a key evaluation index for bus line design, and is directly related to the travel experience of passengers and the effectiveness of bus lines. Optimizing passenger flow can significantly reduce the number of transfers and improve the travel experience and convenience of passengers.

[0118] The direct passenger flow is calculated as follows:

[0119] ;

[0120] In the formula, the direct passenger flow is represented by F, the total number of nodes in the bus line network diagram is represented by N, the current node is represented by i, the i th node in the bus line network diagram is represented by j, and the direct passenger flow from the current node i to the j th node is represented by F ij.

[0121] As shown in FIG. 6, the comparison diagram of the experiments on the bus line is obtained by comparing the optimization objective function of the optimized ant colony algorithm with the traditional ant colony algorithm and the genetic algorithm with the iteration number, and the experimental results of the convergence changes are obtained. Figures 5-9 In the figures, the horizontal coordinates all represent the iteration number, the vertical coordinates all represent the optimization objective function value of the line network optimization model, GA represents the genetic algorithm, ACO represents the traditional ant colony algorithm, and OURS-ACO represents the optimized ant colony algorithm in the present application. Figures 5-9

[0122] ​​​​​​​​​Exemplarily, five representative bus lines 268, 311, 600, 616 and 734 in Xi'an City are selected as experimental objects, the iteration number is set to 200 times, and the optimization is solved under the traditional ant colony algorithm and the optimized ant colony algorithm respectively, and the obtained results are systematically compared and analyzed. Compared with the traditional algorithm, the optimized ant colony algorithm can more quickly improve the optimization objective function value, and the optimization objective function value stably rises in the convergence process, showing better performance and consistency, and can continuously find better solutions, further verifying the effectiveness and practicality of the optimized ant colony algorithm in bus line network optimization. For each bus line, the optimal value, the worst value and the average value of the optimization objective function and the direct passenger flow in the results of 10 experiments are recorded respectively to evaluate the comprehensive performance of the optimized ant colony algorithm in global optimization ability and result stability. In addition, as shown in Table 2, the comparison result table of the objective function values of the optimized ant colony algorithm and other algorithms, and Table 3 is the comparison result table of the direct passenger flow of the optimized ant colony algorithm and other algorithms. In order to further quantify the advantages of the optimized ant colony algorithm, the average optimization result is calculated by using the promotion amplitude formula to intuitively reflect the optimization gain in the actual application scene.

[0123] Among them, the calculation of the promotion amplitude formula is as follows:

[0124] ;

[0125] In the formula, represents the promotion amplitude, represents the average value of the optimization objective function value of the optimized ant colony algorithm in this application, represents the average value of the objective function value of the genetic algorithm and the traditional ant colony algorithm compared.

[0126] Table 2 Comparison result table of objective function values of optimized ant colony algorithm and other algorithms

[0127]

[0128] Table 3 Comparison result table of direct passenger flow of optimized ant colony algorithm and other algorithms

[0129]

[0130] In Table 2, , and respectively represent the optimal value, the worst and the average of the objective function value of the genetic algorithm, the traditional ant colony algorithm and the optimization ant colony algorithm in the present application (the objective function value of the optimization ant colony algorithm is the optimization objective function value), GA represents the genetic algorithm, ACO represents the traditional ant colony algorithm, and OURS-ACO represents the optimization ant colony algorithm in the present application. As can be seen from Table 2, the optimization ant colony algorithm shows good performance in the overall objective function value, that is, the optimization ant colony algorithm converges to the global optimal solution more quickly in the optimization process of the complex line network, and effectively avoids falling into the local optimum. In addition, the experiment also shows that the optimization ant colony algorithm has strong robustness in processing traffic networks of different scales and types, further proving its wide applicability and advantages in practical applications.

[0131] In Table 3, 、 and respectively represent the direct passenger flow in the optimal case, the worst case and the average case. As can be seen from Table 3, in terms of direct passenger flow of the bus line, compared with the traditional ant colony algorithm and the genetic algorithm, although the optimization ant colony algorithm cannot always be superior to the above two algorithms in the optimal value and the worst value, from the average value of the overall performance, the optimization ant colony algorithm shows obvious advantages, and there is different degree of improvement in each bus line, which intuitively reflects that the optimization ant colony algorithm in the present application has significantly improved stability and overall performance, and has stronger adaptability in dealing with complex passenger flow.

[0132] Although the present application provides method operation steps as described in the embodiments or flowcharts, more or fewer operation steps can be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one of the many step execution orders, and does not represent the only execution order. When the device or client product is executed in practice, the method order shown in the embodiments or the drawings can be executed in sequence or in parallel (for example, in a parallel processor or multi-thread processing environment).

[0133] As shown in Figure 10 , the embodiment of the present application also provides a bus line network optimization device 1000. The device comprises a data acquisition module 1001, a line network construction module 1002, a model construction module 1003, an optimization target module 1004, a path selection module 1005, a penalty module 1006, a crossover mutation module 1007 and an adjustment module 1008, and the details are as follows.

[0134] The data acquisition module 1001 is used for acquiring bus station data, bus GPS operation data and passenger card data.

[0135] The line network construction module 1002 is configured to construct a bus line network diagram according to bus station data and GPS operation data of buses, and construct an OD matrix according to the bus line network diagram and passenger card swiping data.

[0136] The model construction module 1003 is configured to construct a line network optimization model based on an ant colony algorithm, input the bus line network diagram and the OD matrix into the line network optimization model for iteration until a preset iteration number is reached, and obtain an optimal path. The line network optimization model includes an optimization target module, a path selection module, a penalty module, a crossover and mutation module, and an adjustment module.

[0137] The optimization target module 1004 is configured to define an optimization objective function of the line network optimization model according to the bus line network diagram and the OD matrix, and initialize ant colony parameters and importance factors.

[0138] The path selection module 1005 is configured to construct a path selection strategy for path selection according to the ant colony parameters, and obtain a first path.

[0139] The penalty module 1006 is configured to perform penalty processing on the first path that meets a limit condition, to update pheromones on the first path.

[0140] The crossover and mutation module 1007 is configured to perform crossover and mutation processing on the first path that has been subjected to the penalty processing, to obtain a second path, and evaluate the second path to determine a first optimized path.

[0141] The adjustment module 1008 is configured to adjust the importance factors of the first optimized path according to the iteration number until a preset iteration number is reached, to obtain an optimal path.

[0142] Some of the modules in the apparatus described in the present application can be described in the general context of computer-executable instructions, such as program modules, which are executed by computers. Generally, program modules include routines, programs, objects, components, data structures, classes, and the like, which perform particular tasks or implement particular abstract data types. The present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.

[0143] The apparatus or modules described in the above application embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above apparatus is described as various modules respectively described in terms of functions. When implementing the application embodiments, the functions of the modules can be implemented in the same software and / or hardware or multiple software and / or hardware. Of course, the modules implementing certain functions can also be combined to be implemented by multiple sub-modules or sub-units.

[0144] The methods, devices or modules described in the present application can be implemented in a computer readable program code manner. The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer readable medium storing computer readable program code (for example, software or firmware) executable by the (micro)processor, logic gates, switches, application specific integrated circuits (ASIC), programmable logic controllers and embedded microcontrollers. Examples of the controller include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that, in addition to implementing the controller in a pure computer readable program code manner, the same function can also be implemented by logically programming the method steps in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded microcontrollers. Therefore, such a controller can be considered as a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.

[0145] The embodiments of the present application also provide a device for executing the optimization method of the bus line network, the device comprising: a processor; a memory for storing processor executable instructions; and the processor executes the executable instructions to implement the method as described in the embodiments of the present application.

[0146] The embodiments of the present application also provide a non-volatile computer readable storage medium having stored thereon a computer program or instructions, which when executed, cause the method as described in the embodiments of the present application to be implemented.

[0147] In addition, the functional modules in each of the embodiments of the present application can be integrated in one processing module, or each module can exist independently, or two or more modules can be integrated in one module.

[0148] The storage medium described above includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD), or a memory card. The storage medium can be used to store computer program instructions.

[0149] From the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and the necessary hardware. Based on such an understanding, the technical solutions of the present application can be embodied in the form of a software product or can be embodied in the form of data migration during implementation. The computer software product can be stored in a storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0150] The various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. The whole or part of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, mobile communication terminals, multi-processor systems, microprocessor-based systems, programmable electronic devices, network PCs, small computers, large computers, distributed computing environments including any of the above systems or devices, etc.

[0151] The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the present application.

Claims

1. A method for optimizing a bus network, characterized in that: include: Obtain bus stop data, bus GPS operation data and passenger card swiping data; Constructing a bus network map based on the bus stop data and the bus GPS operation data; Constructing an OD matrix based on the bus network map and the passenger card swiping data; A network optimization model is constructed based on an ant colony algorithm, and the bus network diagram and the OD matrix are input into the network optimization model for iteration until a preset number of iterations is reached to obtain an optimal path; wherein the network optimization model includes an optimization target module, a path selection module, a penalty module, a crossover mutation module, and an adjustment module; The optimization objective module is used to define the optimization objective function of the bus network optimization model based on the bus network diagram and the OD matrix, and initialize the ant colony parameters and importance factors, including: determining constraints based on the bus network diagram and the OD matrix; wherein the constraints include node spacing, line length, and line non-linear coefficient; defining the optimization objective function based on the constraints; setting pheromones on each bus line, and based on the optimization objective function, using the starting point of each bus line in the bus network diagram as the initial position of the ant colony; setting the initial values ​​of the ant colony parameters and the initial values ​​and maximum values ​​of the importance factors; wherein the importance factors include the pheromone importance factor and the heuristic importance factor, and the ant colony parameters include the number of ants, pheromone concentration, pheromone volatility, and number of iterations; wherein the optimization objective function is as follows: ;in, ; ; ; Wherein, F represents the optimization objective function value of the bus network optimization model, r represents the rth bus line in the bus network diagram, and R represents the number of bus lines in the bus network diagram. , i represents the current node, n represents the total number of nodes in the bus network graph, j represents the jth node in the bus network graph, and i≠j, represents the direct passenger flow from the current node i to the jth node, Indicates the minimum length of the preset bus route. represents the actual value of the length of the r-th bus line, Indicates the maximum length of the preset bus route. and They represent the non-linear coefficient of the current bus route and the preset maximum non-linear coefficient of the bus route. and They represent the minimum and maximum values ​​of the distance between two adjacent nodes in the bus route. represents the node distance from the current node i to the next node i+1 in the bus network graph, represents the straight-line distance between the starting point and the end point of the rth bus line in the bus network diagram; The path selection module is configured to construct a path selection strategy according to the ant colony parameters to perform path selection and obtain a first path; The penalty module is configured to perform penalty processing on the first path that meets the restriction condition, so as to update the pheromone on the first path; The crossover mutation module is configured to perform a crossover mutation process on the first path that has been subjected to the penalty process to obtain a second path, and to evaluate the second path to determine a first optimized path; The adjustment module is configured to adjust the importance factor of the first optimization path according to the number of iterations until a preset number of iterations is reached to obtain the optimal path, including dynamically adjusting the pheromone importance factor and the heuristic importance factor according to an adjustment formula to obtain the optimal path; wherein the adjustment formula is as follows: ; ; Where, and represents the pheromone importance factor and the heuristic importance factor at the t-th iteration, and represent the initial value and maximum value of the pheromone importance factor, respectively. and denote the initial value and minimum value of the heuristic importance factor, respectively, and represents a control parameter, t represents the number of iterations of the wire mesh optimization model, and e represents a mathematical constant.

2. The method according to claim 1, characterized in that The method of constructing a bus network map based on the bus stop data and the GPS operation data of the bus includes: Match the GPS operation data of the bus with the bus stop data one by one to determine the bus stop sequence and the actual driving path; Constructing nodes according to the bus stop sequence; The actual travel path between each bus stop is used as an edge; The bus network graph is constructed based on the nodes and edges.

3. The method according to claim 2, characterized in that The step of constructing an OD matrix based on the bus network diagram and the passenger card swiping data includes: Time-matching the GPS operation data of the bus with the passenger card swiping data to determine the card swiping location information; Extracting geographic location information of each node in the bus network diagram; Spatially matching the geographic location information with the card swiping location information to determine the passenger boarding node; Defining a distance function based on the geographic location information, constructing a passenger travel chain, and determining a passenger alighting node; The passenger flow between the starting and ending points of each bus line is determined based on the passenger boarding nodes and the passenger alighting nodes to construct the OD matrix.

4. The method according to claim 2, characterized in that The step of constructing a path selection strategy according to the ant colony parameters to select a path and obtain a first path includes: Iteratively executing the judgment step until the end point of the current bus route is reached, and the first path is obtained; The judgment steps are as follows: Calculating the ant's transfer probability at the current node based on the ant colony parameters to determine the next node and obtain the first node; After obtaining the first node, randomly generate a probability value. If the probability value is less than a preset decision value, randomly explore unvisited nodes to obtain a second node. If the probability value is greater than or equal to the preset decision value, calculate the transition probability of the first node and use the next node as the second node. Determining whether the second node is the same as the end point of the current bus route where the second node is located; If the second node is different from the end point of the current bus route, the determination step is performed using the next node of the current second node as the first node; If the second node is the same as the end point of the current bus line, the current second node is used as the first node to perform the judgment step.

5. The method according to claim 1, wherein The step of performing penalty processing on the first path that meets the restriction condition to update the pheromone on the first path includes: The restrictions include: The line network optimization model detects nodes that have been walked by ants during the process of exploring the first path; and / or, The first path does not meet the preset length; and / or, The first path does not meet the non-linear coefficient constraint.

6. The method according to claim 1, characterized in that The step of performing crossover mutation processing on the first path that has been subjected to penalty processing to obtain a second path, and evaluating the second path to determine a first optimized path includes: Selecting two bus routes with an intersection in the first path that has been penalized, and using the intersection as a common node; Performing single-point intersection processing on the section between the common node and the end point of the current bus route to obtain an intersection route; randomly replacing one node in the cross-link with a preset node to obtain the second path; Determine the optimization objective function value of the second path; if it is better than the optimization objective function value of the first path after the penalty processing, update the pheromone on the second path to obtain the first optimized path; otherwise, use the first path after the penalty processing as the first optimized path.

7. A bus network optimization device, characterized in that: include: Data acquisition module, used to obtain bus stop data, bus GPS operation data and passenger card swiping data; A bus network construction module is used to construct a bus network map based on the bus stop data and the GPS operation data of the bus; Constructing an OD matrix based on the bus network map and the passenger card swiping data; a model building module, configured to build a network optimization model based on an ant colony algorithm, input the bus network diagram and the OD matrix into the network optimization model, iterate until a preset number of iterations is reached, and obtain an optimal path; wherein the network optimization model includes an optimization target module, a path selection module, a penalty module, a crossover mutation module, and an adjustment module; The optimization target module is used to define the optimization objective function of the bus network optimization model according to the bus network diagram and the OD matrix, and initialize the ant colony parameters and importance factors, including: determining the constraint conditions according to the bus network diagram and the OD matrix; wherein the constraint conditions include node spacing, line length and line non-linear coefficient; defining the optimization objective function based on the constraint conditions; setting pheromones on each bus line, and based on the optimization objective function, using the starting point of each bus line in the bus network diagram as the initial position of the ant colony; setting the initial value of the ant colony parameter and the initial value and maximum value of the importance factor; wherein the importance factor includes the pheromone importance factor and the heuristic importance factor, and the ant colony parameters include the number of ants, pheromone concentration, pheromone volatility and number of iterations; wherein the optimization objective function is as follows: ;in, ; ; ; Wherein, F represents the optimization objective function value of the bus network optimization model, r represents the rth bus line in the bus network diagram, and R represents the number of bus lines in the bus network diagram. , i represents the current node, n represents the total number of nodes in the bus network graph, j represents the jth node in the bus network graph, and i≠j, represents the direct passenger flow from the current node i to the jth node, Indicates the minimum length of the preset bus route. represents the actual value of the length of the r-th bus line, Indicates the maximum length of the preset bus route. and They represent the non-linear coefficient of the current bus route and the preset maximum non-linear coefficient of the bus route. and They represent the minimum and maximum values ​​of the distance between two adjacent nodes in the bus route. represents the node distance from the current node i to the next node i+1 in the bus network graph, represents the straight-line distance between the starting point and the end point of the rth bus line in the bus network diagram; A path selection module, configured to construct a path selection strategy according to the ant colony parameters to perform path selection and obtain a first path; a penalty module, configured to perform penalty processing on the first path that meets the restriction condition, so as to update the pheromone on the first path; a crossover mutation module, configured to perform a crossover mutation process on the first path that has been subjected to the penalty process to obtain a second path, and to evaluate the second path to determine a first optimized path; An adjustment module is configured to adjust the importance factor of the first optimization path according to the number of iterations until a preset number of iterations is reached to obtain the optimal path, comprising: dynamically adjusting the pheromone importance factor and the heuristic importance factor according to an adjustment formula to obtain the optimal path; wherein the adjustment formula is as follows: ; ; Where, and represents the pheromone importance factor and the heuristic importance factor at the t-th iteration, and represent the initial value and maximum value of the pheromone importance factor, respectively. and denote the initial value and minimum value of the heuristic importance factor, respectively, and represents a control parameter, t represents the number of iterations of the wire mesh optimization model, and e represents a mathematical constant.

8. A device for executing a method for optimizing a bus network, characterized in that: include: processor; a memory for storing processor-executable instructions; When the processor executes the executable instructions, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Urban public transport network optimization research method based on complex network theory

    CN114117700A

  • Dangerous goods transportation path planning method based on improved ant colony algorithm

    CN117313967A