Skip to content

Creating Random Road Network, Traffic Flows, Signals in SUMO

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 .

 

$ netgenerate –rand -o Random.net.xml –rand.iterations=70

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.

$ netgenerate –rand -o Random.net.xml –rand.iterations=70 -j “traffic_light”
 

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

$ netedit
The following is 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. 

Hidden Section! Contact Charles  

The key/passphrase will be given once you have been approved for getting paid research support/assistance from Charles. To get paid support, you may start a 'free' research discussion.  

WhatsApp chatDiscuss Through WhatsApp
 

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

$ 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

References

  1. https://sumo.dlr.de/docs/netgenerate.html
  2. https://sumo.dlr.de/docs/Netedit/index.html
  3. https://sumo.dlr.de/docs/duarouter.html
  4. https://sumo.dlr.de/docs/sumo-gui.html
  5. https://sumo.dlr.de/docs/sumo.html
  6. https://www.projectguideline.com/simulating-manhattan-grid-mobility-model-for-vanet-with-sumo/
WhatsApp Discuss Through WhatsApp