Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Alternative routes travel time

Hello,
there is currently no direct way to retrieve this.
However, you can simply save the current route (list of edges) to a variable, reroute, retrieve the new list of edges, compare and then restore the old list of edges if the new route does not suite you.
To obtain the travel time for a list of edges you can call traci.edge.getTraveltime() for each of them.
Note, that this returns the travel time based on current mean speeds which may be quite volatile. In particular for edges ahead of traffic lights.

If the vehicle is equipped with a rerouting device, automated rerouting will use aggregated weights with a configurable aggregation method (http://sumo.dlr.de/wiki/Demand/Automatic_Routing#Edge_weights). This overcomes the aforementioned volatility issue.
Using the very latest development version (25806) the corresponding travel times for the rerouting device may be retrieved (http://sumo.dlr.de/wiki/TraCI/Vehicle_Value_Retrieval#Supported_Device_Parameters). However, it is currently not possible to trigger routing using these weights directly via TraCI. (see http://sumo.dlr.de/trac.wsgi/ticket/3383). At the moment they are only used with automatic rerouting.

regards,
Jakob

2017-09-03 2:48 GMT+02:00 Arezoo Samimi via sumo-user <sumo-user@xxxxxxxxxxxxxxxxxxxxx>:
Hello,

Is there anyway to get the travel time of current and alternative routes
for each vehicle before rerouting using TraCI?

Regards,
Arezoo
------------------------------------------------------------------------------
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
sumo-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/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