Casadi

Latest version: v3.6.5

Safety actively analyzes 630254 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 16

3.4.5

Install

Grab a binary from the table (for MATLAB, use the newest compatible version below):


<table>
<tr><th></th><th>Windows</th><th>Linux</th><th>Mac</th></tr>
<tr>
<th>Matlab</th>
<td><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-matlabR2016a-v3.4.5.zip">R2016a</a> or later,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-matlabR2014b-v3.4.5.zip">R2014b</a>,<br /> <a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-matlabR2014a-v3.4.5.zip">R2014a</a>,<br /> <a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-matlabR2013a-v3.4.5.zip">R2013a</a> or R2013b</td>
<td><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-linux-matlabR2014b-v3.4.5.tar.gz">R2014b</a> or later,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-linux-matlabR2014a-v3.4.5.tar.gz">R2014a</a></td>
<td><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-osx-matlabR2015a-v3.4.5.tar.gz">R2015a</a> or later,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-osx-matlabR2014b-v3.4.5.tar.gz">R2014b</a>,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-osx-matlabR2014a-v3.4.5.tar.gz">R2014a</a></td>
</tr>
<tr>
<th>Octave</th>
<td> 4.4.1 (<a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-octave-4.4.1-w32-v3.4.5.zip">32bit</a> / <a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-octave-4.4.1-w64-v3.4.5.zip">64bit</a>), <br /> 4.4.0 (<a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-octave-4.4.0-w32-v3.4.5.zip">32bit</a> / <a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-octave-4.4.0-w64-v3.4.5.zip">64bit</a>)</td>
<td><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-linux-octave-4.4.1-v3.4.5.tar.gz">4.4.1</a>, <br/><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-linux-octave-v3.4.5.tar.gz">4.2.2</a></td>
<td><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-osx-octave-v3.4.5.tar.gz">4.4.0</a></td>
</tr>
<tr>
<th rowspan="2">Python</th>
<td>Py27 (<a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-py27-v3.4.5.zip">32bit</a><sup>*</sup> / <a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-py27-v3.4.5-64bit.zip">64bit</a><sup>*</sup>),<br /> Py35 (<a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-py35-v3.4.5.zip">32bit</a><sup>*</sup> / <a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-py35-v3.4.5-64bit.zip">64bit</a><sup>*</sup>),<br /> Py36 (<a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-py36-v3.4.5.zip">32bit</a><sup>*</sup> / <a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-py36-v3.4.5-64bit.zip">64bit</a><sup>*</sup>),<br /> Py37 (<a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-py37-v3.4.5.zip">32bit</a><sup>*</sup> / <a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-windows-py37-v3.4.5-64bit.zip">64bit</a><sup>*</sup>) </td>
<td><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-linux-py27-v3.4.5-64bit.tar.gz">Py27</a>,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-linux-py35-v3.4.5-64bit.tar.gz">Py35</a>,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-linux-py36-v3.4.5-64bit.tar.gz">Py36</a>,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-linux-py37-v3.4.5-64bit.tar.gz">Py37</a></td>
<td> <a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-osx-py27-v3.4.5.tar.gz">Py27</a>,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-osx-py35-v3.4.5.tar.gz">Py35</a>,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-osx-py36-v3.4.5.tar.gz">Py36</a>,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.5/casadi-osx-py37-v3.4.5.tar.gz">Py37</a></td>
</tr>
<tr>
<td colspan="3">or just <code>pip install casadi</code> (needs <code>pip -V</code>>=8.1)</td>
</tr>
</table>

(<sup>*</sup>) Check your Python console if you need 32bit or 64bit - bitness should be printed at startup.

Unzip in your home directory and adapt the path:
<table>
<tr><th>Matlab/Octave</th><th>Python</th><tr>
<tr><td>
<pre>
<code>
addpath('&lt;yourpath>/casadi-matlabR2014a-v3.4.5')
import casadi.*
x = MX.sym('x')
disp(jacobian(sin(x),x))
</code>
</pre>
</td><td>

<pre>
<code>
from sys import path
path.append(r"&lt;yourpath>/casadi-py27-v3.4.5")
from casadi import *
x = MX.sym("x")
print(jacobian(sin(x),x))
</code>
</pre>
</td></tr>
</table>

Get started with the [example pack](https://github.com/casadi/casadi/releases/download/3.4.5/casadi-example_pack-v3.4.5.zip).

Troubleshooting
Getting error "CasADi is not running from its package context." in Python? Check that you have `casadi-py27-v3.4.5/casadi/casadi.py`. If you have `casadi-py27-v3.4.5/casadi.py` instead, that's not good; add an extra `casadi` folder.

Got stuck while installing? You may also try out CasADi without installing, right in your browser (pick [Python](http://live.casadi.org) or [Octave/Matlab](http://live-octave.casadi.org)).

Release notes
Credit where credit is due: Proper attribution of linear solver routines, reimplementation of code generation for linear solvers [2158](https://github.com/casadi/casadi/issues/2158), [#2134](https://github.com/casadi/casadi/issues/2134)

CasADi 3.3 introduced support for two sparse direct linear solvers relying based on sparse direct QR factorization and sparse direct LDL factorization, respectively. In the release notes and in the code, it was not made clear enough that part of these routines could be considered derivative works of CSparse and LDL, respectively, both under copyright of Tim Davis. In the current release, routines derived from CSparse and LDL are clearly marked as such and to be considered derivative work under LGPL. All these routines reside inside the `casadi::Sparsity` class.
Since CasADi, CSparse and LDL all have the same open-source license (LGPL), this will not introduce any additional restrictions for users.

Since C code generated from CasADi is *not* LGPL (allowing CasADi users to use the generated code freely), all CSparse and LDL derived routines have been removed or replaced in CasADi's C runtime. This means that code generation for CasADi's 'qr' and 'ldl' is now possible without any additional license restrictions. A number of bugs have also been resolved.

Parametric sensitivity for NLP solvers [724](https://github.com/casadi/casadi/issues/724)

CasADi 3.4 introduces differentiability for NLP solver instances in CasADi. Derivatives can be calculated efficiently with either forward or reverse mode algorithmic differentiation. We will detail this functionality in future publications, but in the meantime, feel free to reach out to Joel if you have questions about the functionality. The implementation is based on using derivative propagation rules to the implicit function theorem, applied to the nonlinear KKT system. It is part of the NLP solver base class and should in principle work with any NLP solver, although the factorization and solution of the KKT system (based on the sparse QR above) is likely to be a speed bottle neck in applications. The derivative calculations also depend on accurate Lagrange multipliers to be available, in particular with the correct signs for all multipliers. Functions for calculating parametric sensitivities for a particular system can be C code generated.

A primal-dual active set method for quadratic programming

The parametric sensitivity analysis for NLP solvers, detailed above, is only as good as the multipliers you provide to it. Multipliers from an interior point method such as IPOPT are usually not accurate enough to be used for the parametric sensitivity analysis, which in particular relies on knowledge of the active set. For this reason, we have started work on a primal-dual active set method for quadratic programming. The method relies on the same factorization of the linearized KKT system as the parametric sensitivity analysis and will support C code generation. The solver is available as the "activeset" plugin in CasADi. The method is still work-in-progress and in particular performs poorly if the Hessian matrix is not strictly positive definite.

Changes in Opti
* `describe` methods in Matlab now follows index-1 based convention.
* Added `show_infeasibilities` to help debugging infeasible problems.
* Added `opti.lbg,opti.ubg`

Changes in existing functionality
* Some CasADi operations failed when the product of rows and columns of a matrix was larger then `2^31-1`.
This limit has been raised to `2^63-1` by changing CasADi integer types to `casadi_int` (`long long`).
The change is hidden for Python/Octave/Matlab users, but C++ users may be affected.
* Fixed various bottlenecks in large scale MX Function initialization
* Non-zero location reports for NaN/Inf now follow index-1 based convention in Matlab interface.

Added functionality
* SX Functions can be serialized/pickled/saved now.
* Added `for-loop equivalents` to the users guide
* New backend for parallel maps: "thread" target, shipped in the binaries.
* Uniform 'success' flag in `solver.stats()` for `nlpsol`/`conic`
* Added `evalf` function to numerically evaluate an SX/MX matrix that does not depend on any symbols
* Added `diff` and `cumsum` (follows the Matlab convention)
* Added a rootfinder plugin ('fast_newton') that can code-generate
* Added binary search for Linear/BSpline Interpolant. Used by default for grid dimensions (>=100)

Binaries
* Binaries now come with a large set of plugins enabled
* Binaries ship with "thread" parallelization
* Binaries are hosted on Github instead of Sourceforge

Misc
* Default build mode is `Release` mode once again (as was always intended)
* CasADi passes with `-Werror` for `gcc-6` and `gcc-7`

3.4.4

Install

Grab a binary from the table (for MATLAB, use the newest compatible version below):


<table>
<tr><th></th><th>Windows</th><th>Linux</th><th>Mac</th></tr>
<tr>
<th>Matlab</th>
<td><a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-windows-matlabR2014b-v3.4.4.zip">R2014b</a> or later,<br /> <a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-windows-matlabR2014a-v3.4.4.zip">R2014a</a>,<br /> <a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-windows-matlabR2013a-v3.4.4.zip">R2013a</a> or R2013b</td>
<td><a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-linux-matlabR2014b-v3.4.4.tar.gz">R2014b</a> or later,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-linux-matlabR2014a-v3.4.4.tar.gz">R2014a</a></td>
<td><a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-osx-matlabR2015a-v3.4.4.tar.gz">R2015a</a> or later,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-osx-matlabR2014b-v3.4.4.tar.gz">R2014b</a>,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-osx-matlabR2014a-v3.4.4.tar.gz">R2014a</a></td>
</tr>
<tr>
<th>Octave</th>
<td> 4.2.2 (<a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-windows-octave-4.2.2-w32-v3.4.4.zip">32bit</a> / <a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-windows-octave-4.2.2-w64-v3.4.4.zip">64bit</a>)</td>
<td><a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-linux-octave-v3.4.4.tar.gz">4.2.2</a></td>
<td><a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-osx-octave-v3.4.4.tar.gz">4.4.0</a></td>
</tr>
<tr>
<th rowspan="2">Python</th>
<td>Py27 (<a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-windows-py27-v3.4.4.zip">32bit</a><sup>*</sup> / <a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-windows-py27-v3.4.4-64bit.zip">64bit</a><sup>*</sup>),<br /> Py35 (<a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-windows-py35-v3.4.4.zip">32bit</a><sup>*</sup> / <a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-windows-py35-v3.4.4-64bit.zip">64bit</a><sup>*</sup>),<br /> Py36 (<a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-windows-py36-v3.4.4.zip">32bit</a><sup>*</sup> / <a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-windows-py36-v3.4.4-64bit.zip">64bit</a><sup>*</sup>) </td>
<td><a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-linux-py27-v3.4.4-64bit.tar.gz">Py27</a>,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-linux-py35-v3.4.4-64bit.tar.gz">Py35</a>,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-linux-py36-v3.4.4-64bit.tar.gz">Py36</a></td>
<td> <a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-osx-py27-v3.4.4.tar.gz">Py27</a>,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-osx-py35-v3.4.4.tar.gz">Py35</a>,<br /><a href="https://github.com/casadi/casadi/releases/download/3.4.4/casadi-osx-py36-v3.4.4.tar.gz">Py36</a></td>
</tr>
<tr>
<td colspan="3">or just <code>pip install casadi</code> (needs <code>pip -V</code>>=8.1)</td>
</tr>
</table>

(<sup>*</sup>) Check your Python console if you need 32bit or 64bit - bitness should be printed at startup.

Unzip in your home directory and adapt the path:
<table>
<tr><th>Matlab/Octave</th><th>Python</th><tr>
<tr><td>
<pre>
<code>
addpath('&lt;yourpath>/casadi-matlabR2014a-v3.4.4')
import casadi.*
x = MX.sym('x')
disp(jacobian(sin(x),x))
</code>
</pre>
</td><td>

<pre>
<code>
from sys import path
path.append(r"&lt;yourpath>/casadi-py27-v3.4.4")
from casadi import *
x = MX.sym("x")
print(jacobian(sin(x),x))
</code>
</pre>
</td></tr>
</table>

Get started with the [example pack](https://github.com/casadi/casadi/releases/download/3.4.4/casadi-example_pack-v3.4.4.zip).

Troubleshooting
Getting error "CasADi is not running from its package context." in Python? Check that you have `casadi-py27-v3.4.4/casadi/casadi.py`. If you have `casadi-py27-v3.4.4/casadi.py` instead, that's not good; add an extra `casadi` folder.

Got stuck while installing? You may also try out CasADi without installing, right in your browser (pick [Python](http://live.casadi.org) or [Octave/Matlab](http://live-octave.casadi.org)).

Release notes
Credit where credit is due: Proper attribution of linear solver routines, reimplementation of code generation for linear solvers [2158](https://github.com/casadi/casadi/issues/2158), [#2134](https://github.com/casadi/casadi/issues/2134)

CasADi 3.3 introduced support for two sparse direct linear solvers relying based on sparse direct QR factorization and sparse direct LDL factorization, respectively. In the release notes and in the code, it was not made clear enough that part of these routines could be considered derivative works of CSparse and LDL, respectively, both under copyright of Tim Davis. In the current release, routines derived from CSparse and LDL are clearly marked as such and to be considered derivative work under LGPL. All these routines reside inside the `casadi::Sparsity` class.
Since CasADi, CSparse and LDL all have the same open-source license (LGPL), this will not introduce any additional restrictions for users.

Since C code generated from CasADi is *not* LGPL (allowing CasADi users to use the generated code freely), all CSparse and LDL derived routines have been removed or replaced in CasADi's C runtime. This means that code generation for CasADi's 'qr' and 'ldl' is now possible without any additional license restrictions. A number of bugs have also been resolved.

Parametric sensitivity for NLP solvers [724](https://github.com/casadi/casadi/issues/724)

CasADi 3.4 introduces differentiability for NLP solver instances in CasADi. Derivatives can be calculated efficiently with either forward or reverse mode algorithmic differentiation. We will detail this functionality in future publications, but in the meantime, feel free to reach out to Joel if you have questions about the functionality. The implementation is based on using derivative propagation rules to the implicit function theorem, applied to the nonlinear KKT system. It is part of the NLP solver base class and should in principle work with any NLP solver, although the factorization and solution of the KKT system (based on the sparse QR above) is likely to be a speed bottle neck in applications. The derivative calculations also depend on accurate Lagrange multipliers to be available, in particular with the correct signs for all multipliers. Functions for calculating parametric sensitivities for a particular system can be C code generated.

A primal-dual active set method for quadratic programming

The parametric sensitivity analysis for NLP solvers, detailed above, is only as good as the multipliers you provide to it. Multipliers from an interior point method such as IPOPT are usually not accurate enough to be used for the parametric sensitivity analysis, which in particular relies on knowledge of the active set. For this reason, we have started work on a primal-dual active set method for quadratic programming. The method relies on the same factorization of the linearized KKT system as the parametric sensitivity analysis and will support C code generation. The solver is available as the "activeset" plugin in CasADi. The method is still work-in-progress and in particular performs poorly if the Hessian matrix is not strictly positive definite.

Changes in Opti
* `describe` methods in Matlab now follows index-1 based convention.
* Added `show_infeasibilities` to help debugging infeasible problems.
* Added `opti.lbg,opti.ubg`

Changes in existing functionality
* Some CasADi operations failed when the product of rows and columns of a matrix was larger then `2^31-1`.
This limit has been raised to `2^63-1` by changing CasADi integer types to `casadi_int` (`long long`).
The change is hidden for Python/Octave/Matlab users, but C++ users may be affected.
* Fixed various bottlenecks in large scale MX Function initialization
* Non-zero location reports for NaN/Inf now follow index-1 based convention in Matlab interface.

Added functionality
* SX Functions can be serialized/pickled/saved now.
* Added `for-loop equivalents` to the users guide
* New backend for parallel maps: "thread" target, shipped in the binaries.
* Uniform 'success' flag in `solver.stats()` for `nlpsol`/`conic`
* Added `evalf` function to numerically evaluate an SX/MX matrix that does not depend on any symbols
* Added `diff` and `cumsum` (follows the Matlab convention)
* Added a rootfinder plugin ('fast_newton') that can code-generate
* Added binary search for Linear/BSpline Interpolant. Used by default for grid dimensions (>=100)

Binaries
* Binaries now come with a large set of plugins enabled
* Binaries ship with "thread" parallelization
* Binaries are hosted on Github instead of Sourceforge

Misc
* Default build mode is `Release` mode once again (as was always intended)
* CasADi passes with `-Werror` for `gcc-6` and `gcc-7`

3.4.3

3.4.2

Octave bumped to `4.2.2`.
Worhp solver fixed.
Docstrings are back for all casadi methods.

3.4.1

3.4.0

Page 3 of 16

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.