Hello,
The difference between setting parameter currentTravelTimes to True or
False is only apparent when there is congestion in the network.
With 'False', empty-network travel times are used (or times loaded via
option --weight-files).
With 'True', travel times are set to current average travel times on each
edge (the value of edge.getTraveltime(). Note, that this may be quite
volatile due to traffic lights and other effects.

The issue with begin and end time of addapted traveltime is, that the
routing algorithm uses time-dependend weights:
If edge is fast now but it is already known that it will be congested in 5
minutes, than the vehicle will try to avoid routes that go past that edge
by the 5 minute mark (taking travel time along that route into account).
Therefore a time window of 1 second takes no effect.

You can reset the traveltime of an edge by calling
setAdaptedTraveltime(vehID, edgeID). I suggest you keep a list of edges
that you modified and reset this list after you are done with rerouting.
Unfortunately, there is no simpler way at the moment.

regards,
Jakob







2018-04-07 4:09 GMT+02:00 Jonathan Harper <jonathan.v.har...@gmail.com>:

> Hello,
>
>
>
> I’m using Traci to interface with SUMO. I’m currently trying to reroute
> vehicles based on travel time, to do this I’ve decided to change the
> vehicle’s travel time for an edge using setAdaptedTraveltime() and then
> rerouting using vehicle.rerouteTravelTime().
>
> I’ve noticed there’s been a few questions asked about this method, but I
> am still unsure what this really means; could you provide an explanation as
> to what exactly the difference between true and false is? Whenever I run it
> I find there is no difference whether this is True or False as the same
> route is always given.
>
>
>
> Furthermore, is there an easy way to remove all of the adaptedTraveltime’s
> for each of the edges (in the vehicle’s internal memory) such that all
> travel times reset to their global settings (edge.getTraveltime())? I’m
> aware there’s a begin and end to setAdaptedTraveltime(), the issue is that
> if the beginning is say the current time and the end is current time + 1,
> and at the same point you reroute based on travel time, you’d think that
> the vehicle would change route (as it has those settings loaded) when
> calling rerouteTraveltime(), but I’ve found that the vehicle only really
> reacts to this if the endTime is after the end of the route journey time.
> Is there any way to simply set a traveltime for the step you are taking so
> that you can compute an alternative route and have all of the settings turn
> back to the global once the next simulationStep takes place?
>
>
>
> Kind regards,
>
> Jonathan
>
>
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>  Virus-free.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
> <#m_2261575823861827392_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> _______________________________________________
> 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