Urban traffic automatic simulation plug-in based on large language model and implementation method

By combining the urban traffic automation simulation plug-in based on a large language model with SUMO, the challenges of SUMO in terms of ease of use and efficiency are solved, and user-friendly natural language interaction and efficient simulation modeling are achieved to meet the needs of complex traffic scenarios.

CN120671497APending Publication Date: 2025-09-19BEIJING JIAOTONG UNIV
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202510591589.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Existing traffic simulation tools such as SUMO face challenges in terms of ease of use and efficiency. They have high configuration file complexity, high user learning costs, low efficiency when processing large-scale data, limited real-time response capabilities, difficulty in meeting the needs of rapidly changing scenarios, and low decision-making efficiency due to reliance on manual experience.

Method used

It uses an urban traffic automation simulation plug-in based on a large language model, seamlessly connects with SUMO through a multi-LLM collaborative architecture, integrates the natural language interaction and decision-making reasoning capabilities of LLM, realizes automated traffic simulation, reduces user operation complexity, and improves simulation modeling and analysis efficiency.

Benefits of technology

It significantly reduces the usage threshold and operating costs of SUMO, greatly improves the efficiency of simulation modeling and analysis, realizes the intelligent transformation of SUMO's complex operating processes, supports seamless collaboration with smart city systems, and adapts to the needs of road network expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120671497A_ABST
    Figure CN120671497A_ABST
Patent Text Reader

Abstract

According to the urban traffic automatic simulation plug-in based on the large language model and the implementation method, after a user inputs a request for a road network and a request for vehicle routing by using a natural language, the request is transmitted into a full-process automatic simulation module, and the full-process automatic simulation module carries out simulation; the input analysis agent extracts a key value from a natural language to generate a character string in a Json format, then the character string is spliced, a prompt input simulation input construction agent containing detailed simulation information is generated, the simulation input construction agent calls a packaged tool function, a vehicle route xml file and a road network xml file are generated respectively, and the vehicle route xml file and the road network xml file are connected with the simulation input construction agent. And the simulation execution intelligent body opens the SUMO-gu i to start simulation, and returns a result through a graphical interface. According to the method, the technical complexity of traditional traffic simulation is effectively simplified, a simulation tool is promoted to be transformed from professional modeling to intelligent decision support, and an innovative technical path is provided for optimization and management of a dynamic traffic system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of traffic simulation and computer program, and relates to an urban traffic automation simulation plug-in based on a large language model and an implementation method. Background Art

[0002] With accelerating urbanization and a surge in the number of motor vehicles, modern transportation systems face complex challenges such as increased congestion, frequent accidents, rising energy consumption, and increased pollution. Traditional empirical planning and management models are unable to cope with dynamically changing traffic demands. Problems such as high field testing costs, difficulty in quantifying and analyzing the interplay of multiple factors, and a lack of scientific evidence for predicting policy effects have long hindered progress in traffic optimization. Traffic simulation technology, through the construction of digital twin systems, can transcend physical spatial limitations and achieve multi-dimensional dynamic simulation. Based on refined modeling and multi-source data fusion, this technology accurately reproduces the operational state of complex road networks, enabling virtual simulation of signal timing optimization and road network reconstruction plans. It effectively addresses the pain points of traditional methods, such as incomplete data collection and high trial-and-error decision-making costs, providing managers with visual decision support and promoting the evolution of transportation systems towards efficiency and sustainability. SUMO (Simulation of Urban Mobility), an open-source, cross-platform microscopic traffic simulation software, leverages its high scalability, multimodal traffic simulation capabilities, and free, open-source nature. It supports refined modeling of everything from vehicles to pedestrians and is widely used in academic research, urban transportation planning, and intelligent transportation system testing and optimization.

[0003] However, although SUMO is highly flexible and scalable in the field of traffic modeling, its shortcomings are also quite significant. First, its learning cost is high. Users need to master complex parameter configuration, road network modeling rules, and script programming capabilities based on Python or TraCI, which poses a large barrier to entry for non-professional users or cross-disciplinary researchers. Secondly, the user interaction interface is not user-friendly enough. It relies on command line operations and manual adjustment of configuration files. It lacks intuitive visual editing tools, resulting in inefficient debugging and optimization. Especially in multi-scenario dynamic simulation, users need to frequently switch tool chains to complete data input, operation monitoring and result analysis, which increases the complexity of operation.

[0004] In recent years, the rapid development of large language models (LLMs) has demonstrated the ability to interact, understand, reason, and make decisions, providing potential solutions to the above problems. LLMs have strong natural language understanding and generation capabilities, and can accurately parse user needs and generate structured outputs, which lays the foundation for lowering the threshold for using technical tools. At the same time, their contextual reasoning and logical decision-making capabilities enable them to assist in completing complex parameter optimization and strategy generation tasks. In addition, LLMs' potential in multimodal interaction also provides new possibilities for improving the human-computer interaction experience. The combined use of these capabilities is expected to effectively address the challenges faced by existing traffic simulation tools in terms of usability and efficiency.

[0005] While SUMO offers powerful capabilities in the field of traffic simulation, it still faces some limitations in practical applications. SUMO's configuration files are complex, especially the XML format, which is difficult to write. This presents significant user barriers to adoption. The extensive manual configuration and management required significantly increases user workload and the learning curve for new users. Furthermore, SUMO's efficiency in processing large amounts of data and limited real-time responsiveness make it difficult to meet the demands of rapidly changing scenarios. As business scale expands, its scalability may struggle to adapt to increasingly complex traffic simulation scenarios. SUMO's heavy reliance on human experience in simulation decision-making can easily lead to biased results due to human error, reducing decision-making efficiency. Compatibility issues are common when integrating with other systems due to complex configuration and inflexible interfaces. User experience in using and modifying road networks is inconvenient, and the lack of intuitive visualization tools significantly defies the principles of ease of use and efficiency expected of modern software. Summary of the Invention

[0006] In view of the problems in the prior art, the present invention provides an urban traffic automation simulation plug-in based on a large language model and an implementation method.

[0007] An urban traffic automation simulation plug-in based on a large language model includes a user input module, a full-process automatic simulation module, and a simulation output module.

[0008] In the user input module, users use natural language to input requests for road networks and vehicle routes, which are then passed to the full-process automatic simulation module.

[0009] The full-process automatic simulation module includes three intelligent agents for simulation. The input analysis agent extracts key values ​​from natural language to generate a string in Json format. The string contains vehicle routing information (such as vType, route, vehicle, flow, stop) and road network information (such as nodes, edges, types, connections, tlLogic). The strings are then concatenated to generate a prompt input simulation input construction agent containing detailed simulation information. The simulation input construction agent calls the encapsulated tool function to generate vehicle routing xml files and road network xml files respectively. The simulation execution agent opens SUMO-gui to start the simulation and transmits it to the simulation output module.

[0010] The simulation output module controls the simulation of SUMO-gui through traci and returns the results directly through the graphical interface.

[0011] The simulation of SUMO-gui is controlled by traci using existing technology.

[0012] A large language model-based urban traffic automation simulation plug-in implementation method includes the following steps: adopting a multi-LLM collaborative architecture that can seamlessly connect with SUMO, integrating the natural language interaction and decision-making reasoning capabilities of LLM, and realizing automated traffic simulation based on a multi-agent large language model (LLM). This improves the overall performance and user experience of SUMO and realizes the intelligent transformation of SUMO's complex operation processes.

[0013] It also includes the following steps: replacing the traditional code configuration mode with natural language interaction, users complete complex operations such as road network construction and parameter setting through dialogue instructions, and converting complex simulation parameter debugging into an intuitive human-computer dialogue process, significantly reducing the learning curve; at the decision support level, based on dynamic data analysis and logical reasoning capabilities, it generates quantitative evaluations and multi-dimensional decision-making recommendations for signal optimization and path planning scenarios, assisting users to quickly locate problems and generate optimization solutions, and automatically generates management strategies and natural language reports through real-time analysis of multi-faceted traffic data to build a highly automated intelligent decision-making system. By building a simulation logic self-checking mechanism and a multimodal interface adaptation layer, it realizes automatic identification and correction of configuration errors, supports seamless collaboration with smart city systems, and large language models can handle larger-scale data and more complex traffic scenarios to meet the needs of road network scale expansion.

[0014] The advantages of this invention are: by deeply integrating the large language model with the SUMO simulation platform, it achieves a systematic improvement in the efficiency of traffic modeling and analysis. At the user experience level, it innovatively replaces the traditional code configuration mode with natural language interaction. Users can complete complex operations such as road network construction and parameter setting through dialogue commands, transforming complex simulation parameter debugging into an intuitive human-computer dialogue process, significantly reducing the learning curve. At the decision support level, based on dynamic data analysis and logical reasoning capabilities, it can generate quantitative evaluations and multi-dimensional decision recommendations for scenarios such as signal optimization and route planning, helping users quickly locate problems and generate optimization solutions. By analyzing multi-dimensional traffic data in real time, it automatically generates management strategies and natural language reports, building a highly automated intelligent decision-making system. In terms of technical integration, by building a simulation logic self-checking mechanism and a multimodal interface adaptation layer, it not only achieves automatic identification and correction of configuration errors, but also supports seamless collaboration with smart city systems. The large language model can handle larger data volumes and more complex traffic scenarios to meet the needs of road network expansion. This solution effectively simplifies the technical complexity of traditional traffic simulation, promotes the transformation of simulation tools from professional modeling to intelligent decision support, and provides an innovative technical path for the optimization and management of dynamic traffic systems.

[0015] The core advantage of the plug-in lies in its significant lowering of SUMO's user threshold and operating costs through LLM technology, while significantly improving the efficiency of simulation modeling and analysis. By tightly integrating the Large Language Model with SUMO, it not only addresses existing SUMO issues but also provides users with a more efficient, intelligent, and user-friendly traffic simulation experience.

[0016] Technical Effects

[0017] Users describe the scenario they want to generate using natural language, which includes road network and routing information. The road network describes a map, including the roads and intersections that simulated vehicles will traverse. Routing information defines traffic requirements, including departure times, travel routes, and vehicle types. Function preprocessing encapsulates simulation operations into Python functions, calling the SumoLib (one of SUMO's official tool libraries, primarily used for parsing, analyzing, and manipulating SUMO road network files (.net.xml) and other related data) toolkit and the TraCI (Traffic Control Interface, a real-time interactive interface for SUMO traffic simulation software that allows users to dynamically control vehicles, signals, and road network elements during simulations) toolkit to configure vehicle and road settings. Functions are named according to their functionality and include explanations and usage precautions. The function's local, name, and explanation are decorated as Tool classes and linked into Langchain (a framework for building LLM-based applications that efficiently connects language models with external data sources, computational tools, and task workflows through a modular toolchain). Finally, the constructed Sim class uses SUMO's TraCI library to implement step-by-step simulation operation and directly display the simulation results in a graphical interface. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. As shown in the figure:

[0019] Figure 1 It is a structural diagram of the present invention. DETAILED DESCRIPTION

[0020] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0021] Example 1: Figure 1 As shown in the figure, a large language model-based urban traffic automation simulation plug-in and implementation method are presented. A multi-LLM collaborative architecture is adopted to develop an intelligent plug-in designed for SUMO simulation.

[0022] The plug-in integrates LLM's natural language interaction and decision-making reasoning capabilities, realizing the intelligent transformation of SUMO's complex operation processes.

[0023] The core advantage of the plug-in is that it significantly reduces the usage threshold and operating costs of SUMO through LLM technology, while greatly improving the efficiency of simulation modeling and analysis.

[0024] A plugin that can seamlessly integrate with SUMO.

[0025] The plug-in will implement automated traffic simulation based on a multi-agent Large Language Model (LLM), thereby improving SUMO's overall performance and user experience.

[0026] By closely integrating the large language model with SUMO, it not only solves the existing problems of SUMO, but also provides users with a more efficient, intelligent and easy-to-use traffic simulation experience.

[0027] This innovative technology will bring new breakthroughs to the field of traffic simulation and promote the development of traffic simulation software towards intelligence and automation.

[0028] (1) Introduction to basic concepts:

[0029] The present invention uses SUMO as a platform for traffic simulation. SUMO, short for Simulation of Urban Mobility, is an open-source, microscopic, multimodal traffic simulation software.

[0030] Using SUMO for traffic simulation requires two things: first, constructing the target network XML file (net.xml), including edges, nodes, lanes, and so on; and second, generating a routing XML file (rou.xml) based on the network, including vehicles, flows, and so on. SUMO comes with the TraCI library, which can be called to control the simulation process. The utility functions in this paper are used to construct the network and routing files, complementing the functionality of TraCI.

[0031] A traffic simulation plug-in based on a large language model to assist users in implementing traffic simulation.

[0032] The present invention is divided into three modules. In the user input module, the user uses natural language to input requests for road networks and vehicle routes, which are then transmitted to the full-process automatic simulation module and simulated by three intelligent agents respectively.

[0033] The input analysis intelligent body extracts key values ​​from natural language to generate a string in Json format, which contains vehicle routing information (such as vType, route, vehicle, flow, stop, which defines the traffic demand, that is, the departure time, driving path, vehicle type, etc. of the vehicle in the simulation) and road network information (such as nodes, edges, types, connections, tlLogic, which describes a map including the roads and intersections passed by the simulated vehicles).

[0034] Nodes are key points in a network, representing intersections, the start or end of a road, and the places where different road segments (edges) are connected.

[0035] Edges represent roads or road segments, connecting two nodes.

[0036] Types are attributes of different road segments, such as speed limit, number of lanes, and capacity.

[0037] Connections represent the paths that vehicles take from one edge to another and are used at intersections to describe the turning relationships that vehicles can travel.

[0038] tlLogic is the control logic of the traffic light, including the phase and duration of the light.

[0039] The vehicle type (vtype) defines the physical properties and behavioral characteristics of a vehicle, such as length, maximum speed, acceleration, deceleration, etc. It can be referenced by a specific vehicle or traffic flow.

[0040] A route defines the path a vehicle takes and is composed of a series of edges. Vehicles or traffic flows will follow the specified route.

[0041] Vehicle refers to a single vehicle, including information such as vehicle type, route, and departure time.

[0042] A flow is a group of vehicles with the same attributes, including vehicle type, route, departure frequency, etc.

[0043] A stop defines the stopping behavior of a vehicle on a route, including the stopping location, stopping time, and stopping reason. It can be used to simulate the stopping behavior of a vehicle at a station, traffic light, or roadside.

[0044] Then concatenate the character strings to generate a prompt input containing detailed simulation information to construct the intelligent agent.

[0045] The simulation input construction intelligent body will call the encapsulated tool function to generate the vehicle routing XML file and the road network XML file respectively.

[0046] Finally, the simulation execution agent will open SUMO-gui to start the simulation.

[0047] Finally, there is the simulation output module, which controls the simulation of SUMO-gui through traci and returns the results directly through the graphical interface.

[0048] The present invention uses multiple intelligent agents to connect the process of user natural language input and SUMO simulation.

[0049] During the simulation process, with the help of cooperation and information interaction between intelligent agents, the transmission and acquisition of information can be kept efficient and accurate, thereby improving the efficiency of building simulations.

[0050] Example 2: Figure 1 As shown in the figure, a large language model-based urban traffic automation simulation plug-in and implementation method are introduced, and each module is introduced according to the architecture diagram.

[0051] 1) User input module

[0052] This is a key input component. User input is generally in natural language, including requests for road networks and vehicle routes. The request contains information about the road network and routes to ensure that the plug-in can generate a traffic simulation scenario that meets the SUMO simulation requirements based on the given information.

[0053] 2) Full process automatic simulation module user input module

[0054] Based on a modular multi-agent architecture, through the deep integration of the Large Language Model (LLM) and the LangChain framework, a distributed traffic behavior simulation system with cognitive reasoning capabilities is constructed. Through interaction and information transfer, agents jointly complete the construction of road network files and routing files, and call SUMO to start the simulation.

[0055] The full-process automatic simulation module uses a total of three types of intelligent agents, namely user input analysis agent, simulation input construction agent, and simulation execution agent.

[0056] i. User Input Analysis Agent

[0057] The user input analysis agent is used to read and analyze user input. A standard JSON template is set up in the system. Based on the given requirements, the agent extracts the corresponding key values ​​from the user's natural language input and fills the JSON template. Finally, the agent outputs a string in JSON format containing the user's input information.

[0058] There are two reasons for using a JSON format string as the output result:

[0059] 1. The strict json format can reduce the interference caused by irrelevant information when multiple agents interact, allowing the agents to perform parsing and analysis more accurately and efficiently.

[0060] String output can be easily and efficiently embedded into the next agent's input, seamlessly integrating with the designed prompt. If no value corresponding to a key is extracted from the user's natural language input, the system's default values ​​will be used for some parameters when populating the JSON template. If the "id" parameter is not given, the agent will automatically analyze it and generate an appropriate, easily understood ID. For example, if the user input is "At this time, performing a SUMO simulation, there is a node in the road network with coordinates (0, 2, 1)."

[0061] The filled template is:

[0062] "node":{"id":"Node1","x":0.0,"y":2.0,"z":1.0,"type":"priority","tlType":"static",},……

[0063] "id" defines the node number, "x", "y" and "z" define the coordinates of the node in three-dimensional space, "type" defines the traffic control type of the node, which determines the rules when vehicles pass through the intersection, and "tlType" defines the type of traffic light.

[0064] Only the location coordinate information involved is filled in. The keys in the Json format are the corresponding keys required by the SUMO file, such as node coordinates, node ID, road ID, length, etc.

[0065] After combining the above JSON template with user input, the user input analysis agent can extract road network information (such as nodes, edges, types, connections, tlLogic) and vehicle routing information (such as vType, route, vehicle, flow, stop) and output them as strings in JSON format.

[0066] At the same time, in order to improve the accuracy of information extraction by the agent and the accuracy of successfully filling the JSON file, we also designed a corresponding prompt to assist the user's input and improve the accuracy of the input module. The following is the prompt of the agent that extracts node information from the user's natural language input:

[0067] You need to accept user input and some node information. You don't need to generate nodes. You only need to check whether the input node information meets the user's needs.

[0068] You need to extract the node information for building the road network from the user's input and then compare it with the nodes you received.

[0069] You need to extract the description of the road network to be generated from the user's input, such as what types of intersections the road network contains, such as crossroads or one-way streets, and return it to the user.

[0070] You need to check whether the node information you input is consistent with the node information you extracted from the user.

[0071] You need to compare the input node information with the type of the road network to determine whether the node information meets the user's needs, such as the type of road network.

[0072] For example, the intersection type obviously requires 5 nodes, while the one-way street type only requires 2 nodes, and so on. You need to judge it yourself based on the type.

[0073] If it can meet the user's needs, you need to return the node information intact and in the input format.

[0074] If it cannot meet the user's needs, you need to think based on the extracted road network information such as intersection type, obtain the modified node information, and construct new node information based on the input node information and the modified node information, and return it to the user in the input node format. It is complete node information, and the format is consistent with the input format.

[0075] The format returned together is:

[0076]

Node information

[0077] Node information describes the comprehensive properties of intersections in a road network, including their three-dimensional location coordinates, the type of traffic control at the intersection, the specific operating mode of traffic lights, and their connections to other lanes. Nodes also define the rules for vehicle behavior when passing through the intersection and can include additional parameters, collectively forming the fundamental logic and spatial structure of traffic flow in the simulation.

[0078] Finally, the obtained JSON format string and prompt are concatenated as the second input and sent to the simulation input to construct the intelligent agent.

[0079] ii. Constructing an agent through simulation input

[0080] To enable the agent to perform SUMO operations, we created utility functions corresponding to various SUMO operations. These utility functions can directly modify the network and routing XML files. For network XML files, these utility functions can add nodes, edges, and connections; for routing XML files, these utility functions can add routes and flows. These utility functions enable the simulation input construction agent to construct the SUMO target network and routing XML files.

[0081] The simulation input agent first learns the function and parameters of the tool function to ensure that it correctly understands the corresponding operation. To enable the agent to learn the use of the tool function, the tool class is designed to provide a description and explanation of each tool function. These are stored in a variable with the corresponding name and can be directly given to the agent for learning. For example, the description of a tool function is as follows:

[0082] GENERATE_NODE="'.

[0083] The parameter id is the node name, x and y are the coordinates, type is the node type, and file is the node file address. It is used to generate a node in the node file. Please fill in the parameters separately. Do not fill in the parameters as a sentence. You need to pass in three parameters.

[0084] The first is the name of the node, the second is the x-coordinate of the node, the third is the y-coordinate of the node, and the fourth is the type of the node. You need to define the type of the node according to your needs. Note that you need to pass in the three parameters separately, otherwise an error will be reported.

[0085] And you need to wrap the parameters with () and the parameters do not need to be wrapped with "", just pass them in directly. Note: mixed output of step descriptions and final answers is prohibited! '

[0086] The above description is expressed in code:

[0087] generate_node_tool=Tool.from_function(func=Tools.generate_no de, name='Generate Node', description=Tools.GENERATE_NODE), as an explanation used when decorating a function as generate_node_tool in the Tool class.

[0088] After the agent understanding tool, it can receive the output from the user input analysis agent. The output JSON format string will be combined with the given prompt as the final input to the simulation input construction agent.

[0089] For example, this is an example of combining nodes information and prompt into input parameters:

[0090] Ins=f "You have now obtained the node information. You need to regenerate the node based on this information. The node information is {ans['output']}".

[0091] Where ans['output'] is the node information output in json format.

[0092] The agent then understands the required operation and selects a pre-prepared utility function. During this process, the agent generates the corresponding function input based on the JSON format and the format requirements of the utility function description. Once the function is successfully called, the corresponding XML file is generated.

[0093] The simulation input constructs the agent's call to utility functions in a certain order, in order to comply with the basic requirements of the SUMO software. For example, if net.xml is generated based on nod.xml and edg.xml, the agent will first call the utility functions for generating nodes and edges. Only after both nod.xml and edg.xml are generated will the utility function for generating net be called. This artificial order of generating these files ensures that SUMO simulations are error-free and enhances security.

[0094] iii. Simulate the execution agent.

[0095] After the network and routing files are generated, SUMO-gui needs to be opened for simulation. This method automatically opens SUMO-gui and starts the simulation at appropriate time intervals. The basic principle is the same as constructing an agent with simulation input, but it does not construct any files, but interacts with the SUMO-gui software.

[0096] 3) Simulation output module

[0097] Here, we use SUMO-gui for traffic simulation. We built a Sim class and used SUMO's traci library to run the simulation step by step. The simulation results can be directly displayed in a graphical interface.

[0098] Example 2: Figure 1 As shown in the figure, a method for implementing an urban traffic automation simulation plug-in based on a large language model is presented. The entire process is divided into three modules.

[0099] 1. User Input Module

[0100] User natural language input: "I am planning to design a traffic simulation scenario that simulates the traffic conditions in a small urban area. This area has a major intersection surrounded by several minor intersections, with the distance between intersections being approximately 200 to 400 meters. The road has two lanes in each direction, and the vehicle speed is approximately 30 to 50 kilometers per hour.

[0101] At the main intersection, I need to set up a traffic light. The changes of the light should be reasonable, and the east-west and north-south directions should be released alternately. The green light time in each direction should be about 20 to 30 seconds.

[0102] The vehicles on the road are mainly cars. Their driving behavior is relatively flexible, and their acceleration and deceleration should conform to the characteristics of ordinary cars.

[0103] I also need to define some routes for vehicles to travel, such as a route from north to south through major intersections, and a route from west to east. On each route, some vehicles should depart at different times, such as some departing at the beginning of the simulation and some departing a few minutes later.

[0104] In addition, I hope to set up a continuous traffic flow in a certain direction, such as from north to south, with a traffic flow of about 200 to 300 vehicles per hour, which lasts for a period of time, such as half an hour to an hour.

[0105] Finally, I need to ensure that these settings work correctly in the simulation tool and that the generated configuration files meet the tool’s requirements.”

[0106] Specific configuration information in natural language:

[0107] 1) Road network:

[0108] Intersection setting: There is a main intersection in the middle and several secondary intersections around it. Let’s design four, with a distance of 200-400 meters between intersections.

[0109] Road configuration: There are two lanes in each direction, and the vehicle speed is about 30-50 km / h (8.3-13.9 m / s).

[0110] Traffic light settings: Traffic lights are set up at the main intersections in the middle, with east-west and north-south directions released alternately, and the green light time in each direction is about 20-30 seconds.

[0111] 2) Routing:

[0112] Vehicle configuration:

[0113] Vehicle type settings:

[0114] Car parameters:

[0115] Acceleration: 2.6 m / s 2

[0116] Deceleration: 4.5m / s 2

[0117] Vehicle length: 4 meters

[0118] Maximum speed: 70 km / h (approximately 19.44 m / s)

[0119] Vehicle Class (vClass): passenger

[0120] Vehicle Routes: Define routes from north to south through the main intersection in the middle, and routes from west to east. Vehicles on each route depart at different times, such as at the start of the simulation and a few minutes later.

[0121] Traffic flow setting: Set up continuous traffic flow in the direction from north to south, with a traffic flow of 250 vehicles per hour and a duration of 45 minutes.

[0122] 2. Full-process automatic simulation module

[0123] 2.1. The user transmits the request for the desired road network to the automatic simulation module through the user input module. This module consists of three intelligent agents. First, the input analysis intelligent agent extracts key information from the user input to generate a string containing JSON format information, including vehicle routing information (vType, route, vehicle, flow, stop) and road network information (nodes, edges, types, connections, tILogic).

[0124] 2.2. The intelligent agent concatenates the character strings to generate a prompt containing detailed simulation information and inputs it to the simulation input to construct the intelligent agent.

[0125] 2.3. The simulation input constructs the intelligent agent, based on the json data of each character in the input, and calls the corresponding encapsulated tool function twice to generate the vehicle routing information xml file and road network information xml file required for SUMO simulation.

[0126] 2.4. The simulation input construction agent inputs the generated file to the simulation execution agent, allowing the simulation execution agent to start the SUMO simulation.

[0127] 3. Simulation Output Module

[0128] Input the simulation results to the simulation output module,

[0129] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A large language model-based urban traffic automation simulation plug-in, characterized in that: Contains user input module, full-process automatic simulation module and simulation output module, In the user input module, users input requests for road networks and vehicle routes using natural language, which are then passed to the full-process automatic simulation module. The full-process automatic simulation module includes three intelligent agents for simulation. The input analysis intelligent agent extracts key values ​​from natural language to generate a string in Json format. The string contains vehicle routing information vType, route, vehicle, flow and stop and road network information nodes, edges, types, connections and tlLogic. Then, the string is concatenated to generate a prompt input simulation input construction intelligent agent containing detailed simulation information. The simulation input construction intelligent agent calls the encapsulated tool function to generate the vehicle routing XML file and the road network XML file respectively. The simulation execution intelligent agent opens SUMO-gui to start the simulation and transmits it to the simulation output module. The simulation output module controls the simulation of SUMO-gui through traci and returns the results directly through the graphical interface.

2. The urban traffic automation simulation plug-in based on a large language model according to claim 1, characterized in that: Multiple intelligent agents are used to connect the user's natural language input and SUMO simulation processes. During the simulation process, with the help of cooperation and information interaction between intelligent agents, the transmission and acquisition of information remain efficient and accurate, thereby improving the efficiency of building simulations.

3. The urban traffic automation simulation plug-in based on a large language model according to claim 1, characterized in that: User input module: User input is generally in natural language, including requests for road networks and vehicle routes. The requests contain information about road networks and routes to ensure that the plug-in can generate a traffic simulation scenario that meets the SUMO simulation requirements based on the given information. Full-process automatic simulation module: Based on a modular multi-agent architecture, through the deep integration of the large language model (LLM) and the LangChain framework, a distributed traffic behavior simulation system with cognitive reasoning capabilities is constructed. Through interaction and information transmission, the agents jointly complete the construction of road network files and routing files, and call SUMO to start simulation.

4. The urban traffic automation simulation plug-in based on a large language model according to claim 3, characterized in that: The full-process automatic simulation module uses user input to analyze the intelligent agent, simulation input to construct the intelligent agent and simulation execution agent.

5. The urban traffic automation simulation plug-in based on a large language model according to claim 4, characterized in that: The user input analysis agent is used to read and analyze the user's input. A standard JSON template is set in the system. The agent extracts the corresponding key value from the user's natural language according to the given requirements and the JSON template, fills the JSON template, and finally outputs a string in JSON format that contains the user input information. Simulate input to construct an intelligent agent: perform SUMO operations, write tool functions corresponding to various SUMO operations to call them, and the tool functions directly modify the road network XML file and the route XML file. For the road network XML file, the tool functions add nodes, edges, and connections. For the routing XML file, the tool function adds routes and flow operations. The tool function enables the simulation input to construct the intelligent agent to construct the SUMO target road network XML file and routing XML file. The simulation input construction agent inputs the generated file to the simulation execution agent, allowing the simulation execution agent to start the SUMO simulation.

6. A method for implementing an urban traffic automation simulation plug-in based on a large language model, characterized in that: The system includes the following steps, adopts a multi-LLM collaborative architecture, can seamlessly connect with SUMO, integrates LLM's natural language interaction and decision-making reasoning capabilities, and implements automated traffic simulation based on a multi-agent large language model (LLM). This improves SUMO's overall performance and user experience, and realizes the intelligent transformation of SUMO's complex operation processes.

7. The method for implementing a large language model-based urban traffic automation simulation plug-in according to claim 6, characterized in that: By replacing the traditional code configuration mode with natural language interaction, users can complete complex operations such as road network construction and parameter setting through dialogue commands, and transform complex simulation parameter debugging into an intuitive human-computer dialogue process, significantly reducing the learning curve. At the decision support level, based on dynamic data analysis and logical reasoning capabilities, it generates quantitative evaluations and multi-dimensional decision-making recommendations for signal optimization and path planning scenarios, assisting users in quickly locating problems and generating optimization solutions. By analyzing multi-dimensional traffic data in real time, it automatically generates management strategies and natural language reports, and builds a highly automated intelligent decision-making system. By building a simulation logic self-checking mechanism and a multimodal interface adaptation layer, it realizes automatic identification and correction of configuration errors, supports seamless collaboration with smart city systems, and the large language model can handle larger-scale data and more complex traffic scenarios to meet the needs of road network scale expansion.

Citation Information

Cited By

  • Automatic parallel traffic simulation analysis method and device

    CN121211978A

  • Semantic-driven traffic simulation scene generation method based on large language model

    CN121328352A

  • Visual display method and device of traffic data, equipment and medium

    CN121478866A

  • Intelligent analysis and natural language report generation system and method for traffic simulation result

    CN121835646A

  • Traffic influence autonomous evaluation system based on natural language processing and working method

    CN121835679A