OpEn Requirements: Rust and clang
Before you start, you need to install
- Rust, following the official installation guide,
- Why? The Rust compiler is an essential component of OpEn; you will most likely not need to write (or compile yourself) any Rust code, but OpEn's Python/MATLAB interface will need the compiler to build your optimizer
- clang, following this guide
- Why? OpEn uses CasADi to build certain functions in C, which then need to be called from OpEn's core solver in Rust. For that purpose we need bindgen, which requires clang
As simple as
pip install opengen
You might need to prepend
sudo on some Linux systems.
Note that OpEn requires Python version 3.5 or newer. You might, therefore, need to install it using
pip3 install opengen
OpEn may run on earlier versions of Python (as old as 2.7), but we cannot promise you that (the main difficulty being the installation of dependencies).
Python installation with virtualenv
To install OpEn in a virtual environment, using
virtualenv, you first
need to create such an environment, then activate it, and lastly, install
opengen as above using
pip. That is, you need to run:
virtualenv -p python3.6 venv36 source venv36/bin/activate pip install opengen
You first need to download Optimization Engine,
./matlab/ and run
This will include to your MATLAB path all necessary folders.
You also need to download and install CasADi.
OpEn in Rust
To use OpEn in your Rust project, add the following in your project's
[dependencies] optimization_engine = "*"
You may replace the asterisk with some particular version (e.g.,
optimization_engine = "0.6.0").
OpEn is available on crates.io.