CN112149287A - Traffic simulation road network graphical segmentation method and system oriented to load balancing - Google Patents
Traffic simulation road network graphical segmentation method and system oriented to load balancing Download PDFInfo
- Publication number
- CN112149287A CN112149287A CN202010935292.3A CN202010935292A CN112149287A CN 112149287 A CN112149287 A CN 112149287A CN 202010935292 A CN202010935292 A CN 202010935292A CN 112149287 A CN112149287 A CN 112149287A
- Authority
- CN
- China
- Prior art keywords
- image
- gray
- simulation
- road network
- gray level
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000004088 simulation Methods 0.000 title claims abstract description 110
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000011218 segmentation Effects 0.000 title claims abstract description 35
- 238000004364 calculation method Methods 0.000 claims description 25
- 230000005484 gravity Effects 0.000 claims description 25
- 238000012545 processing Methods 0.000 claims description 13
- 238000006243 chemical reaction Methods 0.000 claims description 8
- 230000009466 transformation Effects 0.000 claims description 5
- 238000003709 image segmentation Methods 0.000 claims description 3
- 230000001131 transforming effect Effects 0.000 claims 1
- 230000001133 acceleration Effects 0.000 abstract description 7
- 238000007726 management method Methods 0.000 description 6
- 230000008878 coupling Effects 0.000 description 4
- 238000010168 coupling process Methods 0.000 description 4
- 238000005859 coupling reaction Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000013439 planning Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/10—Geometric CAD
- G06F30/18—Network design, e.g. design based on topological or interconnect aspects of utility systems, piping, heating ventilation air conditioning [HVAC] or cabling
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Geometry (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Traffic Control Systems (AREA)
Abstract
The invention discloses a traffic simulation road network graphical segmentation method and system for load balancing. According to the scheme, the simulation road network can be quickly divided, the parallel efficiency and the acceleration ratio can be effectively improved, and the load balance is realized.
Description
Technical Field
The invention relates to the technical field of intelligent traffic, in particular to a traffic simulation road network graphical segmentation method and system for load balancing.
Background
The microscopic simulation carries out virtual construction of real traffic through modeling of people, vehicles, roads and the like, realizes simulation of road network traffic, and provides a decision tool for traffic planning, management and control. Since the microscopic simulation of urban traffic needs to rapidly process a great number of drivers, vehicles, non-motor vehicles, pedestrians, traffic control schemes and the like, the parallel simulation of the microscopic traffic becomes a trend of traffic simulation development, and road network segmentation is a key technology of the parallel simulation of urban large-scale traffic road networks and is also a basis for realizing cluster computing load balancing.
Because the traffic network has strong coupling, the road network division oriented to load balancing is a challenging problem. The segmentation method of the traffic network has few research results, and the existing method mainly comprises a segmentation method based on area or road section length and an orthogonal recursion dichotomy. The area-based segmentation method equally divides the road network according to the area; the orthogonal recursion bisection method uses the intersection as a node to convert the topological graph, divides the converted topological graph, and repeatedly performs symmetrical division in the horizontal direction and the vertical direction.
Limitations of existing methods include: 1) the complexity of the conversion calculation of the topological graph by taking the intersection as the minimum unit is higher; 2) the weight of the segmentation method is determined based on the length of the road or the area of the region, and the number of vehicles on the road is not considered, so that the phenomenon of unbalanced load is easily caused.
In order to realize the large-scale urban traffic road network parallel simulation, adapt to the time-varying road network traffic flow condition and realize load balance, a rapid simulation road network segmentation method needs to be researched.
Disclosure of Invention
The invention aims to provide a traffic simulation road network graphical dividing method and system for load balancing, which not only provide a fast dividing method of a strong coupling road network, but also effectively improve the parallel efficiency and the acceleration ratio.
The purpose of the invention is realized by the following technical scheme:
a traffic simulation road network graphical segmentation method for load balancing comprises the following steps:
acquiring a simulation road network, a simulation period, the total quantity of CPUs of computing nodes and microscopic traffic simulation software corresponding to an actual traffic scene, and transmitting the microscopic traffic simulation software to each computing node;
carrying out gray level transformation on the simulated road network according to the simulated vehicles on each lane to form a gray level image of the simulated road network;
calculating the gravity center of the gray level image, performing recursive bisection on the gray level image according to the gravity center coordinate and the total quantity of the CPU of the calculation node to obtain sub-regions of a series of gray level images, and generating a corresponding topological graph according to the adjacent relation of the sub-regions of the gray level images;
and distributing the lanes contained in the gray image sub-region, the simulated vehicles on the lanes and the topological graph to the CPU of each computing node, starting the micro traffic simulation software by the CPU of each computing node and carrying out simulation by combining the distributed data until the simulation cycle is finished, and returning the simulation result.
A traffic simulation road network graphical segmentation system oriented to load balancing comprises:
the data reading module is used for acquiring a simulation road network, a simulation period, the total CPU quantity of the calculation nodes and microscopic traffic simulation software corresponding to the read actual traffic scene, and transmitting the microscopic traffic simulation software to each calculation node;
the simulation road network gray image conversion module is used for carrying out gray conversion on the simulation road network according to the simulation vehicles on each lane to form a gray image of the simulation road network;
the gray image segmentation module is used for calculating the gravity center of the gray image, performing recursive bisection on the gray image according to the gravity center coordinate and the total quantity of the CPUs of the calculation nodes to obtain sub-regions of a series of gray images, and generating a corresponding topological graph according to the adjacent relation of the sub-regions of the gray images;
and the task allocation module is used for allocating the lanes contained in the gray image sub-region, the simulated vehicles on the lanes and the topological graph to the CPU of each computing node, starting the micro traffic simulation software by the CPU of each computing node and simulating by combining the data obtained by allocation until the simulation cycle is finished and returning the simulation result.
The technical scheme provided by the invention can be seen that the moving vehicle information of the road network is considered, the method is suitable for parallel processing of dynamic traffic flow, further, the simulation road network is converted into the gray level image, the image processing method is introduced for segmentation of the simulation road network, the rapid segmentation of the strong coupling road network can be realized, and the simulation road network is converted into the gray level image based on the number of simulation vehicles, so that the processing load of each image subregion after segmentation is approximately the same, the parallel efficiency and the acceleration ratio are improved, and the load balance is realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a flowchart of a traffic simulation road network graphical segmentation method for load balancing according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a proximity relationship between two nodes in a topology diagram provided in an embodiment of the present invention;
fig. 3 is a parallel efficiency experiment result of the simulation road network segmentation method provided by the embodiment of the present invention;
FIG. 4 is an acceleration ratio experimental result of the simulation road network segmentation method provided by the embodiment of the present invention;
fig. 5 is a schematic diagram of a traffic simulation road network graphical segmentation system oriented to load balancing according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
The microscopic simulation of urban traffic is an effective analysis tool for traffic planning, design, management and control, can avoid risks and huge economic losses caused by direct implementation of various traffic design and control schemes, can realize virtual construction and intelligent analysis of large-scale urban road networks by parallel microscopic traffic simulation, and has a challenging problem of simulated road network segmentation with strong coupling. The invention provides a traffic simulation road network graphical segmentation method and system for load balancing, aiming at realizing load balancing of parallel processing of a large-scale simulation road network. Firstly, carrying out gray level transformation on a simulation road network according to simulation vehicles on each lane to form a gray level image of the simulation road network, then calculating the gravity center of the gray level image, carrying out recursive bisection on the gray level image according to the gravity center coordinate, and after the gray level image is divided, generating a topological graph of sub-regions according to the adjacent relation of the sub-regions of the divided image, thereby distributing simulation tasks to each computing node CPU for processing. According to the scheme, the simulation road network can be quickly divided, the parallel efficiency and the acceleration ratio can be effectively improved, and the load balance is realized.
As shown in fig. 1, a flowchart of a traffic simulation road network graphical segmentation method for load balancing according to an embodiment of the present invention mainly includes:
and 11, acquiring a simulation road network corresponding to the read actual traffic scene, a simulation period, the total CPU quantity of the calculation nodes and microscopic traffic simulation software, and transmitting the microscopic traffic simulation software to each calculation node.
In the embodiment of the invention, the method can use a Loongson big data all-in-one machine (a small server cluster) as a computing platform, and the Loongson big data all-in-one machine comprises a management node and five computing nodes. The management node is responsible for road network division and task allocation as an execution subject, and specific simulation processing work is executed by a CPU of each computing node.
The method comprises the steps of initializing, wherein after the management node initializes, a series of data is obtained, and the simulated road network obtained at the stage is an initial road network which does not contain simulated vehicle information; the microscopic traffic simulation software can be directly sent to each computing node, and the rest data information is used for road network segmentation; for example, the total number of CPUs of all the compute nodes may be set to P.
And 12, carrying out gray level conversion on the simulated road network according to the simulated vehicles on each lane to form a gray level image of the simulated road network.
In the step, firstly, initial respective position information of the simulated vehicles is obtained, so that each vehicle is drawn on a corresponding lane of the simulated road network; converting the simulation road network into a gray level image according to the number of vehicles in each lane, wherein the pixel value range of the gray level image is as follows: 0-255, wherein the gray level 0 represents the background, and the gray level of the lane is set according to the following formula:
wherein l represents the length of the lane, and k is the number of simulated vehicles on the lane.
And step 13, calculating the gravity center of the gray level image, performing recursive bisection on the gray level image according to the gravity center coordinate and the total number of the CPUs of the calculation nodes to obtain sub-regions of a series of gray level images, and generating a corresponding topological graph according to the adjacent relation of the sub-regions of the gray level images.
The preferred embodiment of this step is as follows:
the grayscale image size is recorded as M N, the image grayscale value at the grayscale image (x, y) position is recorded as h (x, y, the coordinates of the image center of gravityThe calculation formula is as follows:
by coordinates of center of gravity of the imageDividing the gray image into two parts vertically or horizontally to form two gray partsA degree image sub-region; the vertical or horizontal bisection is based on whether the areas of the two divided image subregions are close to each other, namely: if S (a)1v)/S(a2v)≥S(a1h)/S(a2h) Adopting horizontal division, otherwise adopting vertical division; where S denotes the area (i.e. the number of pixels contained in a sub-area of the image), a1vAnd a2vThe two gray scale image sub-regions are vertically divided;
a1h and a2h are two gray-scale image sub-regions divided horizontally.
The divided gray-scale image sub-regions are divided into two parts (namely, the gravity centers of the sub-regions are calculated → the vertical or horizontal division is carried out) until the total number of the divided gray-scale image sub-regions is equal to the total number P of the CPUs of the calculation nodes.
Furthermore, in order to realize interactive communication between the CPUs processing the adjacent image subregions, the management node simultaneously generates a topological graph taking the image subregions as nodes.
Coding (1, 2, …, q,) is carried out on each gray scale image subregion, q is the number of the divided image subregions, q is equal to P, the subregions of any two gray scale images do not overlap except the adjacent edge, and four vertex coordinates (x) of upper left, upper right, lower left and lower right of the subregions of each gray scale image are respectively determinedi1,yi1),(xi2,yi2),(x13,yi3),(xi4,yi4),i=1,2,…,q。
The sub-regions of the two gray level images have 1 or more than 1 vertex coordinates which are the same, and then the sub-regions of the two gray level images are determined to be adjacent; abstracting the sub-region of each gray level image into a vertex, and if the sub-regions of the two gray level images are adjacent, forming a connecting arc between the two corresponding vertices.
As shown in fig. 2, vertices 1 and 3 corresponding to two sub-regions of the grayscale image are connected by a connecting arc to indicate that there is an adjacent relationship between the two.
And step 14, distributing the lanes contained in the gray level image sub-regions, the simulated vehicles on the lanes and the topological graph to the CPU of each computing node, starting the micro traffic simulation software by the CPU of each computing node and simulating by combining the distributed data until the simulation cycle is finished, and returning the simulation result.
In the embodiment of the invention, the divided image sub-areas are taken as distribution units, the number of vehicles contained in the divided image sub-areas is basically equal, the image sub-areas are distributed to one CPU in a one-to-one mode, and the topological graph is used for processing the mutual communication of the CPUs of the adjacent sub-areas.
In the embodiment of the invention, the simulation calculation is mainly that the CPU of each computing node starts the micro traffic simulation software and combines the distributed data, and the position of each simulated vehicle at the next moment is calculated by executing the vehicle micro following model, the lane changing model and the signal timing module in the micro traffic simulation software.
And step 15, receiving the simulation result fed back by the CPU of the computing node, and waiting for the next task to be distributed.
And step 16, after the returned simulation result is synthesized, storing the simulation result into a local database for the user to inquire.
In order to verify the effectiveness of the simulation road network segmentation method, an area-based segmentation method (area classification), an orthogonal recursion segmentation method (recursion classification) and the method (our method) are respectively adopted for comparison, the simulation road network consists of 100 intersections, the number of simulation vehicles is 3.5 thousands, the evaluation indexes are the parallel efficiency and the acceleration ratio, and the experimental results are respectively shown in fig. 3-4.
The experimental result shows that compared with the existing simulation road network segmentation method, the method not only can realize the rapid division of the simulation road network, but also has good parallel efficiency and acceleration ratio.
Another embodiment of the present invention further provides a traffic simulation road network graphical segmentation system oriented to load balancing, where the system is mainly used to implement the method provided in the foregoing embodiment, as shown in fig. 5, the system mainly includes:
the data reading module is used for acquiring a simulation road network, a simulation period, the number of CPUs (central processing units) of the computing nodes and micro traffic simulation software corresponding to the read actual traffic scene, and transmitting the micro traffic simulation software to each computing node;
the simulation road network gray image conversion module is used for carrying out gray conversion on the simulation road network according to the simulation vehicles on each lane to form a gray image of the simulation road network;
the gray image segmentation module is used for calculating the gravity center of the gray image, performing recursive bisection on the gray image according to the gravity center coordinate and the total quantity of the CPUs of the calculation nodes to obtain sub-regions of a series of gray images, and generating a corresponding topological graph according to the adjacent relation of the sub-regions of the gray images;
and the task allocation module is used for allocating the lanes contained in the gray image sub-region, the simulated vehicles on the lanes and the topological graph to the CPU of each computing node, starting the micro traffic simulation software by the CPU of each computing node and simulating by combining the data obtained by allocation until the simulation cycle is finished and returning the simulation result.
In an embodiment of the present invention, the performing gray-scale transformation on the simulated road network according to the simulated vehicles on each lane to form a gray-scale image of the simulated road network includes:
acquiring initial respective position information of the simulated vehicles, and accordingly drawing each vehicle on a corresponding lane of the simulated road network;
converting the simulation road network into a gray level image according to the number of vehicles in each lane, wherein the pixel value range of the gray level image is as follows: 0-255, wherein the gray level 0 represents the background, and the gray level of the lane is set according to the following formula:
wherein l represents the length of the lane, and k is the number of simulated vehicles on the lane.
In the embodiment of the present invention, the calculating the gravity center of the grayscale image, and performing recursive bisection on the grayscale image according to the gravity center coordinate and the total number of CPUs of the calculation nodes includes:
the grayscale image size is recorded as M N, the image grayscale value at the grayscale image (x, y) position is recorded as h (x, y, the coordinates of the image center of gravityThe calculation formula is as follows:
by coordinates of center of gravity of the imageDividing the gray level image into two parts vertically or horizontally to form two gray level image sub-areas;
dividing the divided gray-scale image sub-areas into two parts continuously until the total number of the divided gray-scale image sub-areas is equal to the total number of CPUs (central processing units) of the calculation nodes;
the vertical or horizontal dichotomy is based on whether the areas of the two divided image subregions are close to each other, namely: if S (a)1v)/S(a2v)≥S(a1h)/S(a2h) Adopting horizontal division, otherwise adopting vertical division; wherein S represents an area, a1vAnd a2vThe two gray scale image sub-regions are vertically divided; a is1hAnd a2hThe two gray scale image sub-regions are divided horizontally.
In the embodiment of the present invention, the generating a corresponding topological graph according to the adjacent relation of the sub-regions of the grayscale image includes:
coding each gray level image subregion, wherein the subregions of any two gray level images are not overlapped except adjacent edges, and four vertex coordinates of the upper left vertex, the upper right vertex, the lower left vertex and the lower right vertex of each gray level image subregion are respectively determined;
the sub-regions of the two gray level images have 1 or more than 1 vertex coordinates which are the same, and then the sub-regions of the two gray level images are determined to be adjacent; abstracting the sub-region of each gray level image into a vertex, and if the sub-regions of the two gray level images are adjacent, forming a connecting arc between the two corresponding vertices.
In the embodiment of the invention, the CPU of each computing node starts the micro traffic simulation software and combines the distributed data to calculate the position of each simulated vehicle at the next moment by executing the vehicle micro following model, the lane changing model and the signal timing module in the micro traffic simulation software.
In the embodiment of the present invention, the system further includes: the simulation result receiving module is used for receiving the simulation result returned by the computing node; and the processing result comprehensive module is used for storing the returned simulation result to the local database.
Through the above description of the embodiments, it is clear to those skilled in the art that the above embodiments can be implemented by software, and can also be implemented by software plus a necessary general hardware platform. With this understanding, the technical solutions of the embodiments can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods according to the embodiments of the present invention.
It will be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the system is divided into different functional modules to perform all or part of the above described functions.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A traffic simulation road network graphical segmentation method oriented to load balancing is characterized by comprising the following steps:
acquiring a simulation road network, a simulation period, the total quantity of CPUs of computing nodes and microscopic traffic simulation software corresponding to an actual traffic scene, and transmitting the microscopic traffic simulation software to each computing node;
carrying out gray level transformation on the simulated road network according to the simulated vehicles on each lane to form a gray level image of the simulated road network;
calculating the gravity center of the gray level image, performing recursive bisection on the gray level image according to the gravity center coordinate and the total quantity of the CPU of the calculation node to obtain sub-regions of a series of gray level images, and generating a corresponding topological graph according to the adjacent relation of the sub-regions of the gray level images;
and distributing the lanes contained in the gray image sub-region, the simulated vehicles on the lanes and the topological graph to the CPU of each computing node, starting the micro traffic simulation software by the CPU of each computing node and carrying out simulation by combining the distributed data until the simulation cycle is finished, and returning the simulation result.
2. The method for graphically dividing the traffic simulation road network for load balancing according to claim 1, wherein the performing gray-scale transformation on the simulation road network according to the simulation vehicles on each lane to form a gray-scale image of the simulation road network comprises:
acquiring initial respective position information of the simulated vehicles, and accordingly drawing each vehicle on a corresponding lane of the simulated road network;
converting the simulation road network into a gray level image according to the number of vehicles in each lane, wherein the pixel value range of the gray level image is as follows: 0-255, wherein the gray level 0 represents the background, and the gray level of the lane is set according to the following formula:
wherein l represents the length of the lane, and k is the number of simulated vehicles on the lane.
3. The method as claimed in claim 1, wherein the calculating the gravity center of the gray image, and the recursively bisecting the gray image according to the gravity center coordinates and the total number of CPUs of the calculation nodes comprises:
the grayscale image size is recorded as M N, the grayscale value of the image at the grayscale image (x, y) position is recorded as h (x, y), and the coordinates of the image center of gravityThe calculation formula is as follows:
by coordinates of center of gravity of the imageDividing the gray level image into two parts vertically or horizontally to form two gray level image sub-areas;
dividing the divided gray-scale image sub-areas into two parts continuously until the total number of the divided gray-scale image sub-areas is equal to the total number of CPUs (central processing units) of the calculation nodes;
the vertical or horizontal dichotomy is based on whether the areas of the two divided image subregions are close to each other, namely: if S (a)1v)/S(a2v)≥S(a1h)/S(a2h) Adopting horizontal division, otherwise adopting vertical division; wherein S represents an area, a1vAnd a2vThe two gray scale image sub-regions are vertically divided; a is1hAnd a2hThe two gray scale image sub-regions are divided horizontally.
4. The method for graphically dividing the traffic simulation road network facing the load balancing according to claim 1, wherein the generating of the corresponding topological graph according to the adjacent relation of the sub-regions of the gray-scale image comprises:
coding each gray level image subregion, wherein the subregions of any two gray level images are not overlapped except adjacent edges, and four vertex coordinates of the upper left vertex, the upper right vertex, the lower left vertex and the lower right vertex of each gray level image subregion are respectively determined;
the sub-regions of the two gray level images have 1 or more than 1 vertex coordinates which are the same, and then the sub-regions of the two gray level images are determined to be adjacent; abstracting the sub-region of each gray level image into a vertex, and if the sub-regions of the two gray level images are adjacent, forming a connecting arc between the two corresponding vertices.
5. The traffic simulation road network graphical segmentation method oriented to load balancing according to claim 1, characterized in that a CPU of each computing node starts micro traffic simulation software and calculates the position of each simulated vehicle at the next moment by executing a vehicle micro following model, a road changing model and a signal timing module in the micro traffic simulation software in combination with the distributed data;
and after receiving the returned simulation result, storing the simulation result in a local database.
6. A traffic simulation road network graphical segmentation system oriented to load balancing is characterized by comprising the following components:
the data reading module is used for acquiring a simulation road network, a simulation period, the total CPU quantity of the calculation nodes and microscopic traffic simulation software corresponding to the read actual traffic scene, and transmitting the microscopic traffic simulation software to each calculation node;
the simulation road network gray image conversion module is used for carrying out gray conversion on the simulation road network according to the simulation vehicles on each lane to form a gray image of the simulation road network;
the gray image segmentation module is used for calculating the gravity center of the gray image, performing recursive bisection on the gray image according to the gravity center coordinate and the total quantity of the CPUs of the calculation nodes to obtain sub-regions of a series of gray images, and generating a corresponding topological graph according to the adjacent relation of the sub-regions of the gray images;
and the task allocation module is used for allocating the lanes contained in the gray image sub-region, the simulated vehicles on the lanes and the topological graph to the CPU of each computing node, starting the micro traffic simulation software by the CPU of each computing node and simulating by combining the data obtained by allocation until the simulation cycle is finished and returning the simulation result.
7. The traffic simulation road network graphical segmentation system for load balancing according to claim 6, wherein the gray-scale transforming the simulation road network according to the simulation vehicles on each lane to form the gray-scale image of the simulation road network comprises:
acquiring initial respective position information of the simulated vehicles, and accordingly drawing each vehicle on a corresponding lane of the simulated road network;
converting the simulation road network into a gray level image according to the number of vehicles in each lane, wherein the pixel value range of the gray level image is as follows: 0-255, wherein the gray level 0 represents the background, and the gray level of the lane is set according to the following formula:
wherein l represents the length of the lane, and k is the number of simulated vehicles on the lane.
8. The traffic simulation road network graphical segmentation system oriented to load balancing of claim 6, wherein the step of calculating the gravity center of the gray scale image, and the step of recursively bisecting the gray scale image according to the gravity center coordinates and the total number of CPUs of the calculation nodes comprises:
the grayscale image size is recorded as M N, the grayscale value of the image at the grayscale image (x, y) position is recorded as h (x, y), and the coordinates of the image center of gravityThe calculation formula is as follows:
by coordinates of center of gravity of the imageDividing the gray level image into two parts vertically or horizontally to form two gray level image sub-areas;
dividing the divided gray-scale image sub-areas into two parts continuously until the total number of the divided gray-scale image sub-areas is equal to the total number of CPUs (central processing units) of the calculation nodes;
the vertical or horizontal dichotomy is based on whether the areas of the two divided image subregions are close to each other, namely: if S (a)1v)/S(a2v)≥S(a1h)/S(a2h) Adopting horizontal division, otherwise adopting vertical division; wherein S represents an area, a1vAnd a2vThe two gray scale image sub-regions are vertically divided; a is1hAnd a2hThe two gray scale image sub-regions are divided horizontally.
9. The traffic simulation road network graphical segmentation system for load balancing according to claim 6, wherein the generating of the corresponding topological graph according to the adjacent relation of the sub-regions of the gray-scale image comprises:
coding each gray level image subregion, wherein the subregions of any two gray level images are not overlapped except adjacent edges, and four vertex coordinates of the upper left vertex, the upper right vertex, the lower left vertex and the lower right vertex of each gray level image subregion are respectively determined;
the sub-regions of the two gray level images have 1 or more than 1 vertex coordinates which are the same, and then the sub-regions of the two gray level images are determined to be adjacent; abstracting the sub-region of each gray level image into a vertex, and if the sub-regions of the two gray level images are adjacent, forming a connecting arc between the two corresponding vertices.
10. The traffic simulation road network graphical segmentation system oriented to load balancing according to claim 6, wherein a CPU of each computing node starts micro traffic simulation software and calculates the position of each simulated vehicle at the next moment by executing a vehicle micro following model, a road changing model and a signal timing module in the micro traffic simulation software in combination with data obtained by distribution;
meanwhile, the system further comprises: the simulation result receiving module is used for receiving the simulation result returned by the computing node; and the processing result comprehensive module is used for storing the returned simulation result to the local database.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010935292.3A CN112149287B (en) | 2020-09-08 | 2020-09-08 | Traffic simulation road network graphical segmentation method and system for load balancing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010935292.3A CN112149287B (en) | 2020-09-08 | 2020-09-08 | Traffic simulation road network graphical segmentation method and system for load balancing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112149287A true CN112149287A (en) | 2020-12-29 |
CN112149287B CN112149287B (en) | 2024-06-18 |
Family
ID=73890028
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010935292.3A Active CN112149287B (en) | 2020-09-08 | 2020-09-08 | Traffic simulation road network graphical segmentation method and system for load balancing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112149287B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112990271A (en) * | 2021-02-18 | 2021-06-18 | 北京大学 | Parallel traffic simulation method and system based on traffic cluster |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102542106A (en) * | 2011-12-27 | 2012-07-04 | 中国科学院自动化研究所 | Distributed traffic simulation system and simulation method based on variable region division |
CN103617626A (en) * | 2013-12-16 | 2014-03-05 | 武汉狮图空间信息技术有限公司 | Central processing unit (CPU) and ground power unit (GPU)-based remote-sensing image multi-scale heterogeneous parallel segmentation method |
CN105119837A (en) * | 2015-05-12 | 2015-12-02 | 电子科技大学 | Distributed traffic simulation load balancing algorithm based on simulation terminal configuration optimization |
CN106557611A (en) * | 2016-10-12 | 2017-04-05 | 电子科技大学 | The Dynamic Load-balancing Algorithm research of distributed traffic network simulation platform and application |
CN109522575A (en) * | 2017-09-20 | 2019-03-26 | 温州市鹿城区中津先进科技研究院 | Traffic network simulation system |
-
2020
- 2020-09-08 CN CN202010935292.3A patent/CN112149287B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102542106A (en) * | 2011-12-27 | 2012-07-04 | 中国科学院自动化研究所 | Distributed traffic simulation system and simulation method based on variable region division |
CN103617626A (en) * | 2013-12-16 | 2014-03-05 | 武汉狮图空间信息技术有限公司 | Central processing unit (CPU) and ground power unit (GPU)-based remote-sensing image multi-scale heterogeneous parallel segmentation method |
CN105119837A (en) * | 2015-05-12 | 2015-12-02 | 电子科技大学 | Distributed traffic simulation load balancing algorithm based on simulation terminal configuration optimization |
CN106557611A (en) * | 2016-10-12 | 2017-04-05 | 电子科技大学 | The Dynamic Load-balancing Algorithm research of distributed traffic network simulation platform and application |
CN109522575A (en) * | 2017-09-20 | 2019-03-26 | 温州市鹿城区中津先进科技研究院 | Traffic network simulation system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112990271A (en) * | 2021-02-18 | 2021-06-18 | 北京大学 | Parallel traffic simulation method and system based on traffic cluster |
CN112990271B (en) * | 2021-02-18 | 2022-07-08 | 北京大学 | Parallel traffic simulation method and system based on traffic cluster |
Also Published As
Publication number | Publication date |
---|---|
CN112149287B (en) | 2024-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102346795B (en) | Automatic quick wiring method for electric and electronic virtual experiments | |
JP2015530636A (en) | Particle flow simulation system and method | |
Barros et al. | City of Slums: self-organisation across scales | |
CN103778191B (en) | Vector contour line data partitioning method with space proximity relation considered | |
CN112632683A (en) | Digital twin city space positioning method and device based on illusion engine and storage medium | |
CN109269507A (en) | Robot path planning method and device | |
JP2023064082A (en) | Method of constructing three-dimensional map in high-definition map, apparatus, device, and storage medium | |
CN112149287B (en) | Traffic simulation road network graphical segmentation method and system for load balancing | |
CN104408773A (en) | Method for interpolating structured grid non-matching interface | |
CN108764510A (en) | Urban track traffic parallel artificial tasks decomposition method towards large-scale road network | |
Boim et al. | A machine-learning approach to urban design interventions in non-planned settlements | |
CN108595882B (en) | Yinyi planning pipeline BIM design pipeline cost generation system | |
CN105243137A (en) | Draft-based three-dimensional model retrieval viewpoint selection method | |
Chetan et al. | Accurate Differential Operators for Hybrid Neural Fields | |
CN108614889B (en) | Moving object continuous k nearest neighbor query method and system based on Gaussian mixture model | |
Vigueras et al. | A scalable architecture for crowd simulation: Implementing a parallel action server | |
Zeng et al. | Real-time traffic signal control with dynamic evolutionary computation | |
CN110110158A (en) | A kind of the memory space division methods and system of three-dimensional mesh data | |
CN114613159B (en) | Traffic signal lamp control method, device and equipment based on deep reinforcement learning | |
CN113361570B (en) | 3D human body posture estimation method based on joint data enhancement and network training model | |
Wei et al. | The design of intelligent household control system based on internet and GSM | |
CN101877142B (en) | Multi-scale level detail-based simulation method | |
Ikram et al. | Probabilistic Generative Modeling for Procedural Roundabout Generation for Developing Countries | |
CN115935684A (en) | Simulation road network rapid segmentation processing method and system for comprehensive calculation and communication cost | |
CN113989680A (en) | Automatic building three-dimensional scene construction method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |