SUMO has different tools for creating and customizing road networks and traffic flows and traffic signals. In this article, we will use some of those tools available in SUMO to generate a random road network with random traffic flows and traffic, signals.
The netgenerate Tool
It is a tool/script that generates abstract road networks that may be used by other SUMO-applications.
The following command will generate a random road network and will save it in the file Random.net.xml .
The following screenshot shows the successful creation of the road network.
The following command will generate a random road network and will save it in the file Random.net.xml but now it will contain traffic light information also.
The netedit Tool
It is a graphical network editor tool included with SUMO. It can be used to create new road network and can be used to edit the previously existing road network.
The following command will open the netedit GUI interface
Now we can open the random road network that we created with the netgenerate in the netedit GUI and edit it if required.
We may now edit the network as per our wish and requirement.
For example,
- we may add a new edge (road segment) or even delete an existing one.
- we may add vehicles at different locations/edges.
- we may add traffic signals.
- one may explore the available options and customize the network
We can simulate vehicles in the created network.
Loading the configuration and simulating it in sumo-gui
sumo-gui is the same sumo simulator application with a graphical user interface.
The following command will open the sumo GUI
Now we can open the configuration file “Random.sumocfg” and select “real world” view from the combo box.
The following screenshot shows the view of our random road network.
If we zoom-in to the road network, we can see the traffic signals as follows :
The output of the Simulation
The following gif animation shows the output of the simulated random road network scenario with traffic signals.
Related Articles
Simulating Manhattan Grid Mobility Model for VANET with SUMO