Embeddable
All numerical routines are written in Rust, making OpEn a strong fit for embedded targets where speed, determinism, and memory safety matter.
A very common reason is a wrong site baseUrl configuration.\n Current configured baseUrl = /optimization-engine/ \n We suggest trying baseUrl = \n\n',document.body.prepend(n);var e=document.getElementById("__docusaurus-base-url-issue-banner-suggestion-container"),o=window.location.pathname,s="/"===o.substr(-1)?o:o+"/";e.innerHTML=s}document.addEventListener("DOMContentLoaded",function(){void 0===window.docusaurus&&insertBanner()})
Optimization Engine Build high-performance optimizers for next-generation robotics, autonomous vehicles, and other cyber-physical systems without hand-writing solver infrastructure. Why people use OpEn All numerical routines are written in Rust, making OpEn a strong fit for embedded targets where speed, determinism, and memory safety matter. OpEn combines fast convergence with a practical problem formulation for nonconvex optimization, including augmented Lagrangian and penalty updates. 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 The docs in Installation and Python Interface walk through the flow end to end. Capabilities Formulate your problem in Python or MATLAB, generate a Rust optimizer, and consume it over TCP, C/C++, ROS, or native Rust. OpEn is built for real optimization workflows, from reproducible academic experiments to embedded deployments and hardware-in-the-loop tests. 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 (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. The documentation covers installation, interfaces, optimal control tutorials, and end-to-end examples for robotics and autonomous systems. A short introduction to what OpEn does, how it works, and how to use it in practice. Python OCP package 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. New in opegen 0.11 OpEn can now generate ROS2 packages directly from a parametric optimizer. The generated package includes ROS2 messages, configuration files, a launch file, and a node that exposes the solver through topics. This makes it easy to connect optimization-based controllers, estimators, and planning modules into a modern robotics stack without writing the ROS2 wrapper code by hand. Bot icons created by pbig - Flaticon Docker image OpEn ships with a Docker image that gets you straight into a working environment with Jupyter, Python, and the tooling needed to explore examples without local setup friction. It is a convenient way to try the Python interface, browse the notebooks, and experiment with the OCP workflows in a clean, reproducible environment.
Fast and accurate embedded nonconvex optimization
Fast embedded optimization
Embeddable
Accurate
Fast
pip, model your optimization problem with CasADi, and generate a solver that you can run through TCP, C/C++, ROS, or Rust.
Blazingly fast embedded optimization
Design and Deploy
Benchmarks

Model Predictive Control

Moving Horizon Estimation

Well Documented
Presentation at IFAC 2020
Design optimal control problems and MPC in Python

ROS2 packages

ros2_config = og.config.RosConfiguration() \
.with_package_name("my_ros_pkg") \
.with_node_name("open_node_ros2") \
.with_rate(10.0)
build_config = og.config.BuildConfiguration() \
.with_build_directory("my_optimizers") \
.with_ros2(ros2_config)Run OpEn in a ready-made container

docker pull alphaville/open:0.7.0