Applicable Versions | NetSim Standard | NetSim Pro |
Applicable Releases | v13 | v14 |
Netedit is a Road network editor for the road traffic simulation in SUMO. Using these utility users can quickly design road networks and obtain a Network XML file which is part of SUMO configuration.
Steps to create a simple SUMO network using netedit utility:
1. Open NetEdit from <SUMO_INSTALL_DIRECTORY>/bin
, typically located in C:\Program Files (x86)\Eclipse\Sumo\bin
, then select File → New Network.
Refer: "http://sumo.dlr.de/wiki/NETEDIT#Edit_Modes" for more details on modes of operation
2. Click on Mode for Creating Junction and Edge, click on Edit and enable the checkboxes "Show Grid" "Create consecutive edges" and "Create an edge in the opposite direction".
3. Adjust the design area so that the road network is in the positive XY quadrant. From version 14 of NetSim, this is not mandatory but helps avoid issues when opening the network scenario in NetSim.
4. Click on the blank white area to create edges, clicking again will create a new edge which will automatically get connected to the previous edge as shown below:
5. Select "Traffic Lights" from the top ribbon. Select the junctions and click on Create button on the left to add Traffic Signal to it.
6. Create a new folder and save the network file(*.net.xml) over there, say with a name network.net.xml
7. Open the command prompt with the current working directory as the folder where you have saved the network file in the previous step.
8. Using randomtrips.py utility present in <SUMO_INSTALL_DIRECTORY>/tools directory create trips file with the command
>"C:\Program Files (x86)\Eclipse\Sumo\tools\randomTrips.py" -n "network.net.xml" -e 2 --route-file "trips.xml" --validate9. This will create a trip file in your folder along with associated files.
10. Create a SUMO configuration file (*sumo.cfg) which points to the network and trips file, in your folder which contains the network and route file.
Refer: "http://sumo.dlr.de/wiki/Tutorials/Hello_Sumo" include parameter "<step-length value="0.4"/>"
Following is a sample SUMO Configuration:
<configuration>
<input>
<net-file value="network.net.xml"/>
<route-files value="trips.trips.xml"/>
</input>
<time>
<begin value="0"/>
<end value="100"/>
<step-length value="0.4"/>
</time>
</configuration>
You can copy the above contents to create a SUMO configuration file in your folder
11. Open SUMO using sumo-gui.exe present in <SUMO_INSTALL_DIRECTORY>/bin. An open scenario in SUMO using Open->Simulation and verify whether the network loads and simulation happens as per the configuration is done.
12. Open the SUMO scenario via NetSim VANET by selecting VANET under the New option in the Home Screen.
13. Browse and locate the SUMO Configuration file present in your directory to load the road traffic network in NetSim GUI.
14. The road network created in SUMO will be automatically replicated in the NetSim GUI environment.
15. Configure traffic between vehicles using the Application icon, enable trace files, dynamic metrics.
16. Click the Run Simulation button. The simulation time is managed by the SUMO configuration and does not require modification.
From version 14 of NetSim, SUMO opens when the simulation starts.
17. When the simulation starts, the SUMO interface (Vanet.exe
) command line initializes in parallel and displays step calculations during runtime. The SUMO interface window closes before the NetSim simulation ends, as SUMO manages road traffic conditions, while NetSim handles network communication and instantiates the TCP/IP stack for each participating device.
18. At the end of the simulation, NetSim will provide detailed performance metrics along with packet trace, event trace, link, and application throughput plots based on the user configuration
done.
19. To visualize the vehicular movement during runtime, run the simulation with Play & record animation option selected. NetSim animation window which appears at the start of the simulation can be ignored and closed.
20. Now in addition to the SUMO Interfacing console, SUMO-GUI will be loaded in parallel. Vehicular movement can be visualized here by configuring the coloring schemes for better visibility. The following window can be obtained by clicking on the colored palette just before the camera icon. Under vehicles, set Show As to just click on Colour Scheme and then go to vehicles
set vehicle safe as 'simple shapes' and set Exaggerate by to 10 or any other value as per your preference and click on Use button.
21. You will now start seeing vehicle movement in SUMO-GUI as per the number of vehicles, departure time and routes configured in the routes (*.trips.xml)file. You can zoom in and out and move the simulation area to visualize it better.
22. NetSim animation window which appears in parallel can be used to visualize vehicular movement along with packet flow and other additional options as explained above.
For further reference and documentation related to NetEdit and SUMO visit:
http://sumo.sourceforge.net/docs/
Related articles:
For more information on NetSim visit