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 <jmonr...@gmail.com>:

> 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.s...@gmail.com> 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 <jmonr...@gmail.com>:
>>
>>> 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@eclipse.org
>>> 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@eclipse.org
>> 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@eclipse.org
> 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@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user

Reply via email to