This library provides a set of modules to assemble optimal control problems (OCPs) by generating symbolic expressions based on casadi.
ocp-modules is (SOON) available via pip:
pip3 install --user ocp-modules
Install
setuptools
andvirtualenv
:pip3 install --user setuptools virtualenv
Create a new virtual environment in the folder venv and source it:
git clone <this_repo> cd <this_repo> python3 -m virtualenv venc source ./venv/bin/activate
Install ocp-modules via symlink into the virtual environment
cd <this_repo> pip3 install -e .
Casadi can make use of proprietary solvers such as HSL_MA57 Follow the instructions obtaining_HSL to install them and modify the solver options to use the built-in default.
Common issues with HSL solvers:
- Cannot find
libhsl.so
. In this case, manually create a symlinklibcoinhsl.so
->libhsl.so
in/usr/lib
- Failed to load
libmetis.so
: It is hard to get a working instance of metis (the version packaged in Ubuntu 18.04 is not compatible). It seems to work without, but spams into stdout.
Run examples via:
./examples/<folder>/<script>.py