Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Calculate time to get to junction

you can use traci.vehicle.getDrivingDistance(self, vehID, edgeID, pos, laneIndex) to compute the distance to an upcoming position on the vehicles route.
You would just need to know the edge that is incoming the the desired junction.
If the position is not on the route, you can use traci.simulation.findRoute
If you are only interested in traffic light junctions, you can also use traci.vehicle.getNextTLS which includes among other information the distance.
The naive calculation of time=distance/speed will only give a lower bound for non-priority junctions because vehicles will always decelerate on approach.

2018-07-29 19:41 GMT+02:00 Jose Monreal Bailey <jmonreal@xxxxxxxxx>:
I am interested in calculating the time for vehicle A to get to junction  B1 from B0 at speed V0.
I still do not have the acceleration/deceleration factors.
I want to keep it simple for now, and from there start adding more complexity.

Best regards,
José

On Sun, 29 Jul 2018 at 18:28, Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
This ranges from trivial to complex depending on your assumptions regarding vehicle speed.
Do you aim at figuring out the distance to the next junction or are you interested in the formulas that include acceleration/deceleration?

2018-07-29 18:38 GMT+02:00 Jose Monreal Bailey <jmonreal@xxxxxxxxx>:
Hi everyone,

How can I calculate the necessary time for a vehicle to get to the next junction?

Best regards,
José

_______________________________________________
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


_______________________________________________
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

_______________________________________________
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