Guojyjy / CoTV

Cooperative control for traffic light signals and connected autonomous vehicles using deep reinforcement learning
MIT License
57 stars 11 forks source link

Inquiry about Output and Simulation Details in SUMO #11

Open SYCAMORE-1 opened 4 months ago

SYCAMORE-1 commented 4 months ago

Hi Dr.Guo,

I'm interested in analyzing edgedata.out.xml, but I've noticed it isn't generated by default. Could you guide me on how to configure SUMO to include this file as an output?

Additionally, I observed that the SUMO configuration file isn’t explicitly invoked to start the simulation. Could you explain how the simulation is initiated and under what conditions it concludes?

Thank you for your assistance, and I appreciate the effort to make your work open source. Best Rrgards

Guojyjy commented 4 months ago

https://github.com/Guojyjy/CoTV/blob/5ce1a95cc52d7a108294488a701025b488787f07/flow/flow/core/kernel/simulation/traci.py#L160

Here you can edit the command of SUMO simulation, to add --edgedata-output FILENAME

https://github.com/Guojyjy/CoTV/blob/5ce1a95cc52d7a108294488a701025b488787f07/flow/flow/envs/base.py#L173

Call _(re)startsimulation() for the DRL environment reset

Does it make sense? Feel free to ask if you have any more questions.