This directory contains the supplement code for the paper titled "Collision Avoidance for Unmanned Aircraft using Coordination Tables" by Rachael Tompa, Blake Wulfe, Michael Owen, and Mykel J. Kochenderfer, to appear in the 2016 Digital Avionics Systems Conference.
The code in this repository supports one of two tasks:
- generating and analyzing pairwise policies (src/pilot)
- evaluating those policies in simulation (src/simulation)
The following Julia packages are required for running code.
src/
dvi/
DiscreteValueIteration.jl
helpers.jl
parallel.jl
policy.jl
pilot/
PilotSCA.jl
PilotSCAConst.jl
PilotSCAs.jl
README.md
simulation/
analyze_encounters.jl
build_simulation.jl
dynamics.jl
encounter.jl
environment.jl
run_simulation.jl
state.jl
strategies.jl
tables.jl
uav.jl
data/
qvalue_tables/
plots/
README.md
This section describes the implementation of the simulation framework. For example usage for most functions, please refer to the tests/test_simulation directory.
The bulk of the framework exists in the following four files:
- An Environment type is an environment in which encounters occur and acts as a wrapper around the other types (environment.jl). Encounters are generated by the environment.
- An Environment contains a list of UAVs (the code currently supports two uavs), these are the agents that make decisions on how to act using policy and coordination tables (uav.jl).
- An Environment also contains a Dynamics type, which is responsible to stepping the state of the system forward in time (dynamics.jl).
- All of the information need for uavs to make decisions (2) and the dynamics to step the state (3) is contained in a State type (state.jl).
The UAV type delegates to other types / functions in order to choose actions and generate coordination signals
- Each uav has a policy and coordination table that it uses to make decisions (tables.jl).
- Each uav delegates to some "strategy" function to choose actions and signals. The two options are a "greedy" and "coordinated" strategy (strategies.jl).
There are three additional supporting files:
- build_simulation.jl contains code for building a default environment. This is used with the batch simulation code to run simulations with different settings concurrently.
- run_simulation.jl contains the code to actually run the simulations. See simulate_encounter for the main simulation loop. To change the number of encounters to simulate, see the function run_simulation().
- analyze_encounters.jl contains code for printing plots of the paths and actions for the uavs, for stepping through encounters, and for printing out aggregate statistics about the simulated encounters.
- encounter.jl contains a type that is used to accumulate information about encounters.
Much of the simulation framework has tests associated with it in tests/test_simulation. To run all of the tests in this directory, enter the following in terminal:
julia run_tests.jl
This code will display a few plots by default, which you'll need to exit to continue with testing. This can be disabled by changing SHOW_PLOTS to false in test_simulation/includes.jl.