[Ipopt] CasADi 2.4 for Python and MATLAB

Joel Andersson j.a.e.andersson at gmail.com
Thu Sep 24 12:55:39 EDT 2015


Dear IPOPT user community,

We are happy to announce the release of CasADi 2.4. CasADi is a free and
open-source tool for nonlinear optimization and optimal control. It is
available for C++, Python, Haskell(*) and starting with this release MATLAB.

CasADi consists of a self-contained symbolic core that implements
algorithmic differentiation (AD) coupled to set of solver plugins for
nonlinear programming, solution of initial-value problems in ODEs or DAEs
etc. CasADi's state-of-the-art AD framework uses a source code
transformation (SCT) approach to efficiently calculate
Jacobian-times-vector products (the so-called forward and reverse modes of
AD) as well as complete, large and sparse Jacobians and Hessians (using a
graph coloring approach). These capabilities of CasADi allow the interfaced
solvers, including IPOPT, to automatically obtain all required derivative
information and no knowledge of AD is needed to use the tool per se.

CasADi 2.4 is a major release and introduces a new, more compact syntax as
well as a number of new features, including improved export of
self-contained C-code, just-in-time compilation and the above mentioned
MATLAB front-end. To install CasADi, simply download one of the precompiled
binaries, available for Windows, Linux and OSX. These binaries come with
IPOPT pre-installed. CasADi can also be compiled from sources.

The following MATLAB script illustrates how a simple NLP can be solved with
IPOPT via CasADi/MATLAB:

% Import CasADi
import casadi.*

% Create NLP solver instance
x = SX.sym('x');  % Cf. 'sym' in symbolic toolbox
y = SX.sym('y');
z = SX.sym('z');
v = [x;y;z];
f = x^2 + 100*z^2;     % minimize    x^2 + 100*z^2
g = z + (1-x)^2 - y;   % subject to  z + (1-x)^2 - y == 0
solver = NlpSolver('solver', 'ipopt', struct('x', v, 'f', f, 'g', g));

% Pass initial guess, bounds and solve the NLP
res = solver(struct('x0',[2.5 3.0 0.75],...
                    'lbx',-inf,'ubx',inf,'lbg',0,'ubg',0));
disp(sprintf('Solution: %d, Constraint multipliers for g: %d',...
             full(res.f), full(res.lam_g)));

For a more complete introduction, follow the interactive demo on
http://demo.casadi.org or read the user guide (and other documents)
available from the website, http://casadi.org.

Best regards,
Joel, Joris and & Greg - The CasADi development team

(*) The Haskell front-end is part of the Dynobud tool, cf.
https://github.com/ghorn/dynobud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20150924/860006d9/attachment.html>


More information about the Ipopt mailing list