Casadi

Latest version: v3.6.5

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

Scan your dependencies

Page 4 of 16

3.4.0rc1

None

3.3.0

Install

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

| | Windows | Linux | Mac |
|------------|----------|----------------|--------------|
|**Matlab** | [R2014b](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/windows/casadi-matlabR2014b-v3.3.0.zip) or later,<br /> [R2014a](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/windows/casadi-matlabR2014a-v3.3.0.zip),<br /> [R2013a](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/windows/casadi-matlabR2013a-v3.3.0.zip) or R2013b | [R2014b](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/linux/casadi-matlabR2014b-v3.3.0.tar.gz) or later,<br />[R2014a](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/linux/casadi-matlabR2014a-v3.3.0.tar.gz) | [R2015a](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/osx/casadi-matlabR2015a-v3.3.0.tar.gz) or later,<br />[R2014b](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/osx/casadi-matlabR2014b-v3.3.0.tar.gz),<br />[R2014a](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/osx/casadi-matlabR2014a-v3.3.0.tar.gz)
| **Octave** | 4.2.1 ([32bit](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/windows/casadi-octave-4.2.1-w32-v3.3.0.zip) / [64bit](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/windows/casadi-octave-4.2.1-w64-v3.3.0.zip)) | [4.2.1](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/linux/casadi-octave-v3.3.0.tar.gz) | [4.2.1](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/osx/casadi-octave-v3.3.0.tar.gz)
| **Python** | Py27 ([32bit](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/windows/casadi-py27-v3.3.0.zip)<sup>1,2</sup> / [64bit](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/windows/casadi-py27-v3.3.0-64bit.zip)<sup>2</sup>),<br /> Py35 ([32bit](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/windows/casadi-py35-v3.3.0.zip)<sup>2</sup> / [64bit](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/windows/casadi-py35-v3.3.0-64bit.zip)<sup>2</sup>),<br /> Py36 ([32bit](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/windows/casadi-py36-v3.3.0.zip)<sup>2</sup> / [64bit](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/windows/casadi-py36-v3.3.0-64bit.zip)<sup>2</sup>) | [Py27](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/linux/casadi-py27-v3.3.0-64bit.tar.gz),<br />[Py35](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/linux/casadi-py35-v3.3.0-64bit.tar.gz),<br />[Py36](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/linux/casadi-py36-v3.3.0-64bit.tar.gz) | [Py27](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/osx/casadi-py27-v3.3.0.tar.gz),<br />[Py35](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/osx/casadi-py35-v3.3.0.tar.gz),<br />[Py36](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/osx/casadi-py36-v3.3.0.tar.gz)

<sup>1</sup> Use this when you have Python(x,y).
<sup>2</sup> Check your Python console if you need 32bit or 64bit - bitness should be printed at startup.

Or see the [download page](https://sourceforge.net/projects/casadi/files/CasADi/) for more options.

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

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

_New_: install with `pip install casadi`

Get started with the [example pack](https://sourceforge.net/projects/casadi/files/CasADi/3.3.0/casadi-example_pack-v3.3.0.zip).

Troubleshooting

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

Release notes
New and improved features
Support for finite differences
CasADi is now able to calculate derivatives using finite differences approximations. To enable this feature, set the "enable_fd" option to true for a function object. If the function object has built-in derivative support, you can disable it by setting the options `enable_forward`, `enable_reverse` and `enable_jacobian` to false.

The default algorithm is a central difference scheme with automatic step-size selection based on estimates of truncation errors and roundoff errors. You can change this to a (cheaper, but less accurate) one-sided scheme by setting `fd_method` to `forward` or `backward`. There is also an experimental discontinuity avoiding scheme (suitable if the function is differentiated near nonsmooth points that can be enable by setting `fd_method` to `smoothing`.

New linear solvers with support for C code generation
Two sparse direct linear solvers have been added to CasADi's runtime core: One based on an up-looking QR factorization, calculated using Householder reflections, and one sparse direct LDL method (square-root free variant of Cholesky). These solvers are available for both SX and MX, for MX as the linear solver plugins "qr" and "ldl", for MX as the methods "SX::qr_sparse" and "SX::ldl". They also support for C code generation (with the exception of LDL in MX).

Faster symbolic processing of MX graphs
A speed bottleneck, related to the topological sorting of large MX graphs has been identified and resolved. The complexity of the sorting algorithms is now linear in all cases.

Other improvements
* `A\y` and `y'/A` now work in Matlab/Octave
* Matrix power works
* First major release with [Opti](http://labs.casadi.org/Opti)
* `shell` compiler now works on Windows, allowing to do `jit` using Visual Studio
* Added introspection methods `instruction_*` that work for SX/MX Functions. See `accessing_mx_algorithm` example to see how you can walk an MX `graph`.
* Experimental feature to export SX/MX functions to pure-Matlab code.
* `DM::rand` creates a matrix with random numbers. `DM::rng` controls the seeding of the random number generator.

Distribution/build system
* Python interface no longer searches for/links to Python libraries (on Linux, OSX)
* Python interface no longer depends on Numpy at compile-time; CasADi works for any numpy version now
* Python binaries and wheels have come a step closer to true `manylinux`.
CasADi should now run on CentOS 5.

API changes
Refactored printing of function objects
The default printout of Function instances is now shorter and consistent across different Function derived classes (SX/MX functions, NLP solvers, integrators, etc.). The new syntax is:
python
from casadi import *
x = SX.sym('x')
y = SX.sym('x',2)
f = Function('f', [x,y],[sin(x)+y], ['x', 'y'], ['r'])
print(f) f:(x,y[2])->(r[2]) SXFunction
f.disp() Equivalent syntax (MATLAB style)
f.disp(True) Print algorithm

I.e. you get a list of inputs, with dimension if non-scalar, and a name of the internal class (here SXFunction).
You can also get the name as a string: `str(f)` or `f.str()`. If you want to print the algorithm, pass an optional argument "True", i.e. `f.str(True)` or `f.disp(True)`.

Changes to the codegen C API
The C API has seen continued improvements, in particular regarding the handling of external functions with memory allocation. See the user guide for the latest API.

Other changes
* `inv()` is now more efficient for large `SX`/`DM` matrices, and is evaluatable for `MX` (`cparse` by default).
The old variant is still available for `SX`/`MX` as `inv_minor`, and for `MX` as `inv_node`.
* Linear solver-related defaults are now set to `csparse` as opposed to `symbolicqr`
* In Matlab, when the CasADi result is a `vector<bool>`, this gets mapped to a logical matrix. E.g. `which_depends` is affected by this change.
* The sum-of-squares operator is now called `sumsqr` instead of `sum_square`.
* The API of the `Linsol` class has changed.

3.3.0rc2

None

3.3.0rc1

None

3.2.3

Install

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

| | Windows 64 bit | Linux (14.04+) | Mac
------------|----------|----------------|--------------
|**Matlab** | [R2014b](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/windows/casadi-matlabR2014b-v3.2.3.zip) or later | [R2014b](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/linux/casadi-matlabR2014b-v3.2.3.tar.gz) or later | [R2015a](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/osx/casadi-matlabR2015a-v3.2.3.tar.gz) or later
| | [R2014a](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/windows/casadi-matlabR2014a-v3.2.3.zip) | [R2014a](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/linux/casadi-matlabR2014a-v3.2.3.tar.gz) | [R2014b](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/osx/casadi-matlabR2014b-v3.2.3.tar.gz)
| | [R2013a](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/windows/casadi-matlabR2013a-v3.2.3.zip) or R2013b| | [R2014a](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/osx/casadi-matlabR2014a-v3.2.3.tar.gz)
| **Octave** | 4.2.1 [32bit](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/windows/casadi-octave-4.2.1-w32-v3.2.3.zip) or [64bit](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/windows/casadi-octave-4.2.1-w64-v3.2.3.zip) | [4.2.1](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/linux/casadi-octave-v3.2.3.tar.gz) | [4.2.1](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/osx/casadi-octave-v3.2.3.tar.gz)
| **Python** | Py27 (py [32bit](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/windows/casadi-py27-np1.9.1-v3.2.3.zip "Use this when you have Python(x,y). In general: check your Python console. Bitness should be printed at startup.") or py [64bit](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/windows/casadi-py27-np1.9.1-v3.2.3-64bit.zip "Check your Python console if you need 64bit. Bitness should be printed at startup.") ) | [Py27](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/linux/casadi-py27-np1.9-v3.2.3.tar.gz ) | [Py27](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/osx/casadi-py27-np1.9-v3.2.3.tar.gz)
| | Py35 (py [32bit](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/windows/casadi-py35-np1.9.1-v3.2.3.zip "Check your Python console if you need 32bit. Bitness should be printed at startup.") or py [64bit](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/windows/casadi-py35-np1.9.1-v3.2.3-64bit.zip "Check your Python console if you need 64bit. Bitness should be printed at startup.") ) | [Py35](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/linux/casadi-py35-np1.9-v3.2.3.tar.gz) | [Py35](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/osx/casadi-py35-np1.9-v3.2.3.tar.gz)
| | Py36 (py [32bit](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/windows/casadi-py36-np1.9.1-v3.2.3.zip "Check your Python console if you need 32bit. Bitness should be printed at startup.") or py [64bit](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/windows/casadi-py36-np1.9.1-v3.2.3-64bit.zip "Check your Python console if you need 64bit. Bitness should be printed at startup.") ) | [Py36](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/linux/casadi-py36-np1.11-v3.2.3.tar.gz) | [Py36](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/osx/casadi-py36-np1.11-v3.2.3.tar.gz)

_or see [download page](https://sourceforge.net/projects/casadi/files/CasADi/) for more options/versions ..._


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

<pre>
from sys import path
path.append(r".../casadi-py27-np1.9.1-v3.2.3")
from casadi import *
x = MX.sym("x")
print(jacobian(sin(x),x))
</pre>
</td></tr>
</table>

_New_: install with `pip install casadi` (you must have `pip --version` >= 8.1!)

Troubleshooting
Get started with the [example pack](https://sourceforge.net/projects/casadi/files/CasADi/3.2.3/casadi-example_pack-v3.2.3.zip).


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

Release notes
New features
* Introduced differentiable exponential matrix node `expm` (requires slicot)
* Introduced differentiable N-dimensional lookup tables: `interpolant` with 'bspline' solver.

Bugs in the SUNDIALS interface fixed

3.2.2

Page 4 of 16

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.