Awesome Open Source
Awesome Open Source

ASSET2 - Airport Surface Simulator and Evaluation Tool 2

Build Status



ASSET2 is a generic airport simulation tool for research purpose. It is designed to support multiple airports, to test and to evaluate customized schedulers. Please check out our paper for more information.

This tool is built for Carnegie Mellon University MSIT Practicum Project and Master Independent Study sponsored by the NASA Ames Research Center.

How to Run

Please note that the code runs in Python 3.

Please avoid Python>=3.7.0 because it breaks the legacy Cython, which one of the dependencies line-profiler depends on. The issue has not been fixed at the moment. Try to install a lower version instead.

Prepare Airport Data

Place airport related data under data folder like data/sfo-terminal-2/build/ (use IATA airport code).

First-Time Installation

If you're on Ubuntu:

$ sudo apt-get update
$ sudo apt-get install -y python3-pip
$ mkdir -p ~/.config/matplotlib/
$ echo "backend : Agg" >> ~/.config/matplotlib/matplotlibrc

Set-up Virtual Environment (highly recommended):

  • If you are using IntelliJ or any other JetBrain IDE, see this link (recommended).

  • If you are using commend line:

    $ {path/to/python3} -m venv venv # create a new virtual environment
    $ source venv/bin/activate # activate the virtual environment
    $ pip install -r requirements.txt # install dependencies locally
    $ python -f plans/base.yaml # execute the simulation

Install dependencies:

$ pip install -r requirements.txt


$ python -f plans/base.yaml
$ python -f batch_plans/simple-uc.yaml # Batch Run


$ python visualization/


$ python -m unittest discover tests    # all tests
$ python -m unittest tests/   # single test

Check Style

$ pycodestyle --show-pep8 --show-source --exclude=venv .
$ ls -1 *py scheduler/*py | xargs pylint # optional but recommended


$ pydoc <>

Developer Guidelines

Sequential Diagram


Experiment Flow

The following steps are suggested for lauching an successful experiment systematically.

  1. Compose and launch a single plan to find out (a) the upper bound of the value of the experimental variable and (b) the execution time for a single run.

    $ time ./ -f plans/<upper-bound-to-try>.yaml
  2. Use the visualization tool on the single plans you launched in step one to see if things are working as expected. For example, you should check if the aircrafts are busy enough in order to retrieve a meaningful plot.

     $ ./visualiztion/
  3. By using the execution time and upper bound information we collected from the previous steps we can then lanuch a batch run with try_until_success: False. The execution time of this batch run should be able to estimated.

  4. By using the execution time and failure rate information from the previous steps, we can then launch a batch run with try_until_success: True to obtain meaningful final results.


Please ALWAYS follow PEP 8 -- Style Guide for Python Code for readability and consistency.


Default logging level is set in, and please initialize logging for each class in __init__ like this way:

self.logger = logging.getLogger(__name__)


Put breakpoint in this way:

import pdb; pdb.set_trace()

Also, please refer to our Google Map for debugging the details.


For consistency, following units are used everywhere in the code:

Time: second
Length: ft


Routing table calculated by the routing expert will be cached at cache/ so please make sure all the objects in routing table can be dumped into binary file using pickle. Ex. logger can't be dumped.

Note that cache may cause errors or bugs in many cases because stale data is used.


Simulation time (sim_time) indicates the time should be passed in each tick() and it can be accessed globally in any place by using following syntax:

from clock import Clock
self.logger.debug("sim time is %s", Clock.sim_time)


To speedup the simulation, we can apply some profiling technique to locate the slow code. Add @profile decorator at the beginning of the function you want to profile, then do following commands to obtain a report of the execution time of each line within the function.

$ kernprof -l ./simulator -f <your_plan>.yaml
$ python3 -m line_profiler

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (1,137,692
Simulation (3,924
Scheduling (434
Evaluation (376
Nasa (353
Uncertainty (151
Related Projects