Files:DescriptionFile size FormatBrowse
Fulltext0.13 MBPDF (requires Acrobat Reader)Previous | Next
  
Authors:Joel Andersson: Department of Electrical Engineering and Optimization in Engineering Center (OPTEC), K.U. Leuven, Belgium
Boris Houska: Department of Electrical Engineering and Optimization in Engineering Center (OPTEC), K.U. Leuven, Belgium
Moritz Diehl: Department of Electrical Engineering and Optimization in Engineering Center (OPTEC), K.U. Leuven, Belgium
Publication title:Towards a Computer Algebra System with Automatic Differentiation for use with Object-Oriented modelling languages
Conference:3rd International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, Oslo, Norway, October 3
Publication type: Abstract and Fulltext
Issue:047
Article No.:011
Abstract:The Directed Acyclic Graph (DAG), which can be generated by object oriented modelling languages, is often the most natural way of representing and manipulating a dynamic optimization problem. With this representation, it is possible to step-by-step reformulate an (infinite dimensional) dynamic optimization problem into a (finite dimensional) non-linear program (NLP) by parametrizing the state and control trajectories.

We introduce CasADi, a minimalistic computer algebra system written in completely self-contained C++. The aim of the tool is to offer the benifits of a computer algebra to developers of C++ code, without the overhead usually associated with such systems. In particular, we use the tool to implement automatic differentiation, AD.

For maximum efficiency, CasADi works with two different graph representations interchangeably: One supporting only scalar-valued, built-in unary and binary operations and no branching, similar to the representation used by today’s tools for automatic differentiation by operator overloading. Secondly, a representation supporting matrixvalued operations, branchings such as if-statements as well as function calls to arbitrary functions (e.g. ODE/DAE integrators).

We show that the tool performs favorably compared to CppAD and ADOL-C, two state-of-the-art tools for AD by operator overloading. We also show how the tool can be used to solve a simple optimal control problem, minimal fuel rocket flight, by implementing a simple ODE integrator with sensitivity capabilities and solving the problem with the NLP solver IPOPT. In the last example, we show how we can use the tool to couple the modelling tool Jmodelica with the optimal control software ACADO Toolkit.

Language:English
Keywords:computer algebra system, automatic differentiation, algorithmic differentiation, dynamic optimization, Modelica
Year:2010
No. of pages:7
Pages:99-105
ISBN:978-91-7519-824-8
Series:Linköping Electronic Conference Proceedings
ISSN (print):1650-3686
ISSN (online):1650-3740
File:http://www.ep.liu.se/ecp/047/011/ecp4710011.pdf
Available:2010-09-21
Publisher:Linköping University Electronic Press, Linköpings universitet

REFERENCE TO THIS PAGE
Joel Andersson, Boris Houska, Moritz Diehl (2010). Towards a Computer Algebra System with Automatic Differentiation for use with Object-Oriented modelling languages, 3rd International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, Oslo, Norway, October 3 http://www.ep.liu.se/ecp_article/index.en.aspx?issue=047;article=011 (accessed 7/31/2014)