Thank you Jakob,

What would happen if a reroute is called and one of the edges in the map
has not being loaded? Would that cost be considered 0 or
max_lane_speed/lane_length?

Regards,

Wilmer


On Wed, Mar 26, 2014 at 6:33 PM, Jakob Erdmann
<[email protected]>wrote:

> Hello,
> I just updated the pydoc documentation because it was misleading. The
> python API method
> traci.vehicle.rerouteTraveltime works like this:
>
> def rerouteTraveltime(vehID, currentTravelTimes = True):
>     """rerouteTraveltime(string, bool) -> None Reroutes a vehicle. If
>     currentTravelTimes is True (default) then the current traveltime of the
>     edges is loaded and used for rerouting. If currentTravelTimes is False,
>     travel times loaded from a weight file are used. In the absence of
> loaded
>     weights, the minimum travel time is used (speed limit).
>     """
>
> The plain TraCI API call reroute (compute new route) by travel time (0x90)
> only routes using loaded weights. You can load weights which only apply to
> a single vehicle using command change edge travel time information (0x58)
>
> regards,
> Jakob
>
>
> 2014-03-26 18:45 GMT+01:00 Wilmer Arellano <[email protected]>:
>
>> Sorry, Forgot to send to the group
>>
>>
>> Hello,
>>
>> Is this still the way this command works?
>>
>>
>>  "the method traci.vehicle.rerouteTraveltime does not employ current
>> travel
>> times but rather uses loaded travel times (similar to loaded efforts). *In
>>
>> the absence of loaded travel times the minimum travel time (length/speed)
>> is used*
>>
>>
>> The online documentation is confusing as it says:
>>
>>  "Computes a new route using the vehicle's internal *and the global edge
>> travel time information.*"
>>
>>
>> Thank you,
>>
>> Wilmer
>>
>>
>> On Fri, Mar 29, 2013 at 9:23 AM, Jakob Erdmann
>> <[email protected]>wrote:
>>
>> > 1). Surprisingly (to mysell at least) the method
>> > traci.vehicle.rerouteTraveltime does not employ current travel times but
>> > rather uses loaded travel times (similar to loaded efforts). In the
>> absence
>> > of loaded travel times the minimum travel time (length/speed) is used.
>> > There are 2 workarounds:
>> > a) equip your vehicles with rerouting devices (see
>> > tests/sumo/extended/simulation_routing
>> > b) update the traveltimes via traci:
>> >       for edge in traci.edge.getIDList():
>> >
>> >  traci.edge.adaptTraveltime(edge, traci.edge.getTraveltime(edge))
>> >   this uses the fact that traci.edge.getTraveltime returns the *current*
>> > traveltime
>> >   Unfortuantely, due to
>> https://sourceforge.net/apps/trac/sumo/ticket/878this doesn't work at
>> the moment.
>>
>> >
>> > 2). many sumo outputs have the correct format to be used as weight
>> files.
>> > see
>> > tests/sumo/outputs/meandata_edgebased
>> >
>> >
>> > regards,
>> > Jakob
>> >
>> >
>> > 2013/3/29 Wilmer Arellano <[email protected]>
>> >
>> >> Thank you Jakob, two last questions:
>> >>
>> >>
>> >>    1. Why doesn't the reroute by minimum time work in my example?
>> >>    2. Any link to how to create weight files?
>>
>> >>
>> >>
>> >> Wilmer
>> >>
>> >> On Fri, Mar 29, 2013 at 5:37 AM, Jakob Erdmann <
>> >> [email protected]> wrote:
>> >>
>> >>> Hello,
>> >>> routing by effort in the simulation only works if you start sumo with
>> >>> a weight file and declare which of the attributes in this file shall
>> >>> be interpreted as effort (options --weight-files, --weight-attribute).
>> >>> Otherwise every edge has effort 0.
>> >>> regards,
>> >>> Jakob
>> >>>
>> >>> 2013/3/29 Wilmer Arellano <[email protected]>:
>> >>> > Hello,
>> >>> >
>> >>> >
>> >>> >
>> >>> > I am sorry to post this topic again but I am having
>> >>> > some difficulties understanding reroutes in TraCI.
>> >>> >
>> >>> >
>> >>> >
>> >>> > I am attaching a zip file that when expanded will contain runner3.py
>> >>> and a
>> >>> > folder with the network files, the simulation works this way:
>> >>> >
>> >>> >    1. runner3.py will start the simulation which consists of cars
>> >>> initially
>> >>> >    routed to go from south to north using the center of a
>> rectangular
>> >>> grid
>> >>> >    network.
>> >>> >    2. The first car is set to stop and all following cars,  after t
>> =
>> >>> 20
>> >>> >    seconds, are rerouted with either* traci.vehicle.rerouteEffort()*
>> >>> or *
>> >>> >    traci.vehicle.rerouteTraveltime()*.
>> >>> >    3. In order to select what kind of reroute to use the #  sign
>> shuld
>> >>> be
>> >>> >    changed from on type of reroute to the other in the following
>> block
>> >>> of code
>> >>> >    in runner3.py
>> >>> >
>> >>> > if time > 20000:
>> >>> >
>> >>> > traci.vehicle.rerouteEffort(carList[0])
>> >>> >
>> >>> > #traci.vehicle.rerouteTraveltime(carList[0])
>> >>> >
>> >>> >
>> >>> >
>> >>> > 4.    In order to see the original routing of the cars, the previous
>> >>> block
>> >>> > of code and the instruction: traci.vehicle.setStop("0", "2/2to2/3",
>> >>> > pos=20.0, laneIndex=0, duration=2147483647)should be eliminated
>> >>> >
>> >>> >
>> >>> >
>> >>> > Results
>> >>> >
>> >>> >    1. traci.vehicle.rerouteTraveltime() appears not to work as no
>> route
>> >>> >    change happens even though DijkstraRouterTT respond the queries.
>> >>> >    2. traci.vehicle.rerouteEffort() seems to work OK even though in
>> the
>> >>> >    example that I provide it provides the same rerouted route to all
>> >>> vehicles
>> >>> >    and that route is not the shortest.
>> >>> >
>> >>> > Intuitively I would expect "traci.vehicle.rerouteEffort()" to
>> provide
>> >>> the
>> >>> > alternate shortest route and "traci.vehicle.rerouteTraveltime()" to
>> >>> produce
>> >>> > the alternate fastest route.
>> >>> >
>> >>> >
>> >>> > Is there any thing wrong in my interpretation? Help is greatly
>> >>> appreciated.
>> >>> >
>> >>> >
>> >>> >
>> >>> > Thank you,
>> >>> >
>> >>> >
>> >>> > Wilmer
>> >>> >
>> >>> >
>> >>>
>> ------------------------------------------------------------------------------
>> >>> > Own the Future-Intel(R) Level Up Game Demo Contest 2013
>> >>> > Rise to greatness in Intel's independent game demo contest. Compete
>> >>> > for recognition, cash, and the chance to get your game on Steam.
>> >>> > $5K grand prize plus 10 genre and skill prizes. Submit your demo
>> >>> > by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
>> >>> > _______________________________________________
>> >>> > sumo-user mailing list
>> >>> > [email protected]
>> >>> > https://lists.sourceforge.net/lists/listinfo/sumo-user
>> >>> >
>> >>>
>> >>
>> >>
>> >
>>
>> ------------------------------------------------------------------------------
>> Learn Graph Databases - Download FREE O'Reilly Book
>> "Graph Databases" is the definitive new guide to graph databases and their
>> applications. Written by three acclaimed leaders in the field,
>> this first edition is now available. Download your free book today!
>> http://p.sf.net/sfu/13534_NeoTech
>>
>> _______________________________________________
>> sumo-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/sumo-user
>>
>
>
------------------------------------------------------------------------------
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to