Skip to main content

Optimization Engine

Fast and accurate embedded nonconvex optimization

Build high-performance optimizers for next-generation robotics, autonomous vehicles, and other cyber-physical systems without hand-writing solver infrastructure.

Core languageRust
Primary usesMPC, MHE, Robotics
InterfacesPython, MATLAB, C/C++, ROS, TCP

Why people use OpEn

Fast embedded optimization

Embeddable

All numerical routines are written in Rust, making OpEn a strong fit for embedded targets where speed, determinism, and memory safety matter.

Accurate

OpEn combines fast convergence with a practical problem formulation for nonconvex optimization, including augmented Lagrangian and penalty updates.

Fast

Benchmarks and applications show sub-millisecond performance in the right settings, enabling demanding control and estimation loops.

Easy code generation

Install OpEn in Python with pip, model your optimization problem with CasADi, and generate a solver that you can run through TCP, C/C++, ROS, or Rust.

The docs in Installation and Python Interface walk through the flow end to end.

Try it In Colab

Animated overview of OpEn code generation

Capabilities

Blazingly fast embedded optimization

Design and Deploy

Formulate your problem in Python or MATLAB, generate a Rust optimizer, and consume it over TCP, C/C++, ROS, or native Rust.

Benchmarks

OpEn is built for real optimization workflows, from reproducible academic experiments to embedded deployments and hardware-in-the-loop tests.

Model Predictive Control

Model Predictive Control (MPC) is a powerful optimization-based control methodology. It has become a standard tool in control engineering because it can handle nonlinear dynamics and state or input constraints, but it also requires solving an optimization problem in real time under tight runtime limits.

When the dynamics are nonlinear or the constraints are nonconvex, implementation becomes significantly harder. This is where OpEn helps: it offers extremely fast and robust numerical optimization methods tailored for embedded applications where both speed and memory usage matter.

Moving Horizon Estimation

Moving Horizon Estimation (MHE) is the bee's knees of nonlinear estimation: it is an optimization-based estimator for constrained nonlinear systems. MHE is backed by a strong theoretical bedrock that combines Bayesian estimation and dynamic programming; however, its applicability has been hampered by the associated computational burden and has limited its use to slow or linear dynamical systems.

OpEn can unlock the huge potential of MHE and facilitate its use in robotics, automotive, aerospace and other applications with high sampling frequencies.

Well Documented

The documentation covers installation, interfaces, optimal control tutorials, and end-to-end examples for robotics and autonomous systems.

Browse the Docs

Presentation at IFAC 2020

A short introduction to what OpEn does, how it works, and how to use it in practice.

Python OCP package

Design optimal control problems and MPC in Python

OpEn comes with a Python OCP module that facilitates the design of optimal control problems in an intuitive and straightforward way. You define the key ingredients of the problem, including stage and terminal costs, dynamics, and state or input constraints.

It is a practical starting point for building nonlinear optimal control and MPC formulations directly in Python before generating an embedded optimizer.

State trajectories from an optimal control problem built with the Python OCP package