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

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:

– 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:

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:

After creating the node and edge file you can now run NETCONVERT.

NETGENERATE

NETGENERATE allows you to build three types of abstract networks: grid-networks, spider-networks and random networks. In this case we will create a grid-network.

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:

After creating the trips.xml you need to convert the trips to routes

Finally the last part is to configure the simulation by specifying the network, routes and duration in a config file

References

  • D. Krajzewicz, J. Erdmann, M. Behrisch, and L. Bieker, \Recent development and applications of SUMO – Simulation of Urban MObility,” International Journal On Advances in Systems and Measurements, vol. 5, no. 3&4, pp. 128{138, December 2012. [Online]. Available: http://elib.dlr.de/80483/

8 Comments

  1. illuminus

    Hey, VANETSim is beautiful. I studied the code sturcture but I couldnt get it to build. Please reply. need help

    Reply
  2. chaotictoejam (Post author)

    Did you review the ReadMe file on github?

    This is a working project so it does get updated almost daily but be sure to have https://github.com/jlsirois/inetmanet-2.0 and reference it to the project.

    Reply
    1. illuminus

      i did follow the read me, but i get a aodvTraCIScenarioLaunchd not found error, do you know any fix?
      Is it a common error?
      It would be a great favour if we could exchange some mails.

      Reply
      1. illuminus

        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().

        Reply
  3. illuminus

    *aodvTraCIScenarioManagerLaunchd.
    it asks me to register with Define_Module(), which is already present in code.

    Reply
  4. chaotictoejam (Post author)

    illuminus you still have a problem, please contact me through github.

    Reply
  5. James

    hey,
    i was looking at your repo on github. You haven’t updated it for a long time. Any chance I can get the code? It’s for research purpose.
    Thanks

    Reply
  6. Habib

    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

    Thanks in advance.
    Habib

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *