Closed WaterFountain-Jack closed 7 months ago
try to change the code in AnonEnv.reset
, use CityFlow's reset API.
also, the author of MPLight might be more familiar with the AnonEnv class, you can create a issue there
Ok,thank you for your answer!!
Sorry to bother you again!
I met a problom is that when I run env.reset() after set the "roadnetFile": "manhattan.json" and "flowFile": "manhattan_7846.json" (It can run) ,but an error is reported : Traceback (most recent call last): File "/tmp/pycharm_project_764/test_script.py", line 71, in
env.reset()
File "/tmp/pycharm_project_764/anon_env.py", line 751, in reset
self.traffic_light_node_dict = self._adjacency_extraction()
File "/tmp/pycharm_project_764/anon_env.py", line 1440, in _adjacency_extraction
if edge_id_dict[road_id]['to'] not in traffic_light_node_dict.keys():
KeyError: '100522479_0'
By the way I also found that I can't get some attributes like:NUM_ROW,NUM_COL from manhattan data.
Can u give my some suggestions to solve it,please? Maybe should I wirte a new anon_env.py or modify some original code or use the sumo enviorment?
Thank u very very much!!!!!