Dear SUMO users, hello
I want vehicles to reroute according to the current road conditions probabilistically during the simulation with traci Python.
Also, I would like to modify the weight used for reroute to edgeEffort.
The code of traci Python I wrote is as follows.
while step < 86400:
traci.simulationStep()
if traci.simulation.getTime() % 360 == 0:
for edge in edges:
if edge.getID() in tazlist:
traci.edge.setEffort(edge.getID(), traci.edge.getTraveltime(edge.getID()) + 30)
else:
traci.edge.setEffort(edge.getID(), traci.edge.getTraveltime(edge.getID()))
for vehId in traci.simulation.getDepartedIDList():
traci.vehicle.rerouteEffort(vehId)
step += 1
I am not sure how the code written in <routing> in sumo.cfg is applied together with the rerouteEffort written in traci Python, and how to apply it through traci Python. I want the following codes to be applied.
weights.random-factor
device.rerouting.period,
device.rerouting.adaptation-steps,
device.rerouting.adaptation-interval,
device.rerouting.with-taz,
device.rerouting.threads,
device.rerouting.synchronize,
You have reviewed my question, thank you very much. I hope you have a great day ahead.
Thank you.