here are things that might explain the symptoms
- if the departure times are fractional (can easily happen when running
randomTrips.py) wheras the simultion steps are integer (the default) then
the equality condition will often fail
- if the original route equals the route computed by rerouteEffort, no
rerouting will take place and thus no trac:rerouteEffort is recorded

regards,
Jakob


Am Mo., 18. März 2019 um 14:15 Uhr schrieb Toby Cannon <
[email protected]>:

> Hi SUMO users,
> I'm attempting to reroute all vehicles by effort on the first step they
> enter the simulation.
> I have a list of 273 trips, however, in the vehicle output file only
> around 50 or so are showing reason="traci:rerouteEffort" in their route
> element.
>
> A basic version of my code is below:
> tripInfo is an array consisting of id and depart times for each vehicle
> [[id, depart], [id, depart]...]
> (I've checked tripInfo and there are 273 elements in this as there should
> be)
>
> *while traci.simulation.getMinExpectedNumber() > 0:*
> *        for vehicle in tripInfo:*
> *            if (vehicle[1] +1 == traci.simulation.getTime()): *
> *                traci.vehicle.rerouteEffort(vehicle[0])*
> *        traci.simulationStep()*
> *traci.close()*
>
> Does anyone have any idea on why reason="traci:rerouteEffort" is not being
> shown for all 273 vehicles?
>
> Many thanks,
> Toby
> _______________________________________________
> sumo-user mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
_______________________________________________
sumo-user mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to