Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Measuring Distances

For pedestrians, there are some tweaks:

1. use traci.simulation.findIntermodalRoute
2. call getShortestPath(..., ignoreDirection=True)
3. encode your query as a person/walk instead of a trip

Am Mi., 20. Nov. 2024 um 07:11 Uhr schrieb Rohan Verma via sumo-user <sumo-user@xxxxxxxxxxx>:
I tried adding pedestrian sidewalks, but they also follow lane directions and hence have the same issues. I also thought to convert the lanes to bi-directional nut given I have a large network, I could not find an easier way to do so.

On Wed, Nov 20, 2024 at 11:12 AM Rohan Verma <rohanverma446@xxxxxxxxx> wrote:
Thank you for getting back to me.
What I am trying to compute is walking distance from parking spaces to the destination polygon. One solution I could think of was to obtain coordinates (manually using Netedit) for parking spaces and destinations and compute the distance. They would, however, give Euclidean distance. Based on what you recommended,  I used Solution 2, which gave me the shortest distance between the "fromNode" of one edge and the "toNode" of another edge. This works for most of the edges. However, the edges adjacent to the destinations use the road network to compute the shortest path. However, as I am trying to calculate the walking distance from parking spaces to the destination polygon, the pedestrian should cross over the lanes and directly reach the destination across the edge.
Is there a way to overcome this problem?
Any help is appreciated.
Thanks and regards,

On Mon, Nov 18, 2024 at 1:22 PM Jakob Erdmann via sumo-user <sumo-user@xxxxxxxxxxx> wrote:
Solution 1:  using TraCI
- traci.simulation.getDistanceRoad

Solution 2: using sumolib:
- sumolib.net.getShortestPath / getFastestPath

Solution 3: using duarouter:
- encode the distance you want to measure as trips (edges and coordinates are supported)
- set the trip to a vType with maxSpeed=1
- read the results from the .rou.alt.xml output file (costs equal distance in m)

Am Mo., 18. Nov. 2024 um 03:45 Uhr schrieb Rohan Verma via sumo-user <sumo-user@xxxxxxxxxxx>:
Dear community,

I have a few destinations in my road network. Some destinations are created as polygons alongside edges, while others are marked on the road edges. I plan on calculating the distance (by road) between these destinations. I could calculate them using the coordinates, but that would give Euclidean distance, not the distance on the road. Since there are multiple destinations, I am not willing to manually do this.
Is there a way to compute these distances? I would greatly appreciate any help.

Thanks and Regards,
Rohan
_______________________________________________
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
_______________________________________________
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