Baram
Baram

Reputation: 19

How to use small numbers for junction names in sumo?

I am trying to apply shortest path algorithm to vehicles in veins. In my algorithm i am using junctions and edges from map.net.xml, but sumo gives large numbers to junction and edge names. Is there any option to start numbers in map from 0?

Upvotes: 0

Views: 59

Answers (1)

Michael
Michael

Reputation: 3680

This depends on how you create your network. You can either write your own network inputs from SUMO's XML files then you are free to choose whichever ids you want. If you use OpenStreetMap (which is probably the case if you have large numbers as ids) you can apply a prefix to edge and node ids using the --prefix option to make them non-numeric and then in a second run the --numerical-ids option. Please note that this will change the ids for the edges as well. So the process is:

netconvert --prefix a --osm-files osm.xml -o tmp.net.xml
netconvert --numerical-ids -s tmp.net.xml -o final.net.xml

Upvotes: 1

Related Questions