cityflow-project / CityFlow

A Multi-Agent Reinforcement Learning Environment for Large Scale City Traffic Scenario
https://cityflow-project.github.io
Apache License 2.0
784 stars 171 forks source link

traffic lightphases and time value in roadnet #149

Closed happy956 closed 1 year ago

happy956 commented 2 years ago

"trafficLight": { "roadLinkIndices": [ 0, 1, 2, 3, 4, 5, 6, 7 ], "lightphases": [ { "time": 5, "availableRoadLinks": [] }, { "time": 30, "availableRoadLinks": [ 0, 4 ] }, { "time": 30, "availableRoadLinks": [ 2, 7 ] }, { "time": 30, "availableRoadLinks": [ 1, 5 ] }, { "time": 30, "availableRoadLinks": [ 3, 6 ] }, { "time": 30, "availableRoadLinks": [ 0, 1 ] }, { "time": 30, "availableRoadLinks": [ 4, 5 ] }, { "time": 30, "availableRoadLinks": [ 2, 3 ] }, { "time": 30, "availableRoadLinks": [ 6, 7 ] } ] }

first, here is base settings in A like above dictionary format. But i'm not understand order about road index in availableRoadLinks. second, when Python API use, time value is not working

thanks.

Sheagu commented 2 years ago

"roadLinkIndices" correspond to indices of "intersections"/"roadLinks"