Skip to content

Adding Arrival Flights (Code)

Heron Yang edited this page Jul 27, 2018 · 1 revision
  1. Clone data/sfo-terminal-2 to data/sfo-terminal-2-full (just an example). We will work on the cloned folder to avoid changes on the working data. Make sure you also edit the test plan to make it point to the new dataset. (It's even better to start with data/simple.)
  2. Under data/sfo-terminal-2-full/, edit generate_scenario.py to generate arrival flights and their gate, runway, etc. (Follow the same logic as the departure flights.)
  3. Edit airport.py to see the arrival flights appear at the runway. (You don't have to move it at this point, just make it shown on the visualization tool.) The function that should be edited is __add_aircrafts_from_scenario.
  4. Edit tests/test_routing_expert.py to make sure that the routing works for the case there the start node is the runway, and the end node is the gate by writing new test functions.
  5. Edit tests/test_aircraft.py to make sure that we are able to move an aircraft from runway to gate successfully.
  6. Edit airport.py for a) add queues at runways like the queues at gates for the departure flights (__add_aircrafts_from_queue), b) remove aircrafts that had arrived the gates like the departure aircrafts that had arrived the runway (remove_aircrafts), and c) try to see if things are working now (test with the simple dataset with departure flights).
  7. Edit test_airport.py to test the new code added in airport.py works.
  8. Review scheduler/*.py to see if any of the logic was designed for departures only and make it work for the arrivals as well.
Clone this wiki locally