Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Reroute by Effort

To my great regret, the rerouting device cannot see into the future, thus it's estimate of future travel times is often wrong and leads to imperfect route choices. This allows for other algorithms to improve on travel times.

Am Di., 22. Sept. 2020 um 16:45 Uhr schrieb marcelreppi <marcelreppi@xxxxxxxxx>:
Thank you very much for your help, Jakob.

I have implemented this behavior with a little twist.
Instead of using /traci.edge.getTraveltime(eid)/ I used
/traci.vehicle.getParameter(random_vid, f"device.rerouting.edge:{eid}")/ so
that I get more recent and updated traveltimes.
So the final code looks something like this:

current_traveltime = traci.vehicle.getParameter(random_vid,
f"device.rerouting.edge:{eid}")
custom_effort = get_custom_effort(eid) (always >= 0)
traci.edge.setEffort(eid, current_traveltime + custom_effort)
traci.vehicle.rerouteEffort(vid)


I had one baseline simulation where vehicles were just using their
device.rerouting to find the optimal route.
Then I had an experiment simulation where the procedure above was used to
add my custom effort to the route optimization.
During my evaluation, however, I noticed something weird.
Some vehicles that I rerouted with /traci.vehicle.rerouteEffort(vid)/ in the
experiment scenario suddenly had a *shorter trip duration* and I am
wondering how that can happen.
Do you have any idea?

Best regards
Marcel




--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top