Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] sumolib: Can we find the nearest exit edge?

You can use the function traci.findRoute to determine the distance and travel time to a specific edge. If you define a TAZ called "exits" that includes all exit edges as sinks, you can call findRoute with the target edge "exits-sink" to automatically find the nearest exit. See https://sumo.dlr.de/docs/Definition_of_Vehicles,_Vehicle_Types,_and_Routes.html#traffic_assignement_zones_taz

Am Di., 21. Juli 2020 um 09:15 Uhr schrieb <Melanie.Weber@xxxxxx>:

Hi,

 

Sorry but I don’t have a good idea for that.

 

For example the duarouter gives you the length of routes, so maybe you give them all possible routes and in the result you choose the shortest.

 

Regards,

Melanie

 

Von: sumo-user-bounces@xxxxxxxxxxx [mailto:sumo-user-bounces@xxxxxxxxxxx] Im Auftrag von Padisala, Shanthan Kumar
Gesendet: Montag, 20. Juli 2020 16:25
An: Sumo project User discussions
Betreff: Re: [sumo-user] sumolib: Can we find the nearest exit edge?

 

Hi,

 

Yes, also looked at getNeighboringEdges() function that could give me the closest edges. But is there any other way so that I can get the data on the nearest exit edge?

 

If not, I can figure that out the nearest exit edge by giving the list of all the exit edges manually if I have a function that could calculate the distance to an edge. So, is there any function that could give me the length of the route, if I input the current position and an edgeID?

 

Thanks,

PSK


From: sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx> on behalf of Melanie.Weber@xxxxxx <Melanie.Weber@xxxxxx>
Sent: Monday, July 20, 2020 2:10 AM
To: sumo-user@xxxxxxxxxxx <sumo-user@xxxxxxxxxxx>
Subject: Re: [sumo-user] sumolib: Can we find the nearest exit edge?

 

Hello,

 

maybe getNeighboringEdges(x, y, radius) from sumolib.net will help you. But it not just find the nearest exit edge, it will find every nearest edge.

 

Kind regards,

Melanie

 

 

 

Von: sumo-user-bounces@xxxxxxxxxxx [mailto:sumo-user-bounces@xxxxxxxxxxx] Im Auftrag von Padisala, Shanthan Kumar
Gesendet: Montag, 20. Juli 2020 06:28
An: sumo-user@xxxxxxxxxxx
Betreff: [sumo-user] sumolib: Can we find the nearest exit edge?

 

Hello everyone,

 

I am trying to reroute a vehicle network dynamically and I am planning to make a vehicle to exit the network after a certain waiting time - by rerouting it to the nearest exit edge. I came across sumolib library that looks to have promising functions to help me out to solve my problem. 

 

I would like to know if there is any way to find the nearest exit edge, given x and y coordinates of that vehicle. 

 

Thank you,

PSK

_______________________________________________
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