Presentation is loading. Please wait.

Presentation is loading. Please wait.

AD Workshop - Nice 2005 ADiCape in a large-scale industrial problem Monika Petera, Martin Bücker, Arno Rasch Institute for Scientific Computing RWTH Aachen.

Similar presentations


Presentation on theme: "AD Workshop - Nice 2005 ADiCape in a large-scale industrial problem Monika Petera, Martin Bücker, Arno Rasch Institute for Scientific Computing RWTH Aachen."— Presentation transcript:

1 AD Workshop - Nice 2005 ADiCape in a large-scale industrial problem Monika Petera, Martin Bücker, Arno Rasch Institute for Scientific Computing RWTH Aachen University

2 AD Workshop - Nice 2005 Optimization Problem Goal: To minimize the objective function: at the final time The Model: A system of differential and algebraic equations (DAE): where: - set of state variables - subset of parameters from

3 AD Workshop - Nice 2005 Modeling languages A model can be written in a one of modeling languages, e.g. gPROMS, Modelica, and is usually represented as a system of mathematical equations An equation oriented approach does not make any assumptions about how to solve a model or what quantities are considered known and unknown. CapeML – A Common Model Exchange Language for Chemical Process Modeling designed for supporting the modeling process. CapeML is a neutral model exchange representation based on the XML standard. “CapeML – A Model Exchange Language for Chemical Process Modeling” - L.v.Wedel (TR May 2002)

4 AD Workshop - Nice 2005 A fragment of CapeML code <VariableOccurrence definition="V-car-alpha“/>

5 AD Workshop - Nice 2005 DyOS- Dynamic Optimization Software takes 90% of the computational time commercial CapeML ESO model server ESO (Equation Set Object) - an internal representation of the computation tree. Process System Engineering RWTH Aachen University DAE

6 AD Workshop - Nice 2005 The model of the Distillation Column The model consists of 3 submodels: Swamp (1) Condenser (1) Tray (4) and a set of connecting equations. Liquid_inlet Vapour_outlet Condenser Swamp Tray 1 Tray 2 Tray 3 Tray 4

7 AD Workshop - Nice 2005 Jacobian sparsity structure connecting equations Swamp Condenser Tray (4) # equations # variables # nonzeros

8 AD Workshop - Nice 2005 Newton Step LU- scaled system Jacobian matrix state variables: derivatives:

9 AD Workshop - Nice 2005 Compute for j =1,..., j max while convergence criterion not satisfied for k =0,..., j -1 Integration Algorithm Reuse LU decomposition Process System Engineering RWTH Aachen University AD seeding with M. Schlegel and W. Marquardt and R. Ehrig and U. Nowak: “Sensitivity Analysis of Linearly-implicit Differential-algebraic Systems by One-step Extrapolation” 2004

10 AD Workshop - Nice 2005 ESO of DAE System Modeling languages model.mo CapeML model.xml ESO Transform to CapeML XML init_vars.xml CapeML ESO model server

11 AD Workshop - Nice 2005 XSLT – Transform language CapeML document Stylesheet transformed CapeML XSLT processor On any XML-based language document eg. in CapeML, an XSLT stylesheet is applied, to generate new document. ADiCape is based on XSLT Transformation Language. ADiCape consists of 2 XSLT Stylesheets (at the moment)

12 AD Workshop - Nice 2005 ADiCape_var.xsl ADiCape_var.xs l gradients for the dF/dTemp XML init_vars.xml name="S.Temp" name="S.g_Temp" dimension="410" index="22" initial_value="1"

13 AD Workshop - Nice 2005 ADiCape Modeling languages model.mo CapeML model.xml CapeML g_model.xml XML g_init_vars.xml XSLT ADiCape_eq ESO Transform to CapeML XML init_vars.xml XSLT ADiCape_var

14 AD Workshop - Nice 2005 ADiCape_eq.xsl Templates: chain rule of differentiation: function intrinsic:differentiation of math-operations: <VariableOccurrence definition="V-car-alpha“/> … <VariableOccurrence definition="V-car-alpha“/> <VariableOccurrence definition="V-car-g_alpha“/> …

15 AD Workshop - Nice 2005 ESO for the differentiated DAE Modeling languages model.mo CapeML model.xml CapeML g_model.xml XML g_init_vars.xml XSLT ADiCape_eq ESO g_ESO Transform to CapeML XML init_vars.xml XML g_init_vars.xml XSLT ADiCape_var

16 AD Workshop - Nice 2005 XML ESO ESO g_ESO XML ESO m_esom_g_eso DyOS Call First derivatives original DAE ADiCape: Full Jacobian Jacobian times Matrix Sparse Jacobian matrices with known sparsity pattern:  do not calculate “zeros”  cut down number of operations  save space CapeML ESO model server

17 AD Workshop - Nice 2005 Matrix compression Sparsity aware seeding with CPR – Curtis-Powell-Reid graph-coloring method! BUT HOW ??

18 AD Workshop - Nice 2005 Sparsity aware seeding * =

19 AD Workshop - Nice 2005 Compressed Full Jacobian 2.8 GHz Pentium 4 512MB cash sizetime full206x41055 min compressed206x133.4 s factor31.5970 ?!

20 AD Workshop - Nice 2005 Future Work ESO g_ESO XML ESO m_esom_g_eso DyOS Call Second derivatives h_ESO First derivatives original DAE change DyOS System:  new Optimizer (IPOPT)* which uses 2nd derivatives  change Integration Algorithm * A. Wächter and L. T. Biegler: “On the Implementation of a Primal-Dual Interior Point Filter Line Search Algorithm for Large-Scale Nonlinear Programming”, 2004

21 AD Workshop - Nice 2005 Second derivatives

22 AD Workshop - Nice 2005 Summary and Conclusions  ADiCape is a source transformation tool employing the forward mode of AD written for CapeML language  with Curtis-Powell-Reid method, calculation of a compressed sparse Jacobian brings space savings and considerable speed-up  We expect DyOS integrator performance to considerably improve with the use of AD-generated derivatives  With the new optimizer and precise AD second derivatives we hope to considerably cut down the number of iterations of the Integrator.

23 AD Workshop - Nice 2005 THANK YOU FOR YOUR ATTENTION !


Download ppt "AD Workshop - Nice 2005 ADiCape in a large-scale industrial problem Monika Petera, Martin Bücker, Arno Rasch Institute for Scientific Computing RWTH Aachen."

Similar presentations


Ads by Google