Hello Marcel,
I can confirm the crash when setting period to 0 (
https://github.com/eclipse/sumo/issues/7064).
However, setting it to other values is working as expected in my test. Can
you provide a minimum error case (i.e. a single vehicle that reroutes too
often?).
In my test I used a single vehicle that travels diagonally across a grid
network.
By setting sumo option --weights.random-factor 10 the vehicle will reroute
in every period (because the weights change wildly).
This makes that effect of a changed period highly visible in the
vehroute-output.

regards,
Jakob

Am Sa., 23. Mai 2020 um 19:23 Uhr schrieb marcelreppi <marcelre...@gmail.com
>:

> I have experimented some more with my code to find the issue.
> I feel like I have found the problem but I am not 100% sure.
>
> My SUMO config has the following parameters at the start of the simulation:
>
> *<routing>
>     <device.rerouting.probability value="1.0"/>
>     <device.rerouting.period value="300"/>
> </routing>*
>
> During the simulation I am trying to "turn off" the rerouting device for
> some vehicles so I used the following TraCI function:
>
> *traci.vehicle.setParameter(vid, "device.rerouting.period", "0")*
>
> It seems that setting it to 0 somehow causes the unexpected error.
> When I changed it to
>
> *traci.vehicle.setParameter(vid, "device.rerouting.period", "99999")*
>
> everything seems to be working fine but the desired behavior (prevent
> dynamic rerouting for specific vehicles) is not happening anymore!
> It seems that setting "device.rerouting.period" to a different value has no
> effect because I can see in the "vehroute-output" that vehicles are still
> being rerouting by the device with the initial period value.
>
> Here is an example:
>
> This is a snippet of my code for rerouting:
>
> *# Do some travel time adaptation to some edges
> ...
> traci.vehicle.rerouteTraveltime(vid, False)
> # Disable rerouting through the rerouting device so that vehicle will stay
> on this route
> traci.vehicle.setParameter(vid, "device.rerouting.period", "99999")*
>
> In the "vehroute-output" I still see the following (note the attributes
> "reason" and "replacedAtTime"):
>
> *<vehicle id="106840401_5" depart="120.00" color="red" arrival="750.00"
> routeLength="6181.50">
>     <routeDistribution>
>         <route cost="528.38" savings="0.00" replacedOnEdge="-8590558"
> reason="traci:rerouteTraveltime" replacedAtTime="121.00" probability="0"
> edges="..."/>
>         <route cost="606.71" savings="899819.02"
> replacedOnEdge="-4409396#2"
> reason="device.rerouting" replacedAtTime="420.00" probability="0"
> edges="..."/>
>         <route cost="287.47" savings="75.74" edges="..."/>
>     </routeDistribution>
> </vehicle>*
>
> I thought this would work based on the documentation I read here:
> https://sumo.dlr.de/docs/Demand/Automatic_Routing.html#traci
>
> Is there a different/recommended way for disabling periodic rerouting for
> specific vehicles?
>
> Thank you very much!
>
> Best regards
> Marcel
>
>
>
> --
> Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
> _______________________________________________
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
_______________________________________________
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to