[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sumo-user] Reroute by Effort
|
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/