TUDelft-CNS-ATM / bluesky

The open source air traffic simulator
GNU General Public License v3.0
391 stars 249 forks source link

[plugins scenario] error when running the scenario file in ./DecentralisedM2 #444

Open Hehehedele opened 1 year ago

Hehehedele commented 1 year ago

Hello, I have recently read research and corference paper about metropolis-2 and very interested in the M2 project which may contribute to the advanced urban air mobility.

Error Brief Description

I'm having some problems running the scenario file [Flight_intention_high_40_0_R1.scn]https://github.com/andubadea/bluesky/tree/M2-sensitivity/scenario/DecentralisedM2 using the Bluesky (version https://github.com/andubadea/bluesky/tree/M2-sensitivity).

Environment(for bug reports) - Personally, I don't feel it has much to do with my environment

Detail

Flight_intention_high_40_0_R1.scn: First 11 lines of scn file 00:00:00.00>FF 00:00:00>ASAS ON 00:00:00>RESO SPEEDBASEDV3 00:00:00>CDMETHOD M2STATEBASED 00:00:00>STREETSENABLE 00:00:00>loadloiteringdill Flight_intention_high_40_0.dill 00:00:00>CASMACHTHR 0 00:00:00>LOADGEOJSON open_geofence id height 00:00:00>LOADGEOJSON bldg_geofence fid h 00:00:00>SCHEDULE 00:15:00 PCALL rogues/R0.scn 00:00:00>QUEUEM2 D1,MP20,310933_MP20,48.2188811832,16.3102739948,48.2151360192,16.4149767487,0.0,0.0,0.0,2,0,

Some case im not sure:

  1. RESO SPEEDBASEDV3 : I found SPEEDBASEDV2 in the directory [./plugins/M2-decentralised] and changed this command to RESO SPEEDBASEDV2 in order to be able to run this command.
  2. QUEUEM2 : this stack command from the directory [./plugins/streets/streets.py] at line 546. ######################## STACK COMMANDS ########################## @stack.command def queuem2(acid, actype: str="B744", path_file: str="", aclat: float=52., aclon: float=4., destlat: float = 51., destlon: float = 3., achdg: float=None, acalt: float=0, acspd: float = 0, prio: int = 1, geodur:float = 0, *geocoords:float): the command function - parameter-path_file: str ; The original folder doesn't seem to contain these dill files the FileNotFound error reported on my pc: 截屏2022-12-27 20 47 50

Do these dill files need other py scripts to run out or do the plugins not match the scenario file.

Thanks!

jooste commented 1 year ago

@andubadea, @amorfinv: Could you help @Hehehedele out with this?

andubadea commented 1 year ago

Hi @Hehehedele,

Yes, to run the decentralised Metropolis 2 BlueSky, you need the .dill files. They contain pre-generated paths of all possible combinations of origin-destinations, which enabled our simulations to be faster and also achieve better RAM management.

First of all, the branch you found in my BlueSky fork is not the one that we used within the Metropolis 2 project. That can be found here: https://github.com/Metropolis-2/bluesky/tree/M2-decentralised

For the .dill files, I am currently creating a zip of them, but as they are 180GB in size, it will take a while. I'll see if I can upload them somewhere and reply again here. Otherwise, you can generate them locally by using this repo: https://github.com/amorfinv/M2_test_decentralised

You'll need to have osmnx, dill, shapely, among other dependencies. Then, go within M2_test_decentralised/current_code/MultiPreGenScenarioMaker.py and change the num_cpu variable to the number of threads you want the script to create. Then, run MultiPreGenScenarioMaker.py . Depending on your machine, this might be faster or slower than using the future download link.

jooste commented 1 year ago

Hi @andubadea,

Wouldn't it make sense anyway to put these data files on the 4TU M2 repo?

andubadea commented 1 year ago

Hi @andubadea,

Wouldn't it make sense anyway to put these data files on the 4TU M2 repo?

Depends on how large the zipped file ends up being. We have a 10GB quota for 4TU per person.

andubadea commented 1 year ago

@Hehehedele I have finally managed to upload a zip of the .dill files, you can find them here: https://surfdrive.surf.nl/files/index.php/s/EcPGLvaBu7cZfTA

Simply extract the path_plan_dills folder in plugins/streets . Make sure you have enough storage space, as they occupy 180GB when unzipped.