(599c) Automatic Sensitivity Analysis and Structure-Exploiting Nonlinear Programming for Dynamic Optimization | AIChE

(599c) Automatic Sensitivity Analysis and Structure-Exploiting Nonlinear Programming for Dynamic Optimization

CasADi [1] is an open-source software framework for numerical optimization, dynamic simulation and algorithmic differentiation. Of special interest are optimization problems constrained by differential equations, i.e. optimal control problems, both in an online and in an offline context. CasADi is a general-purpose tool, available for C++, Python, MATLAB and Octave, and uses a lower level of abstraction than is what is associated with popular algebraic modeling languages such as AMPL, GAMS, JuMP or Pyomo. This in makes CasADi suitable to be used as a building block for domain-specific tools, and to address non-standard problem formulations, in particular in the context of optimal control. Since its inception in late 2009, CasADi has been used successfully for academic teaching as well as in applications from multiple fields, including process control, robotics and aerospace.

In this presentation we give a general introduction to the tool and discuss two of the key features of the tool which sets it apart from other optimization modeling tools; namely (1) efficient and fully automatic sensitivity analysis for initial-value problems in ordinary differential equations (ODE) and differential algebraic equations (DAE) and (2) structure-exploiting nonlinear programming.

CasADi automates ODE/DAE sensitivity analysis by working with a relatively rich problem formulation, namely that of an initial-value problem in DAE coupled to a terminal-value problem in DAE. Problems of this form can be efficiently be solved with efficient integrator schemes such as backward differential formulas (BDF) or implicit Runge-Kutta methods, implemented in popular software tools such as SUNDIALS. CasADi supports differentiation of such objects, to arbitrary order and using any combination of forward and adjoint sensitivity analysis, by automatically generating augmented ODE/DAE systems and then exploiting their structure during numerical integration.

The second feature we discuss is that of structure-exploiting nonlinear programming (NLP), particular in the context of simultanous methods for optimal control. While sparsity exploiting NLP solvers - such as IPOPT - often work well for very sparse problems arising from fully simultanous discretization approaches, some type of structure exploitation is often needed for hybrid discretization approaches. These hybrid discretization methods, e.g the direct multiple shooting method, can then efficiently be applied to higher-dimensional optimal control problems. CasADi supports structure-exploiting nonlinear programming by two different approaches, namely by an implementation of the lifted Newton method [2] and via an interface to the block-structure exploiting NLP solver blockSQP [3].

[1] J. Andersson. A general-purpose software framework for dynamic optimization, Ph. D. thesis. Faculty of Engineering, KU Leuven, Leuven, Belgium (2013)

[2] J. Albersmeyer and M. Diehl. The Lifted Newton Method and its Application in Optimization. SIAM Journal on Optimization 20, 3 (2010), 1655–1684

[3] D. Janka, C. Kirches, S. Sager, A. Waechter. An SR1/BFGS SQP algorithm for nonconvex nonlinear programs with block-diagonal Hessian matrix. Mathematical Programming Computation 8, 4 (2016), 435-459.