1

I have a mobility model created by SUMO with area around 2 KM * 2 Km for real map. I want to compute the results for only part of this model. I read that I can use roiroad or roirect. Roirect take (x1,y1-x2,y2) as Traci coordination, however, I want to use roiroad to take exactly the cars in specific road.

My question is: if the roiroad function take a string of road name , from where in sumo that I can get this value. should I construct the map again with Netconvert and using --output-street-names

phdstudent
  • 41
  • 6

1 Answers1

0

Edges in SUMO always have an ID. It is stored in the id="..." attribute of the <edge> tag. If you convert a network from some other data format (say, OpenStreetMap) to SUMO's XML representation, you have the option to try and use an ID that closely resembles the road name the edge represents (this is the option you mentioned). The default is to allocate a numeric ID.

Other than by opening the road network XML file in a text editor, you can also find the edge ID by opening the network in the SUMO GUI and right clicking on the edge (or by enabling the rendering of edge IDs in the GUI).

Note that, depending on the application you simulate, you will need to make sure that you have no "gaps" in the Regions Of Interest (ROIs) you specify. When a vehicle is no longer in the ROI its corresponding node is removed from the network simulation. Even if the same vehicle later enters another (or the same) ROI, a brand new node will be created. This is particularly important when specifying edges as ROI (via the roiRoads parameter). Keep in mind that SUMO uses edges not just to represent streets, but also to represent lanes crossing intersections. If you do not specify these internal edges, your ROIs will have small gaps at every intersection.

Note also that up until OMNeT++ 5.0, syntax highlighting of the .ini file in the IDE will (mistakenly) display a string containing a # character as if it were a comment. This is just a problem with the syntax highlighting. The simulation will behave as expected. For example, setting the roiRoads parameter to "-5445204#1 :252726232_7 -5445204#2" in the Veins 4.4 example as follows...

screenshot

...will result in a Veins simulation where only cars on one of the following three edges are simulated:

  • on the edge leading to the below intersection; or
  • on the edge crossing the below intersection; or
  • on the edge leaving the below intersection.

screenshot

Christoph Sommer
  • 6,893
  • 1
  • 17
  • 35
  • Thank you Dr.Christoph for your useful answer and support. I check the net file and get the edge id =158922809#0 lane id="158922809#0_0" and lane id ="158922809#0_1" my question is how I can send the id with '#' sign in Roiroad function , it represent the comment sign – phdstudent Aug 15 '16 at 02:42
  • `*.manager.roiRoads ="158922809#0 158922809#1 158922809#2 158922809#3 158922809#4"` I use these id's but # sign change them to comment , I try to use 158922809 I thought that it take all the parts but it give nothing during simulation – phdstudent Aug 15 '16 at 03:17
  • I have amended my answer to address the issue of the OMNeT++ IDE (incorrectly) highlighting part of the string as comment. – Christoph Sommer Aug 16 '16 at 07:56
  • Thank you a lot Dr.Christoph, it work now and present only the cars that pass on the detected edge. – phdstudent Aug 23 '16 at 10:35
  • Maybe, you want to accept this answer as the solution to mark your question as answered. Therefore, this post can be more effective for helping people with a similar problem. – Julian Heinovski Oct 10 '17 at 14:28