|Fulltext||0.13 MB||PDF (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|
|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.
|Keywords:||computer algebra system, automatic differentiation, algorithmic differentiation, dynamic optimization, Modelica|
|No. of pages:||7|
|Series:||Linköping Electronic Conference Proceedings|
|Publisher:||Linköping University Electronic Press, Linköpings universitet|
|REFERENCE TO THIS PAGE |