Received: date / Accepted: date | Joel A. E. Andersson, Joris Gillis, Greg Horn, James B. Rawlings, Moritz Diehl
CasADi is an open-source software framework for numerical optimization, designed to be more flexible and lower-level than popular algebraic modeling languages such as AMPL, GAMS, JuMP, and Pyomo. It is particularly well-suited for problems constrained by differential equations, such as optimal control problems. CasADi is written in C++ but provides interfaces for Python, MATLAB, and Octave. Since its inception in 2009, it has been widely used in academic teaching and various applications, including process control, robotics, and aerospace.
The core of CasADi is a symbolic framework that allows users to construct expressions and define differentiable functions. This framework supports sparse matrix operations and can be used to efficiently obtain derivatives using algorithmic differentiation (AD). CasADi offers two main expression types: scalar expressions (SX) and matrix expressions (MX), each with its own set of atomic operations. These expressions can be used to define function objects, which support numerical evaluation, symbolic evaluation, C code generation, and derivative calculations.
Key features of CasADi include:
- **Symbolic Differentiation**: efficient calculation of directional derivatives, Jacobians, and Hessians.
- ** Implicitly Defined Functions**: support for solving linear and nonlinear systems of equations, initial-value problems in ODEs and DAEs, and root-finding problems.
- **Optimization**: support for nonlinear programming (NLP) and conic optimization (LP, QP) problems, with various solver plugins available.
The paper provides an introduction to CasADi's symbolic framework, AD implementation, and application to implicit functions. It also includes a tutorial on using CasADi for optimization modeling and demonstrates the direct multiple shooting method for solving optimal control problems.CasADi is an open-source software framework for numerical optimization, designed to be more flexible and lower-level than popular algebraic modeling languages such as AMPL, GAMS, JuMP, and Pyomo. It is particularly well-suited for problems constrained by differential equations, such as optimal control problems. CasADi is written in C++ but provides interfaces for Python, MATLAB, and Octave. Since its inception in 2009, it has been widely used in academic teaching and various applications, including process control, robotics, and aerospace.
The core of CasADi is a symbolic framework that allows users to construct expressions and define differentiable functions. This framework supports sparse matrix operations and can be used to efficiently obtain derivatives using algorithmic differentiation (AD). CasADi offers two main expression types: scalar expressions (SX) and matrix expressions (MX), each with its own set of atomic operations. These expressions can be used to define function objects, which support numerical evaluation, symbolic evaluation, C code generation, and derivative calculations.
Key features of CasADi include:
- **Symbolic Differentiation**: efficient calculation of directional derivatives, Jacobians, and Hessians.
- ** Implicitly Defined Functions**: support for solving linear and nonlinear systems of equations, initial-value problems in ODEs and DAEs, and root-finding problems.
- **Optimization**: support for nonlinear programming (NLP) and conic optimization (LP, QP) problems, with various solver plugins available.
The paper provides an introduction to CasADi's symbolic framework, AD implementation, and application to implicit functions. It also includes a tutorial on using CasADi for optimization modeling and demonstrates the direct multiple shooting method for solving optimal control problems.