Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] How to get number of lanes of an edge in sumo via traci for matlab?

Quite so. But if you cannot use sumolib, you may still look through the list of *all* lanes in the network to find those that start with the same ID as the edge you want and then find the highest index..

2017-09-17 3:03 GMT+02:00 Lawrence Soon <lawrencesoon86@xxxxxxxxxxx>:

Hi Jakob,


Thanks for you email. However, the traci.lane.getIDList()  will only prompt the total number of lanes in the network, but not the number of lanes of a particular edge. 

getIDList Get the IDs of the lanes in the network.
    IDList = getIDList() Returns a cell array of strings containing the IDs
    of the lanes in the SUMO network.
Do you know how to get the number of lanes of a particular edge?




From: Jakob Erdmann <namdre.sumo@xxxxxxxxxxxxxx>
Sent: Sunday, September 17, 2017 6:39 AM
To: Lawrence Soon; Sumo project User discussions
Subject: Re: [sumo-user] How to get number of lanes of an edge in sumo via traci for matlab?
 
Hello,
for static network analysis you are better of using sumlib (or sumolib4matlab). However, you could call traci.lane.getIDList() and check for the highest index of the form <EDGEID>_<INDEX> in that list (subtract 1 to get the number of lanes because it starts with lane 0).
regards,
Jakob

2017-09-16 17:07 GMT+02:00 Lawrence Soon via sumo-user <sumo-user@lists.sourceforge.net>:
I browsed thro traci functions and I could not find a way to do so. How to get number of lanes of an edge in sumo via traci for matlab?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxxxxxxxxxxxt
https://lists.sourceforge.net/lists/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user



Back to the top