Creating a Simple SUMO Network and Simulation

Creating a Simple SUMO Network

A SUMO network file describes the traffic-related part of a map, the roads and intersections the simulated vehicles run along or across. At a coarse scale, a SUMO network is a directed graph. Nodes, usually named “junctions” in SUMO-context, represent intersections, and “edges” roads or streets. Note that edges are unidirectional. Specifically, the SUMO network contains the following information:

every street (edge) as a collection of lanes, including the position, shape and speed limit of every lane,

traffic light logic referenced by junctions,

junctions, including their right of way regulation,

connections between lanes at junctions (nodes).

Also, depending on the used input formats and set processing options, one can also find districts and roundabout descriptions.

Simple Sumo Network

To create the above SUMO Network you can do either of the following:

Create NODE and EDGES Files

You can create the network by hand. In order to create the network by hand you will need to first create a node file. The node file describes intersections/junctions. Node files normally having the extension “.nod.xml” and every node is described in a single line which looks like this:

XHTML

1

<node id="<STRING>"x="<FLOAT>"y="<FLOAT>"[type="<TYPE>"]/>

– the straight brackets (‘[‘ and ‘]’) indicate that the parameter is optional.

Each of these attributes has a certain meaning and value range. If you leave out the type of the node, it is automatically guessed by NETCONVERT. The node file for figure above should look like the following:

XHTML

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

<nodes>

<node id="1"x="0.0"y="0.0"type="priority"/>

<node id="2"x="0.0"y="-1000.0"type="priority"/>

<node id="3"x="0.0"y="-2000.0"type="priority"/>

<node id="4"x="500.0"y="0.0"type="priority"/>

<node id="5"x="500.0"y="-1000.0"type="priority"/>

<node id="6"x="500.0"y="-2000.0"type="priority"/>

<node id="7"x="1000.0"y="0.0"type="priority"/>

<node id="8"x="1000.0"y="-1000.0"type="priority"/>

<node id="9"x="1000.0"y="-2000.0"type="priority"/>

<node id="10"x="1500.0"y="0.0"type="priority"/>

<node id="11"x="1500.0"y="-1000.0"type="priority"/>

<node id="12"x="1500.0"y="-2000.0"type="priority"/>

<node id="13"x="2000.0"y="0.0"type="priority"/>

<node id="14"x="2000.0"y="-1000.0"type="priority"/>

<node id="15"x="2000.0"y="-2000.0"type="priority"/>

<node id="16"x="2500.0"y="0.0"type="priority"/>

<node id="17"x="2500.0"y="-1000.0"type="priority"/>

<node id="18"x="2500.0"y="-2000.0"type="priority"/>

</nodes>

Next you need to create an edge file. Edge files describe roads/streets and have the extension “.edg.xml”. Within the edges file, each description of a single edge looks like this:

Each edge is unidirectional and starts at the “from”-node and ends at the “to”-node. If a name of one of the nodes can not be referenced (because they have not been defined within the nodes file) an error will be generated when net convert is ran. The edge file for the figure should look like the following:

Create the SUMO Simulation

In order to create a SUMO Simulation you need to create at a minimum a routes file. In order to create a routes file you need to generate trips. SUMO offers the python tool to generate random trips for a given network and outpouts in the specified trips.xml. To run random trips execute to following:

i followed the readme closely, got the code compiled. But while running aodvVANET, i get this
Error in module (cCompoundModule) during network setup: Class “aodvTraCIScenarioManagerLaunchd” not found — perhaps its code was not linked in, or the class wasn’t registered with Register_Class(), or in the case of modules and channels, with Define_Module()/Define_Channel().

Hello, recently I have studied your VANETSim project for the Vehicular Ad Hoc Network simulation but I couldn’t able to run your project correctly. I have tried your project in Ubuntu and Windows 7 according to your instruction. But i am facing same problem in both environment.
Error: ‘Simulating aodvuu’ has encountered a problem. Exception occurred excuting command line. Cannot run program “C:/Users/hrahman/src/VANETSim/src/inet/ined.exe” (in directory “C:/Users/hrahman/src/VANETSim/simulations\aodv\aodvuu”): CreateProcess error=2, The system cannot find the file specified