This is the GitHub repository of Attainable Region (AR) theory. The main homepage of AR theory can be found at attainableregions.com.
This repository contains:
artools.py
artools.py
is a collection of Python functions for carrying out AR calculations as well as performing simple 2-D and 3-D visualisations of convex regions. A Jupyter notebook demonstrating its usage can be found in the notebooks folder.
Copy artools.py
to your local directory and import.
import artools
Alternatively, add the directory containing artools.py
to your system path, and then import.
import sys
sys.path.append('PATH/TO/ARTOOLS/DIRECTORY')
import artools
Currently, artools.py
is written in Python 3 and depends on SciPy and Matplotlib. We recommend using Anaconda to manage the installation of these packages.
The code currently supports Python versions 3.4 - 3.6.
Jupyter notebooks, which demonstrate common AR theory concepts, can be found here. These notebooks are written in conjunction with the Attainable Region theory textbook.
Notebook widgets might not display if Jupyter is run in a virtual environment. If this is the case, issue the following console command:
jupyter nbextension enable --py widgetsnbextension
See this Stack Overflow post and ipywidgets Github installation instructions for more details.
The source code for the examples described on attainableregions.com are stored here.
.py
files to Python 3, and 2to3_nb.py to convert Jupyter .ipynb
notebooks.