ZhuHanyuSTU / Joint-traffic-light-control-and-vehicle-rerouting

Simulation code of paper "H. Zhu, Z. Wang, F. Yang, Y. Zhou and X. Luo, "Intelligent Traffic Network Control in the Era of Internet of Vehicles," in IEEE Transactions on Vehicular Technology, vol. 70, no. 10, pp. 9787-9802, Oct. 2021, doi: 10.1109/TVT.2021.3105478."
MIT License
9 stars 3 forks source link

Missing files #1

Open TrinhTuanHung2021 opened 2 years ago

TrinhTuanHung2021 commented 2 years ago

Hello

Thank you for sharing your code. I had errors when running python main.py

Traceback (most recent call last): File "/home/osboxes/Desktop/Joint-traffic-light-control-and-vehicle-rerouting/main.py", line 110, in os.path.join(path_set.PATH_TO_OUTPUT, 'TD3_torch_network.py')) File "/home/osboxes/anaconda3/envs/Hung/lib/python3.7/shutil.py", line 248, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "/home/osboxes/anaconda3/envs/Hung/lib/python3.7/shutil.py", line 120, in copyfile with open(src, 'rb') as fsrc: FileNotFoundError: [Errno 2] No such file or directory: '/home/osboxes/Desktop/Joint-traffic-light-control-and-vehicle-rerouting/TD3_torch_network.py'

ZhuHanyuSTU commented 1 year ago

Hello,

Actually, "TD3_torch_network.py" is the previous name of the "main.py". Before sharing the code, "TD3_torch_network.py" is changed to "main.py". However, the code in the file mistakenly remains unchanged. Hence, the problem can be solved by replacing the "TD3_torch_network.py" with "main.py".

Thanks. Hanyu Zhu Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: TrinhTuanHung2021 @.> Sent: Thursday, August 25, 2022 10:12:38 AM To: ZhuHanyuSTU/Joint-traffic-light-control-and-vehicle-rerouting @.> Cc: Subscribed @.***> Subject: [ZhuHanyuSTU/Joint-traffic-light-control-and-vehicle-rerouting] Missing files (Issue #1)

Hello

Thank you for sharing your code. I had errors when running python main.py

Traceback (most recent call last): File "/home/osboxes/Desktop/Joint-traffic-light-control-and-vehicle-rerouting/main.py", line 110, in os.path.join(path_set.PATH_TO_OUTPUT, 'TD3_torch_network.py')) File "/home/osboxes/anaconda3/envs/Hung/lib/python3.7/shutil.py", line 248, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "/home/osboxes/anaconda3/envs/Hung/lib/python3.7/shutil.py", line 120, in copyfile with open(src, 'rb') as fsrc: FileNotFoundError: [Errno 2] No such file or directory: '/home/osboxes/Desktop/Joint-traffic-light-control-and-vehicle-rerouting/TD3_torch_network.py'

― Reply to this email directly, view it on GitHubhttps://github.com/ZhuHanyuSTU/Joint-traffic-light-control-and-vehicle-rerouting/issues/1, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKQBKAOBUHWMJOTBKXYLJODV23JBNANCNFSM57RL5KHQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

TrinhTuanHung2021 commented 1 year ago

Hello, Actually, "TD3_torch_network.py" is the previous name of the "main.py". Before sharing the code, "TD3_torch_network.py" is changed to "main.py". However, the code in the file mistakenly remains unchanged. Hence, the problem can be solved by replacing the "TD3_torch_network.py" with "main.py". Thanks. Hanyu Zhu Get Outlook for Androidhttps://aka.ms/AAb9ysg ____ Q>. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Thank you for replying to me! I changed TD3_torch_network.py to main.py and run python main.py. It had another error

FileNotFoundError: [Errno 2] No such file or directory: 'c:\Users\PKNU\Desktop\Joint-traffic-light-control-and-vehicle-rerouting\Joint-traffic-light-control-and-vehicle-rerouting\SUMOAgent_reviseTT_revise0207_tryNewR.py'

I changed SUMOAgent_reviseTT_revise0207_tryNewR to SUMOAgent_reviseTT_revise0210 in main.py an can run your model!

Thank you very much!

TrinhTuanHung2021 commented 1 year ago

Hello, Actually, "TD3_torch_network.py" is the previous name of the "main.py". Before sharing the code, "TD3_torch_network.py" is changed to "main.py". However, the code in the file mistakenly remains unchanged. Hence, the problem can be solved by replacing the "TD3_torch_network.py" with "main.py". Thanks. Hanyu Zhu Get Outlook for Androidhttps://aka.ms/AAb9ysg ___KHQ>. You are receiving this because you are subscribed to this thread.Message ID: @.***>

After 2 days, the model finish. But I did not get any results. Could you tell me how to get the saved files or trained file?

eval_Episode Step 139, Action, [ 0.0009 0.0093 0.9889 0.0009], [ 0.0117 0.4999 0.0000 0.4915], Reward, -0.1207 Simulation ended at time: 4200.00 Reason: TraCI requested termination. Performance: Duration: 267.65s TraCI-Duration: 259.49s Real time factor: 15.6923 UPS: 4593.957713 Vehicles: Inserted: 5805 Running: 306 Waiting: 0

DijkstraRouter answered 16578 queries and explored 2.79 edges on average. DijkstraRouter spent 0.04s answering queries (0.00ms on average).

Pakistan123t commented 4 months ago

C:\Users\Administrator\AppData\Local\Programs\Python\Python311\python.exe C:\Users\Administrator\Downloads\Joint-traffic-light-control-and-vehicle-rerouting-main\Joint-traffic-light-control-and-vehicle-rerouting-main\main.py win32 Traceback (most recent call last): File "C:\Users\Administrator\Downloads\Joint-traffic-light-control-and-vehicle-rerouting-main\Joint-traffic-light-control-and-vehicle-rerouting-main\main.py", line 323, in sumo_agent = SUMO_Agent(sumo_cmd_str, path_set, action_dim) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\Downloads\Joint-traffic-light-control-and-vehicle-rerouting-main\Joint-traffic-light-control-and-vehicle-rerouting-main\SUMOAgent_reviseTT_revise0210.py", line 149, in init self.start_sumo(sumo_cmd_str) File "C:\Users\Administrator\Downloads\Joint-traffic-light-control-and-vehicle-rerouting-main\Joint-traffic-light-control-and-vehicle-rerouting-main\SUMOAgent_reviseTT_revise0210.py", line 211, in start_sumo traci.start(sumo_cmd_str) File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\main.py", line 145, in start sumoProcess = subprocess.Popen(cmd2, stdout=stdout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] The system cannot find the file specified

Process finished with exit code 1 this error occured plz help to fix it

Pakistan123t commented 2 months ago

please help me