CasADi -- A symbolic package for automatic differentiation and optimal control

We present CasADi, a free, open-source software tool for fast, yet efficient solution of nonlinear optimization problems in general and dynamic optimization problems in particular. To the developer of algorithms for numerical optimization and to the advanced user of such algorithms, it offers a level of abstraction which is notably lower, and hence more flexible, than that of algebraic modeling languages such as AMPL or GAMS, but higher than working with a conventional automatic differentiation (AD) tool.CasADi is best described as a minimalistic computer algebra system (CAS) implementing automatic differentiation in eight different flavors. Similar to algebraic modeling languages, it includes high-level interfaces to state-of-the-art numerical codes for nonlinear programming, quadratic programming and integration of differential-algebraic equations. CasADi is implemented in self-contained C++ code and contains full-featured front-ends to Python and Octave for rapid prototyping. In this paper, we present the AD framework of CasADi and benchmark the tool against AMPL for a set of nonlinear programming problems from the CUTEr test suite.

[1]  H. Bock,et al.  A Multiple Shooting Algorithm for Direct Solution of Optimal Control Problems , 1984 .

[2]  A. Griewank,et al.  Automatic differentiation of algorithms : theory, implementation, and application , 1994 .

[3]  Andreas Griewank,et al.  Algorithm 755: ADOL-C: a package for the automatic differentiation of algorithms written in C/C++ , 1996, TOMS.

[4]  Thomas F. Coleman,et al.  Structured automatic differentiation , 1998 .

[5]  Andreas Griewank,et al.  Evaluating derivatives - principles and techniques of algorithmic differentiation, Second Edition , 2000, Frontiers in applied mathematics.

[6]  Christian Bischof,et al.  Computing derivatives of computer programs , 2000 .

[7]  Andreas Griewank,et al.  Detecting Jacobian sparsity patterns by Bayesian probing , 2002, Math. Program..

[8]  Christian H. Bischof,et al.  Combining source transformation and operator overloading techniques to compute derivatives for MATLAB programs , 2002, Proceedings. Second IEEE International Workshop on Source Code Analysis and Manipulation.

[9]  Stephen J. Wright,et al.  Object-oriented software for quadratic programming , 2003, TOMS.

[10]  David M. Beazley,et al.  Automated scientific software scripting with SWIG , 2003, Future Gener. Comput. Syst..

[11]  Carol S. Woodward,et al.  Enabling New Flexibility in the SUNDIALS Suite of Nonlinear and Differential/Algebraic Equation Solvers , 2020, ACM Trans. Math. Softw..

[12]  Alex Pothen,et al.  What Color Is Your Jacobian? Graph Coloring for Computing Derivatives , 2005, SIAM Rev..

[13]  Lorenz T. Biegler,et al.  On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming , 2006, Math. Program..

[14]  Shaun A. Forth An efficient overloaded implementation of forward mode automatic differentiation in MATLAB , 2006, TOMS.

[15]  Jorge Nocedal,et al.  Knitro: An Integrated Package for Nonlinear Optimization , 2006 .

[16]  Shaun A. Forth,et al.  Source Transformation for MATLAB Automatic Differentiation , 2006, International Conference on Computational Science.

[17]  Razvan Pascanu,et al.  Theano: A CPU and GPU Math Compiler in Python , 2010, SciPy.

[18]  Moritz Diehl,et al.  An auto-generated real-time iteration algorithm for nonlinear MPC in the microsecond range , 2011, Autom..