Pi-Star-Lab / RESCO

Reinforcement Learning Benchmarks for Traffic Signal Control (RESCO)
116 stars 36 forks source link

Delay calculation #24

Closed MagMueller closed 2 months ago

MagMueller commented 5 months ago

I want to benchmark in a paper against your models.

How do you calculate the delays, which you plot in your Readme? Is this just the sum of all wait times of each lane for the whole simulation and the divided through the number of cars in the end? Where can I find that?

jault commented 5 months ago

Yes, it's the sum of delay (timeLoss) divided by the total number of cars including cars which were unable to spawn (departDelay).

See here for more descriptions of SUMOs output: https://sumo.dlr.de/docs/Simulation/Output/TripInfo.html

The logging function included in /utils/ right now is a bit rough, you need to run readXML.py first, which outputs to the avg_*.py files. I'm currently working on a large update to RESCO so I have created a new graphing/logging function. I still need to test those changes those. Try the graph.py included here (you'll need to set the log_dir variable).

graph.zip