Disclosure of Invention
The invention provides a single intersection signal lamp optimal timing implementation method, a control device, electronic equipment and a storage medium based on a SUMO analysis model to make up the defects of the prior art, wherein SUMO is named as Simulation of Urban Mobility, which is open-source, microscopic and multi-modal traffic Simulation and allows the Simulation of how a given traffic demand consisting of a single vehicle moves in a given road network. According to the technical scheme, the SUMO analysis model is deployed, the optimal timing scheme of the signal lamps at the single intersection is researched, and the global optimal timing solution in a signal period is calculated in real time according to the real-time traffic flow, the real-time queuing length and the specific parameter information of vehicles.
The embodiment of the invention is realized by the following steps:
in a first aspect, an embodiment of the present invention provides a method for implementing optimal timing of a signal lamp at a single intersection based on an SUMO analysis model, which is applied to a server, and the method includes the following steps:
calculating data of the whole traffic flow in a signal period, and establishing a single intersection SUMO analysis model; collecting data of the position and the speed of a vehicle on a lane, substituting the data into a vehicle following model, and calculating by using a simulated annealing algorithm to obtain an optimal timing solution of a single intersection; collecting traffic flow data among intersections, substituting the traffic flow data into an SUMO analysis model to carry out real-time signal periodic timing, and dynamically modifying and adjusting an optimal timing solution of a single intersection; establishing a fixed timing scheme and comparing; judging whether the number of waiting vehicles in the whole analog signal period can be reduced or not; if so, carrying out quantitative analysis to obtain a global optimal timing solution, otherwise, readjusting the model parameters.
Further, if the vehicle has a behavior of turning left and right, even if the traffic flow of the left and right turns is determined, the traveling direction of each vehicle in the current queued vehicle cannot be estimated, and in reality, the vehicle does not wait for the signal light to turn green strictly according to the direction of each lane, so the currently established SUMO analysis model is only a model of a straight-going vehicle at a single intersection in the intersection.
Further, according to the complexity of the road condition, the SUMO analysis model is not limited to a straight-going vehicle model at an intersection, and may be a turning or turning vehicle at an irregular and multidirectional intersection, such as a T-shaped intersection, a Y-shaped intersection, and an □ -shaped intersection.
Further, a vehicle following model of the vehicle advancing behaviors of the whole four-direction lane is established; analyzing acceleration, deceleration and sensitivity coefficients of a driver of the vehicle and following behavior data when the vehicle is close to each other; three motion forms of a vehicle waiting to pass, passing and entering a lane in the next signal period are mathematically modeled; and finally, establishing an objective function, and calculating the number of vehicles which pass through the intersection starting white line and the opposite ending white line successfully every second in one signal period.
In a second aspect, an embodiment of the present invention further provides an SUMO analysis model for realizing optimal timing of signal lamps at a single intersection, where the model deployment method includes:
establishing two arrays of list1 and list2, respectively representing the distance and the speed of the vehicle in the current lane from the initial white line of the signal lamp intersection, and then respectively analyzing the influence change conditions of three motion models of the vehicle per second on the list1 and the list 2: the first motion model is a waiting vehicle waiting for a signal lamp to turn green, the judgment standard of the SUMO analysis model is a vehicle with the speed less than 0.1m/s, the acceleration of the first vehicle is assumed to be uniform acceleration motion, the second vehicle is set with a delay time which is generally 1s, then the uniform acceleration motion is started, and the subsequent vehicles all start the uniform acceleration motion after delaying a fixed delay time; the second motion model is a vehicle which still flies on the lane at the moment when the signal lamp changes into green, namely the vehicle with the speed more than 0.1m/s, the motion model needs to estimate the approximate time of the vehicle from entering the lane to the current position, supposing that the time of the vehicle entering the lane is uniformly distributed according to the same time, the position and the speed of the current vehicle on the lane are calculated by using the following model, and the position and the speed information are respectively added into the list1 and the list2 for storage; the third motion model is vehicles that enter the lane after the signal lights turn green, and the vehicles are similar to the second motion model in calculation law, simulate the position and speed of the vehicle in the lane, and are different in that the initial position is the farthest point arranged in the lane. By comprehensively analyzing the three motion models of the vehicle per second and the motion conditions of the vehicles flowing into the lane in four directions, the SUMO analysis model can be established for simulation. And finally, establishing an objective function, namely taking the maximum value of the number of the vehicles passing through the signal lamp intersection in one signal period.
In a third aspect, an embodiment of the present invention further provides a single intersection signal lamp optimal timing control device based on an SUMO analysis model, which is applied to a server, and the device includes the following structure:
the traffic state perception module: collecting traffic flow data on each lane of each intersection, and the position and the speed of a vehicle on the lane;
a model construction and analysis module: according to the position and speed data of the vehicle on the lane, a vehicle following model and three motion models of the vehicle advancing behaviors of the lanes in four directions are established, data in one signal period of the whole traffic flow are calculated, a single intersection SUMO analysis model is established, the number of the vehicles passing through the intersection is calculated, and finally an objective function is established;
the single intersection optimization control module: substituting the data of the position and the speed of the vehicle on the lane into a vehicle following model to calculate by using a simulated annealing algorithm, establishing an objective function, calculating the number of vehicles which pass through an intersection initial white line every second and successfully pass through the intersection termination white line in a signal period, and obtaining an optimal timing solution of a single intersection; the inter-intersection coordination control module: collecting traffic flow data among intersections, substituting the traffic flow data into an SUMO analysis model to perform real-time signal periodic timing, dynamically modifying and adjusting an optimal timing solution of a single intersection, establishing a fixed timing scheme and comparing;
a timing scheme output module: judging whether the number of waiting vehicles in the whole analog signal period can be reduced or not, quantitatively analyzing and outputting a global optimal timing solution, and acting on a controlled traffic flow through a signal lamp;
and (3) controlled traffic flow: is the final regulation object of the control system.
Further, the model build and analysis module further includes a model simulator and a computation submodule.
In a fourth aspect, an embodiment of the present invention further provides an electronic device, including: the memory is connected with the processor, the memory is used for storing program code instructions, and the processor is used for calling the program code instructions stored in the memory and executing the method provided by the embodiment of the first and second aspects according to the obtained program.
In a fifth aspect, embodiments of the present invention also provide a storage medium storing program code instructions executable by a processor, where the storage medium includes a plurality of program code instructions configured to cause the processor to execute the method provided in the first and second aspects.
Compared with the prior art, the single intersection signal lamp optimal timing implementation method based on the SUMO analysis model, the control device, the electronic equipment and the storage medium provided by the embodiment of the invention have the following advantages: the key technology of the invention is to carry out overall mathematical modeling on the vehicle flow, and whether the mathematical modeling is accurate or not directly influences the final effect. The modeling process adopts a real-time analysis method, and the speed and position condition of each vehicle per second is more accurately calculated, so that a better simulation effect is achieved, a global optimal timing solution in a signal period is calculated in real time, traffic flow is effectively guided, traffic load is balanced, and traffic efficiency of a road network is improved.
Detailed Description
The above description is only an overview of the technical solutions of the present invention, and the present invention can be implemented by looking up the content of the description in order to make the technical means of the present invention more clearly understood, and the following detailed description of the present invention is made in order to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Example one
Referring to fig. 1, the method for implementing optimal timing of a signal intersection signal based on the SUMO analysis model provided in this embodiment is only used for explaining the present invention, and is not used for limiting the scope of the present invention. The method comprises the following concrete steps:
s1, calculating data of the whole traffic flow in a signal period, and establishing a single intersection SUMO analysis model;
s2, collecting data of the position and the speed of the vehicle on the lane, substituting the data into a vehicle following model, and calculating by using a simulated annealing algorithm to obtain an optimal timing solution of the single intersection;
s3, collecting traffic flow data among intersections, substituting the traffic flow data into the SUMO analysis model to perform real-time signal periodic timing, and dynamically modifying and adjusting the optimal timing solution of a single intersection;
s4, establishing a fixed timing scheme and comparing;
s5, judging whether the number of waiting vehicles in the whole analog signal period can be reduced or not;
and S6, if yes, carrying out quantitative analysis to obtain a global optimal timing solution, otherwise, readjusting the model parameters.
Wherein, the single junction SUMO analysis model in S1 means: if the vehicle has left-right turning behavior, even if the traffic flow of left-right turning is determined, the traveling direction of each vehicle in the current queued vehicles cannot be estimated, and in reality, the vehicle cannot strictly wait for the signal lamp to turn green according to the direction of each lane, so the currently established SUMO analysis model is only a model of a straight-going vehicle at a single intersection in the intersection.
According to the complexity of road conditions, the SUMO analysis model is not limited to a straight-going vehicle model of an intersection, and can also be a turning vehicle or a turning vehicle of irregular and multidirectional road junctions such as a T-shaped intersection, a Y-shaped intersection, an □ -shaped intersection and the like.
Wherein the S2 further comprises the steps of:
s2.1, establishing a vehicle following model of vehicle advancing behaviors of lanes in four directions;
s2.2, analyzing the acceleration and deceleration of the vehicle, the sensitivity coefficient of a driver and the following behavior data when the vehicle is close to each other;
s2.3, carrying out mathematical modeling on three motion forms of the vehicle waiting to pass through, passing through and entering the lane in the next signal period;
and S2.4, establishing an objective function, and calculating the number of vehicles which pass through the intersection starting white line and successfully pass through the intersection ending white line per second in a signal period.
The vehicle following model deployment method in S2.1 comprises the following steps:
the following model describes the behavior of the vehicle during the course of following the preceding vehicle, and is described by differential equations at first. The meaning is as follows: the driver of the following vehicle determines the acceleration of the driver by using physical quantities such as the distance from the preceding vehicle and the relative speed that can be directly observed. The following model formula is as follows:
in the formula, the first and second sets of data are represented,
acceleration of the (n + 1) th vehicle, T delay time, and λ response coefficient (sensitivity coefficient) of the driver to the stimulus.
After the acceleration and the deceleration of the vehicle are quantitatively analyzed, a following model formula is further optimized:
the signal lamp queuing length is the vehicle queuing length after the last signal lamp plus the vehicle entering speed plus the signal lamp time-the vehicle passing average speed plus the signal lamp time in a formula, the vehicle entering speed refers to the speed when the vehicle enters the queuing queue from the back, the vehicle passing average speed refers to the average speed when the vehicle passes through the initial white line of the intersection, and the moving process of the vehicle between the initial white line and the termination white line of the intersection is ignored.
For the calculation of each speed and time of the vehicle, parameters such as acceleration, deceleration, vehicle distance, sensitivity coefficient of a driver and the like of the vehicle are added, so that the calculated data are more fit for the experimental effect and the real road condition is simulated.
Wherein, the purpose of further optimizing the following model formula is as follows: the number of vehicles passing in each direction is maximized in the average unit time.
The method described in this embodiment is a demodulation method applied to the electronic device 200 described in the fourth embodiment.
Example two
Referring to fig. 2, the example provided for the deployment method of the SUMO analysis model for realizing optimal timing of signal lights at a single intersection is only for explaining the present invention, and is not used for limiting the scope of the present invention. The specific implementation steps and program codes are as follows:
s1.1, carrying out mathematical modeling on three motion forms of a vehicle waiting to pass, passing and entering a lane in the next signal period, and establishing three motion models;
s1.2, establishing two arrays list1 and list2, respectively representing the distance and the speed between the vehicle in the current lane and the initial white line of the signal lamp intersection, and then respectively analyzing the influence change conditions of three motion models of the vehicle per second on list1 and list2, wherein program codes are as follows:
s1.3, the first motion model is a waiting vehicle waiting for a signal lamp to turn into a green lamp, the judgment standard of the SUMO analysis model is that the vehicle speed is less than 0.1m/S, the acceleration of the first vehicle is assumed to be uniform acceleration motion, the second vehicle is provided with a delay time which is generally 1S, then the uniform acceleration motion is started, and the subsequent vehicles all start the uniform acceleration motion after delaying a fixed delay time, and the program code is as follows:
s1.4, otherwise, the second motion model is a vehicle flying on the lane at the moment that the signal lamp changes into green, namely the vehicle with the speed more than 0.1m/S, the motion model needs to estimate the approximate time of the vehicle from entering the lane to the current position, supposing that the time of the vehicle entering the lane is uniformly distributed according to the same time, the position and the speed of the current vehicle on the lane are calculated by using the following vehicle model, and the position and the speed information are respectively added into the list1 and the list2 for storage, and the program code is as follows:
s1.5, if not, the third motion model is vehicles entering the lane after the signal lights turn green, the vehicles are similar to the second motion model in calculation law, the position and the speed of the vehicles in the lane are simulated, the difference is that the initial position is the farthest point arranged in the lane, and the program code is as follows:
s1.6, comprehensively analyzing three motion models of the vehicle per second and the motion conditions of the vehicles flowing into the lane in four directions, establishing a SUMO analysis model for simulation, wherein program codes are as follows:
s1.7, obtaining the number of vehicles passing through the initial white line of the intersection by performing array calculation on list1 and list2, and when the calculated position result is less than 0, indicating that the distance between the vehicles and the initial white line is a negative number, indicating that the vehicles pass through the intersection;
s1.8, finally establishing an objective function, namely taking the maximum value of the number of vehicles which averagely pass through the signal lamp intersection in a signal period.
Two values are assumed for simulating the signal period and the fixed time length of the signal lamp, the values are introduced according to the steps, and the objective function value is calculated, wherein the simulation effect is as follows:
from the above data it can be seen that: when the signal lights are fixed for a 50 second duration (or other positive value) during an analog signal period, the number of waiting vehicles using the optimal timing solution is 20-34% less than the number of waiting vehicles in the normal timing scheme. Therefore, the crossing using the optimal timing scheme has better passing efficiency and shorter waiting time of vehicles.
The method of the embodiment is a detailed description of the method for establishing the single intersection SUMO analysis model deployment in the first embodiment, and the number of passing vehicles is calculated by executing program codes.
EXAMPLE III
Referring to fig. 3, the single intersection signal light optimal timing control device 210 based on the SUMO analysis model provided in this embodiment is only used for explaining the present invention, and is not used to limit the scope of the present invention. The concrete modules are as follows:
the traffic status sensing module 211: the system is used for acquiring traffic flow data on each lane of each intersection, and the position and the speed of a vehicle on the lane;
model build and analysis module 212: the system comprises a traffic following model, three motion models, a single intersection SUMO analysis model, a traffic flow calculation model and a target function, wherein the traffic following model and the three motion models are used for establishing vehicle traveling behaviors of four lanes in four directions according to position and speed data of vehicles on the lanes, calculating data in one signal period of the whole traffic flow, establishing a single intersection SUMO analysis model, calculating the number of vehicles passing through the intersection and finally establishing the target function;
the single intersection optimization control module 213: the system comprises a vehicle following model, a simulation annealing algorithm, a target function, a signal cycle and a timing control module, wherein the vehicle following model is used for substituting the data of the position and the speed of a vehicle on a lane into the vehicle following model to calculate by using the simulation annealing algorithm, and calculating the number of vehicles which pass through an intersection starting white line and successfully pass through the intersection ending white line per second in a signal cycle to obtain an optimal timing solution of a single intersection;
the inter-intersection coordination control module 214: the system is used for substituting the traffic flow data among intersections into an SUMO analysis model to carry out real-time signal periodic timing, dynamically modifying and adjusting the optimal timing solution of a single intersection, establishing a fixed timing scheme and comparing;
the timing scheme output module 215: the system is used for judging whether the number of waiting vehicles in the whole analog signal period can be reduced or not, quantitatively analyzing and outputting a global optimal timing solution, and acting on a controlled traffic flow through a signal lamp;
and (3) controlled traffic flow: for the control system to ultimately regulate the subject.
Wherein the model building and analyzing module 212 further comprises the following:
model simulator 2121: the system comprises a traffic lane, a SUMO analysis model, a traffic lane, a lane tracking model and a traffic lane tracking model, wherein the traffic lane is used for establishing three motion models for three motion forms of a vehicle waiting for passing, passing and entering the lane in the next signal period, the traffic lane tracking model is established according to the position and speed data of the vehicle on the lane, the traffic lane tracking model is used for comprehensively analyzing the three motion models and the traffic lane tracking model of the vehicle in the four directions, and the SUMO analysis model is established for simulation;
the calculation sub-module 2122: the method is used for establishing two arrays of list1 and list2, respectively representing the distance and the speed between a vehicle in a current lane and a starting white line of a signal lamp intersection, then respectively analyzing the influence change conditions of three motion models of the vehicle per second on the list1 and list2, establishing an objective function through array calculation of the list1 and the list2, calculating the number of the vehicles passing through the starting white line of the intersection, and obtaining the number of the vehicles averagely passing through the signal lamp intersection in a signal period.
The implementation principle and the generated technical effect of the signal lamp optimal timing control device 210 in this embodiment are the same as those of the methods in the first embodiment and the second embodiment, and for brief description, for the sake of brevity, reference may be made to the corresponding contents in the foregoing method embodiments.
Example four
Referring to fig. 4, an electronic device 200 according to the present embodiment is provided, and the examples are only for explaining the present invention and are not intended to limit the scope of the present invention. The electronic device 200 includes: signal light optimization timing control device 210, memory 220, and processor 230.
The signal lamp optimization timing control device 210, the memory 220, and the processor 230 are electrically connected to each other directly or indirectly, so as to implement data transmission or interaction.
The above components can be electrically connected to each other through one or more communication buses or signal lines. The signal lamp optimization timing control means 210 includes at least one software function module which may be stored in the memory 220 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the electronic device 200. The processor 230 is configured to execute an executable module stored in the memory 220, such as a software functional module or a computer program included in the signal lamp optimization timing control device 210.
The memory 220 is not limited to a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an erasable read only memory (EPROM), an electrically erasable read only memory (EEPROM), and the like.
The memory 220 is used for storing a program, and the processor 230 executes the program after receiving an execution instruction. The methods performed in the first and second embodiments of the present invention may be applied to the processor 230 of the electronic device 200 described in this embodiment, or implemented by the processor 230.
The processor 230 may be an integrated circuit chip having signal processing capability. The processor 230 may be a general-purpose processor including a Central Processing Unit (CPU), a Network Processor (NP), etc.; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps and logic blocks disclosed in embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor, or may be any conventional processor or the like.
The electronic device 200 of this embodiment may be the server 110 of the fifth embodiment.
EXAMPLE five
Referring to fig. 5, a network system 100 is provided for the embodiment, which is only used for explaining the present invention, and is not used to limit the scope of the present invention. The network system 100 includes: the terminal 120 performs data interaction with the server 110 through a network.
When monitoring that the webpage data is tampered, the server 110 sends a preset prompt message to the client terminal 120 which is in communication with the server 110.
The server 110 is not limited to a web server, a database server, a cloud server, etc. The client terminal 120 is not limited to an electronic device such as a Personal Computer (PC), a smart phone, a tablet computer, a Mobile Internet Device (MID), and a Personal Digital Assistant (PDA).
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. Also, the embodiments disclosed are not limited to the precise structures described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof.
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 should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.