acados: SQP solvers shaped around the optimal control structure
Fast and embedded solvers for nonlinear optimal control and nonlinear model predictive control
At a glance
- What is it?
- acados is a C library for nonlinear optimal control with Python, MATLAB and Octave interfaces, built for control loops that have to finish on time. Its speed comes from assuming your problem looks like an optimal control problem, which is also its main constraint on you.
- Who is it for?
- Use acados when you are solving a nonlinear MPC or MHE problem repeatedly inside a deadline and you can state the dynamics symbolically through CasADi. Do not reach for it on a one-off offline optimisation with no control structure, where a general NLP solver with a sparse Hessian would cost you less to install.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly C, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What kind of problem acados assumes you have
acados solves nonlinear programs, but not arbitrary ones. The library targets problems with an optimal control problem structure, meaning a horizon of stages with dynamics linking them, a cost, and constraints along the way. The README makes the reason for that narrowness explicit: such problems have to be solved again and again inside model predictive control and moving horizon estimation, so the same structure recurs on every cycle and can be exploited rather than rediscovered each time.
The audience is control engineers and researchers with a hard real-time budget, plus people embedding an optimiser inside a machine learning stack. The listed application areas cover robotics, autonomous vehicles, energy systems, biomechanics and aerospace, and the README points to a list of projects that use it, including openpilot and the bioptim library for biomechanics.
The core is C, with interfaces to Python, MATLAB and Octave. Symbolic expressions are supplied through CasADi, so you describe the problem in generated code rather than hand-writing derivatives. That combination is the whole point: hand-written derivatives are where nonlinear solvers usually lose their week.
Where the efficiency actually comes from
Read the design paradigms section and the mechanism is visible. Efficiency is achieved by rigorously exploiting the OCP structure via tailored quadratic programming solvers such as HPIPM, plus partial condensing methods that transform the QPs so they can be handled efficiently. Condensing is what turns a large sparse problem into a smaller dense one, trading a factorization each step for a cheaper one.
Two further exploitations matter in practice. The common structure of slack variables, which appear whenever soft constraints are formulated, is reused rather than treated as ordinary variables. And there is a structure-exploiting Runge-Kutta integrator, which uses the linear dependencies inside a dynamical system model instead of integrating every state independently.
The consequence is that the fast path is real but narrow. The build system shows how much of the library is swappable: the object list in the Makefile includes separate files for each NLP method (`ocp_nlp_sqp.o`, `ocp_nlp_ddp.o`, `ocp_nlp_sqp_rti.o`), four regularization schemes (`reg_convexify`, `reg_mirror`, `reg_project`, `reg_noreg`), and globalization variants including a fixed-step, a funnel and a merit backtracking scheme. A different combination is a different build, not a runtime flag you can flip after the fact.
Building from source, since the README points elsewhere for install
The README does not carry an install command. Installation instructions live at docs.acados.org/installation, and that page is where you should go. What the repository itself shows is a CMake and Make build with optional components switched in through variables.
The default make target is a static library, and the top of the Makefile is where configuration happens:
all: static_library
include ./Makefile.rule
include ./Makefile.osqpOptional solvers are gated behind variables that default to off. The dense QP section lists `acados/dense_qp/dense_qp_hpipm.o` unconditionally and then adds the others only when a flag is set:
OBJS += acados/dense_qp/dense_qp_hpipm.o
ifeq ($(ACADOS_WITH_QPOASES), 1)
OBJS += acados/dense_qp/dense_qp_qpoases.o
endifExpect a compiler, CMake and a BLAS setup before you get a working `acados` shared object that Python can load. Example code for each interface is kept separate under `examples/`, with `examples/acados_python/`, `examples/c/`, `examples/acados_matlab_octave/` and a `c_ext_dep_off` variant.
Multi-phase problems are the escape hatch from the assumptions
Modularity is the second design paradigm, and its most interesting part is that all problem functions and dimensions can vary between stages. These are what the README calls multi-stage or multi-phase problems. In practice this means a batch of reactors with different residence times, or a vehicle where the driving and idling phases have different dimensions, can be stated as one problem rather than being hacked into a homogeneous horizon.
The Python surface reflects that layering. There is an `AcadosOcp` class for the common formulations and `AcadosMultiphaseOcp` for the full internal formulation, which is the escape hatch when the convenience layer is in the way. Cost and constraint functions can also be declared as convex-over-nonlinear structures, and the solvers exploit that declaration rather than treating the function as an arbitrary black box.
This is where the trade-off bites. The flexibility is real, but the honest cost is that the same flexibility admits formulations nobody has run before. The documentation pages at docs.acados.org and the forum at discourse.acados.org are the practical route for the formulations that are not in the manual.
Where acados is the wrong tool
The library is not a general nonlinear programming package, and using it as one costs you an install, a symbolic pipeline and a problem statement you had to reshape. If your optimisation runs once offline and its result gets written to a file, none of the structure exploitation pays for itself.
The learning curve is the second cost. SQP-type methods with condensing, four regularization options and a choice of globalization scheme mean that when a solve fails to converge, the diagnosis is not obvious from the error. You are choosing between algorithms the README itself says are freely combinable, which is power and also a matrix of combinations to debug.
On licensing, GitHub reports the license as one it cannot classify, so the classification is deliberately non-standard and the LICENSE file is the authoritative text. Source files carry a 2-Clause BSD header, and the README gives no summary of what obligations that license places on a commercial or embedded deployment. If you intend to ship acados inside a product, read the LICENSE file yourself rather than trusting the SPDX field.
The last push was on 2026-10-16, and the repository is not archived. Tagged releases came at v0.6.0 on 2026-08-06, v0.5.5 on 2026-07-03 and v0.5.4 on 2026-05-04. Version numbers below 1.0 mean interfaces can still move between minor releases.
Editorial conclusion
Use acados when you are solving a nonlinear MPC or MHE problem repeatedly inside a deadline and you can state the dynamics symbolically through CasADi. Do not reach for it on a one-off offline optimisation with no control structure, where a general NLP solver with a sparse Hessian would cost you less to install. Verify first that the license file matches your deployment model, that the combination of NLP solver, QP solver and globalization method you plan to use is one the project documents, and that your build of the C library targets the hardware you intend to run on.
Frequently asked questions
What programming languages can I use with acados?
The solver itself is written in C, and the project ships interfaces to Python, MATLAB, Simulink and Octave. Interfaces for each language are documented at docs.acados.org/interfaces.
How do I install acados?
The README does not include install commands and instead links to docs.acados.org/installation. The repository builds with Make and CMake, where the default make target is a static library and optional solvers such as qpoases are enabled through variables like ACADOS_WITH_QPOASES.
Can acados be used inside a machine learning model?
Yes. The README states that acados can embed an NLP solver as a differentiable layer in a machine learning architecture, and that this is demonstrated in the leap-c project. Solution sensitivities and policy gradients are the stated motivation.
Which solver algorithm does acados use?
The library implements SQP-type solvers tailored to optimal control problems, and the build includes an SQP with real-time iteration variant, a DDP implementation and several regularization and globalization options. Time discretization is handled by a multiple shooting method.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/acados-acados)