Code Monkey home page Code Monkey logo

multi_mcts_guidance_separation_assurance's Introduction

Multi-aircraft Guidance and Separation Assurance

A Python implementation of the algorithm proposed in the paper "Scalable Multi-Agent Computational Guidance with Separation Assurance for Autonomous Urban Air Mobility Operations" by Xuxi Yang and Peng Wei.

Paper link

Video demo

Install

This repository is only testesd under Python 3.6. To install the dependencies, run

pip install -r requirements.txt

Optional arguments

--save_path the path where you want to save the output

--seed seed of the experiment

--render if render the env while running exp

--debug set to True if you want to debug the algorithm (the code will stop running and render the current state when there is conflict/LOS or NMAC, check this line for detail)

Running the algorithm

Three case studies can be run in this repository.

For case study 1 in the paper, run

python Agent_vertiHexSecGatePlus.py

For case study 2, run

python Agent_vertiHexSecGatePlusTwoStage.py

For case study 3, run

python Agent_vertiport.py

MCTS algorithm

The MCTS algorithm code is under the directory MCTS/

common.py defines the general MCTS node class and state class

nodes*.py defines the MCTS node class and state class specifically for Multi Agent Aircraft Guidance problem, e.g., given current aircraft state and current action, how to decide the next aircraft state

search_multi.py describes the search process of MCTS algorithm

Simulator

The simulator code is under the directory of simulators/. The following described the main function in simulators.

config*.py defines the configurable parameters of the simulator. For example, airspace width/length, number of aircraft, scale (1 pixel = how many meters), conflict/NMAC distance, cruise/max speed of aircraft, heading angle change rate of aircraft, number simulations and search depth of MCTS algorithm, vertiport location, ...

  • __init__() initialize the simulator by generating vertiports, sectors, loading configuration parameters, and generating aircraft.

  • reset() will reset the number of conflicts/NMACs to 0 and reset the aircraft dictionary. Note here all the aircraft objects are stored in the AircraftDict class, where you can add/remove aircraft from it, and get aircraft object by id.

  • _get_ob() will return the current state, which is n by 8 matrix, where n is the number of aircraft. Each aircraft has (x, y, vx, vy, speed, heading, gx, gy) state information.

  • _get_normalized_ob() will normalize the state to be in range [0, 1], which will be useful if you want to feed state into a neural network.

  • step() will return next state, reward, terminal, info given current state and current action. Each aircraft will fly according to the given action. We have a clock at each vertiport to decide whether to generate new flight request/aircraft.

  • _terminal_reward() will return the reward function for current state. This function will check if there is any conflict/NMAC between any two aircraft and update conflict/NMAC number. It will also remove aircraft that reaches goal position and aircraft pair that has NMAC.

  • render() will visualize all of the current aircraft and vertiport.

Citing this work

If you find this codebase useful for your research work, we encourage you to cite our paper using the following BibTex citation:

@article{yang2020scalable,
  title={Scalable Multi-Agent Computational Guidance with Separation Assurance for Autonomous Urban Air Mobility},
  author={Yang, Xuxi and Wei, Peng},
  journal={Journal of Guidance, Control, and Dynamics},
  volume = {43},
  number = {8},
  pages = {1473-1486},
  year={2020},
  publisher={American Institute of Aeronautics and Astronautics},
  doi = {10.2514/1.G005000},
}

Note

If you have any comments, questions, or suggestions, feel free to let me know!

Email: [email protected]

multi_mcts_guidance_separation_assurance's People

Contributors

xuxiyang1993 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.