Hello,
In short, set the traveltimes using traci.edge.adaptTraveltime() using the
begTime and endTime parameters in order to set time-dependent weights (or
use traci.vehicle.setAdaptedTraveltime() if the values should only apply to
a specific vehicle). Then use traci.vehicle.routeTraveltime(vehID,
currentTravelTimes=False).

A detailed explanation is given here:
http://sumo.dlr.de/wiki/Simulation/Routing
regards,
Jakob

2017-01-23 5:04 GMT+01:00 Hui Xiong Ng <[email protected]>:

> I noticed that calling *rerouteTraveltime*(self, vehID, currentTravelTimes
> =True) does not reroute the vehicles according to the traveltimes set by me
> on *adaptTraveltime*(edge_1, traveltime, begin=0, end=60) .
>
> How can I reroute vehicles according to the traveltime I had custom set on
> *adaptTraveltime() *?
>
> On Sat, Jan 21, 2017 at 5:50 PM, Hui Xiong Ng <[email protected]>
> wrote:
>
> >
> > *BACKGROUND*
> >
> > I am trying to calculate my own traveltime based on some custom logical
> > algorithm.
> >
> > The period of each traveltime is 60s. e.g. Every 60s, the traveltime of
> > all edges in the network will change.
> >
> > I used *adaptTraveltime*(self, edgeID, time, begin=None, end=None) to set
> > all the traveltime for all the period at the start of my simulation.
> >
> > Example,
> > *adaptTraveltime*(edge_1, traveltime, begin=0, end=60)
> > *adaptTraveltime*(edge_1, traveltime, begin=60, end=120)
> > *adaptTraveltime*(edge_1, traveltime, begin=120, end=180)
> > ...
> > *adaptTraveltime*(edge_1, traveltime, begin=7140, end=7200)
> >
> > Repeat the above for all the edges in the network. 7200 being the last
> > time step of the simulation
> >
> >
> >
> >
> > *Here comes the question.*
> >
> > I am confused by the documentation of *rerouteTraveltime*(self, vehID,
> > currentTravelTimes=True)
> >
> > How should I call the rerouteTraveltime method to reroute all the
> vehicles
> > that were departed per timestep such that all the vehicles will take into
> > account the traveltime of edges at the arrived timestep instead of only
> > during the point of rerouting.
> >
> > I am confused by what does the parameter currentTravelTimes does. Since I
> > have set the traveltime via *adaptTraveltime  *shouldn't traCI now route
> > based on it? What is the different between setting currentTravelTimes  to
> > false and true?
> >
> > Thank you.
> >
> >
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to