Maths

CasADi – nonlinear optimization and algorithmic differentiation

CasADi is a framework for numerical optimization with particular emphasis on optimal control and systems involving differential equations. It provides mathematical building blocks for formulating complex optimization problems and calculating the derivatives needed to solve them efficiently.

The framework is designed for situations where traditional numerical methods would otherwise require substantial manual work to construct derivative calculations or integrate with optimization algorithms.

CasADi is particularly useful in engineering, robotics, dynamic systems, parameter estimation, and nonlinear model predictive control. It combines symbolic expression handling with numerical computation, allowing sophisticated mathematical models to be translated into efficient calculations.

This is free and open source software.

Key Features

  • Symbolic framework for constructing scalar, vector, and matrix-valued mathematical expressions.
  • Forward and reverse algorithmic differentiation for calculating derivatives efficiently.
  • Automatic computation of gradients, Jacobians, and Hessians.
  • Exploits sparsity in mathematical expressions and derivative calculations.
  • Supports nonlinear programming problems with objective functions and constraints.
  • Provides building blocks for optimal control and nonlinear model predictive control.
  • Interfaces with established numerical optimization solvers, including IPOPT.
  • Integrates ordinary differential equations and differential-algebraic equations.
  • Supports forward and adjoint sensitivity analysis for dynamic systems.
  • Interfaces with numerical integration tools from the SUNDIALS suite.
  • Generates standalone C code from symbolic computational graphs.
  • Supports optimization workflows involving parameter estimation and dynamical systems.
  • Provides interfaces for multiple scientific programming environments.
  • Cross-platform support – runs on Linux, macOS, and Windows.

Website: github.com/casadi/casadi
Support:
Developer: Joel Andersson, Joris Gillis, and contributors
License: GNU Lesser General Public License v3.0

CasADi is written in C++. Learn C++ with our recommended free books and free tutorials.


Related Software

Python Mathematics Tools
scikit-learnMachine learning library for Python
NumPyCore package for scientific computing with Python
SciPyEcosystem for mathematics, science, and engineering.
statsmodelsStatistical modeling and econometrics
JAXPython library for high-performance numerical computing
SageMathComputer algebra system
SymPyLibrary for symbolic mathematics
PyMCBayesian statistical modeling and probabilistic programming
PyomoObject-oriented algebraic modeling language
patsyPackage for describing statistical models and to build design matrices
mpmathLibrary for arbitrary-precision floating-point arithmetic
SfePyFinite element software package

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted