Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Retrieval of current edge on route using libsumo

Hi,

Thanks for your response, does it mean that traci.vehicle.getRoute returns an ordered  list of the edges on the route? so for the above example it will return A,B,C,A in the same order?

Rehab Shahin
Research Engineer ‑ Transport Modelling and Simulation
rehab.shahin@xxxxxxxxxx
+44(0) 20 3514 1170
 | 
+1 (929) 265‑5193
LinkedIn
Twitter
YouTube
This e-mail is to be treated as confidential and the information in it may not be used or disclosed except for the purpose for which it has been sent. If you have received it by mistake please let us know and delete it from your system. E-mails are not secure and cannot be guaranteed to be error-free as they can be intercepted, amended, lost or destroyed, or contain viruses. 
Hadean Supercomputing Ltd, is registered in England with number 09808169 and has its registered office 9 Appold St, London EC2A 2AP, UK
On Wed, 4 Sept 2024 at 12:33, Jakob Erdmann via sumo-user <sumo-user@xxxxxxxxxxx> wrote:
1., 2. traci.vehicle.getRouteIndex
3. there is no separate API documentation because the API is the same, https://sumo.dlr.de/docs/Libsumo.html

Am Mi., 4. Sept. 2024 um 13:19 Uhr schrieb Rehab Shahin via sumo-user <sumo-user@xxxxxxxxxxx>:
Hi,

I am writing a python script and I'm using libsumo. I have a situation where cars are driving in circles, so an example of the route would be:
A,B,C,A

so if the car is currently on edge A, and if I called libsumo.vehicle.getEdgeID():
1-  how can I know if the car is on the first A or the last A?
2- is there a function to return the index of the edge within the list of edges on the route?
3- where can I find the documentation of the python version of libsumo? I can find the Traci documentation but I need the libsumo documentation to know how to use it in my python script.

Thanks,
Rehab

Rehab Shahin
Research Engineer ‑ Transport Modelling and Simulation
rehab.shahin@xxxxxxxxxx
+44(0) 20 3514 1170
 | 
+1 (929) 265‑5193
LinkedIn
Twitter
YouTube
This e-mail is to be treated as confidential and the information in it may not be used or disclosed except for the purpose for which it has been sent. If you have received it by mistake please let us know and delete it from your system. E-mails are not secure and cannot be guaranteed to be error-free as they can be intercepted, amended, lost or destroyed, or contain viruses. 
Hadean Supercomputing Ltd, is registered in England with number 09808169 and has its registered office 9 Appold St, London EC2A 2AP, UK
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top