All Projects → csu-hmc → opty

csu-hmc / opty

Licence: other
A library for using direct collocation in the optimization of dynamic systems.

Programming Languages

python
139335 projects - #7 most used programming language
TeX
3793 projects

Projects that are alternatives of or similar to opty

DirectTrajectoryOptimization.jl
A Julia package for constrained trajectory optimization using direct methods.
Stars: ✭ 22 (-69.01%)
Mutual labels:  optimal-control, collocation
DiffEqParamEstim.jl
Easy scientific machine learning (SciML) parameter estimation with pre-built loss functions
Stars: ✭ 36 (-49.3%)
Mutual labels:  parameter-estimation
ocs2
Optimal Control for Switched Systems
Stars: ✭ 263 (+270.42%)
Mutual labels:  optimal-control
welltestpy
A python-package for handling well based field campaigns.
Stars: ✭ 26 (-63.38%)
Mutual labels:  parameter-estimation
PnC
Planning and Control Algorithms for Robotics
Stars: ✭ 22 (-69.01%)
Mutual labels:  optimal-control
QuasiMonteCarlo.jl
Lightweight and easy generation of quasi-Monte Carlo sequences with a ton of different methods on one API for easy parameter exploration in scientific machine learning (SciML)
Stars: ✭ 47 (-33.8%)
Mutual labels:  parameter-estimation
PC3-pytorch
Predictive Coding for Locally-Linear Control (ICML-2020)
Stars: ✭ 16 (-77.46%)
Mutual labels:  optimal-control
opensim-moco
Solve optimal control problems for musculoskeletal models using OpenSim and direct collocation.
Stars: ✭ 45 (-36.62%)
Mutual labels:  optimal-control
FloBaRoID
Framework for dynamical system identification of floating-base rigid body tree structures
Stars: ✭ 53 (-25.35%)
Mutual labels:  parameter-estimation
parPE
Parameter estimation for dynamical models using high-performance computing, batch and mini-batch optimizers, and dynamic load balancing.
Stars: ✭ 16 (-77.46%)
Mutual labels:  parameter-estimation
pestpp
tools for scalable and non-intrusive parameter estimation, uncertainty analysis and sensitivity analysis
Stars: ✭ 90 (+26.76%)
Mutual labels:  parameter-estimation
krotov
Python implementation of Krotov's method for quantum optimal control
Stars: ✭ 46 (-35.21%)
Mutual labels:  optimal-control
modest-py
FMI-compliant Model Estimation in Python
Stars: ✭ 40 (-43.66%)
Mutual labels:  parameter-estimation
mpc-DL-controller
Deep Neural Network architecture as a predictive optimal controller for {HVAC+Solar cell + battery} disturbance afflicted system vs classic Model Predictive Control
Stars: ✭ 37 (-47.89%)
Mutual labels:  optimal-control
hascal
Hascal is a general purpose and open source programming language designed to build optimal, maintainable, reliable and efficient software.
Stars: ✭ 56 (-21.13%)
Mutual labels:  optimal
RobustAndOptimalControl.jl
Robust and optimal design and analysis of linear control systems
Stars: ✭ 25 (-64.79%)
Mutual labels:  optimal-control
AMICI
Advanced Multilanguage Interface to CVODES and IDAS
Stars: ✭ 80 (+12.68%)
Mutual labels:  parameter-estimation
RLGC
An open-source platform for applying Reinforcement Learning for Grid Control (RLGC)
Stars: ✭ 85 (+19.72%)
Mutual labels:  optimal-control
StructuralIdentifiability.jl
Fast and automatic structural identifiability software for ODE systems
Stars: ✭ 57 (-19.72%)
Mutual labels:  parameter-estimation
pyPESTO
python Parameter EStimation TOolbox
Stars: ✭ 93 (+30.99%)
Mutual labels:  parameter-estimation

Introduction

https://readthedocs.org/projects/opty/badge/?version=stable https://travis-ci.org/csu-hmc/opty.svg?branch=master

opty utilizes symbolic descriptions of ordinary differential equations expressed with SymPy to form the constraints needed to solve optimal control and parameter identification problems using the direct collocation method and non-linear programming. In general, if one can express the continuous first order ordinary differential equations of the system as symbolic expressions opty will automatically generate a function to efficiently evaluate the dynamical constraints and a function that evaluates the sparse Jacobian of the constraints, which have been optimized for speed and memory consumption. The translation of the dynamical system description to the NLP form, primarily the formation of the constraints and the Jacobian of the constraints, manually is a time consuming and error prone process. opty eliminates both of those issues.

Features

  • Both implicit and explicit forms of the first order ordinary differential equations and differential algebraic equations are supported, i.e. there is no need to solve for the derivatives of the dependent variables.
  • Backward Euler or Midpoint integration methods.
  • Supports both trajectory optimization and parameter identification.
  • Easy specification of bounds on free variables.
  • Easily specify additional "instance" constraints.
  • Automatic parallel execution using openmp if installed.
  • Built with support of sympy.physics.mechanics and PyDy in mind.

Installation

The required dependencies are as follows:

  • python 3.6-3.9
  • sympy >= 1.6.0
  • ipopt >= 3.11 (Linux & OSX), >= 3.13 (Windows)
  • numpy >= 1.19.0
  • scipy >= 1.5.0
  • cython >= 0.29.19
  • cyipopt >= 1.1.0

To run all of the examples the following additional dependencies are required:

  • matplotlib >= 3.2.0
  • openmp
  • pandas
  • pydy >= 0.5.0
  • pytables
  • yeadon

The easiest way to install opty is to first install Anaconda (or Miniconda) and use the conda package manager to install opty and any desired optional dependencies from the Conda Forge channel, e.g. opty:

$ conda install --channel conda-forge opty

and the optional dependencies:

$ conda install --channel conda-forge matplotlib openmp pandas pydy pytables yeadon

If you want a custom installation of any of the dependencies, e.g. Ipopt, you must first install Ipopt along with it's headers. For example, on Debian based systems you can use the package manager:

$ sudo apt-get install coinor-libipopt1v5 coinor-libipopt-dev

or prebuilt binaries can be downloaded from https://www.coin-or.org/download/binary/Ipopt/.

For customized installation (usually desired for performance) follow the instructions on the IPOPT documentation to compile the library. If you install to a location other than /usr/local on Unix systems you will likely have to set the LD_LIBRARY_PATH so that you can link to IPOPT when installing cyipopt.

Once Ipopt is installed and accessible, install conda then create an environment:

$ conda create -n opty-custom -c conda-forge cython numpy pip scipy sympy
$ source activate opty-custom
(opty-custom)$ pip install ipopt  # this will compile cyipopt against the available ipopt
(opty-custom)$ pip install opty

If you want to develop opty, create a conda environment with all of the dependencies installed:

$ conda config --add channels conda-forge
$ conda create -n opty-dev python sympy numpy scipy cython ipopt cyipopt matplotlib pytables pydy pandas pytest sphinx numpydoc
$ source activate opty-dev

Next download the opty source files and install with:

(opty-dev)$ cd /path/to/opty
(opty-dev)$ python setup.py develop

Usage

There are several examples available in the examples directory. For example, the optimal torque to swing up a pendulum with minimal energy can be run with:

$ python examples/pendulum_swing_up.py

Funding

The work was partially funded by the State of Ohio Third Frontier Commission through the Wright Center for Sensor Systems Engineering (WCSSE), by the National Science Foundation under Grant No. 1344954, and by National Center of Simulation in Rehabilitation Research 2014 Visiting Scholarship at Stanford University.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].