This software is being developed independently of NASA. It is not endorsed or supported by NASA or the US government.
The optimalcontrol
package is a framework for describing optimal control problems (OCPs) in python.
A collection of some benchmark OCPs of varying difficulty are located in the examples
folder, separate from the optimalcontrol
package. Some of these OCPs are described in
If you use this software, please cite the software package and the relevant publication(s). Please reach out with any questions, or if you encounter bugs or other problems.
First create a python environment (using e.g. conda or pip) with
python>=3.8
Then to install the optimalcontrol
package (in developer mode), run
pip install -e .
This package and the examples have been developed and tested with the following software dependencies:
numpy>=1.17
scipy>=1.8
pytest
jupyter
matplotlib
pandas
scikit-learn>=1.0
tqdm
From the root directory, run
pytest tests -s -v
Install pdoc
and run
pdoc optimalcontrol --d numpy --math -t docs/.template/ -o docs/optimalcontrol
pdoc examples --d numpy --math -t docs/.template/ -o docs/examples
optimalcontrol
packageThe optimalcontrol
package is made up of the following modules:
problem
: The most import piece of the package. Contains the OptimalControlProblem
base superclass used to implement OCPs.
controls
: Contains the Controller
template class for implementing feedback control policies.
open_loop
: Basic functions to solve open-loop OCPs for individual initial conditions, for the purpose of data generation. Difficult problems may require custom algorithms.
simulate
: Functions to integrate closed-loop dynamical systems, facilitating performance and stability testing of feedback control laws.
sampling
: Contains frameworks for implementing algorithms to sample the state space for data generation and controller testing.
analyze
: Tools for linearization and linear closed-loop stability analysis. In development.
utilities
: General utility functions.
examples