Pi-Star-Lab / RESCO

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

Question about the calculation of 'arrivals' and 'departures' in full_observation #13

Closed yuanzhi0515 closed 1 year ago

yuanzhi0515 commented 1 year ago

Hi, thank you for sharing the code. I have a question about the calculation of 'arrivals' and 'departures' in traffic_signal.Signal.observe. I think the 'arrivals' means the new vehicles in the lane, so why the 'arrivals' is calculated by self.last_step_vehicles.difference(all_vehicles) rather than all_vehicles.difference(self.last_step_vehicles)? Thanks! https://github.com/Pi-Star-Lab/RESCO/blob/dc773abca1885d961a1aada800d67ac74781b1ba/resco_benchmark/traffic_signal.py#L226-L229

jault commented 1 year ago

Thanks for bringing this up! You are correct, this has been corrected in https://github.com/Pi-Star-Lab/RESCO/commit/bc0f5c899cb03f8a7a6e50b4bd64ac116ce2f69a