Thanks Jakob! Yeah, that seems too simple, as there are vehicles stopping at a red light, their speed is 0, it will not give an accurate time when moving. Any ideas on how to process those type of situations?
Best regards, José On Sun, 29 Jul 2018 at 21:18, Jakob Erdmann <[email protected]> wrote: > 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 <[email protected]>: > >> 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 <[email protected]> >> 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 <[email protected]>: >>> >>>> 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 >>>> [email protected] >>>> 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 >>> [email protected] >>> 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 >> [email protected] >> 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 > [email protected] > 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 [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/sumo-user
