Skip to content

Latest commit

 

History

History
80 lines (59 loc) · 2.52 KB

installation.md

File metadata and controls

80 lines (59 loc) · 2.52 KB
id title sidebar_label description
installation
OpEn Installation
Installation
How to install OpEn
<script> ((window.gitter = {}).chat = {}).options = { room: 'alphaville/optimization-engine' }; </script> <script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>

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

Python Interface

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

MATLAB Interface

You first need to download Optimization Engine, cd to ./matlab/ and run

setup_open

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 Cargo.toml file:

[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.