Omu_IntODE Class Reference

#include <Omu_IntODE.h>

Inheritance diagram for Omu_IntODE:

Inheritance graph
base refererrect $classOmu__IntEuler.html 7,156 111,183rect $classOmu__IntRK4.html 135,156 233,183rect $classOmu__IntRKsuite.html 257,156 377,183rect $classOmu__Integrator.html 127,7 241,33
[legend]
Collaboration diagram for Omu_IntODE:

Collaboration graph
base refererrect $classOmu__Integrator.html 483,556 597,583rect $classOmu__SVec.html 169,431 260,458rect $classOmu__StateVec.html 232,290 344,316rect $classOmu__Vec.html 621,124 701,151rect $classOmu__DependentVec.html 464,290 611,316rect $classOmu__VariableVec.html 699,290 827,316rect $classMesch_1_1VECP.html 609,7 713,34rect $classMesch_1_1MATP.html 236,7 340,34rect $classOmu__Jacobian.html 432,124 544,151rect $classOmu__DepVec.html 427,431 531,458rect $classMesch_1_1IVECP.html 381,7 491,34rect $classOmu__Program.html 787,431 896,458
[legend]

List of all members.


Detailed Description

Interface for standard solvers for Ordinary Differential Equations (ODE) hiding details of sensitivity analysis.

Sensitivity equations are appended to the model equations. This base class bypasses the high-level Omu_Integrator::solve method and directly calls sys->continuous (optionally exploiting ADOL-C). Nevertheless discrete-time states and control parameters are treated in one vector of model parameters for derived classes.

Public Member Functions

 Omu_IntODE ()
 constructor
 ~Omu_IntODE ()
 destructor
virtual void ode_solve (double tstart, VECP y, const VECP u, double tend)=0
 Interface to be implemented by derived ODE solvers.
void syseq (double t, const VECP y, const VECP u, VECP f)
 Callback routine for evaluating the model by derived ODE solvers.
Implementation of predefined methods.
See also:
Omu_Integrator


void init (int k, const Omu_StateVec &xc, const Omu_Vec &q, const Omu_DependentVec &Fc, bool sa)
 Initialize integrator, like adaptation of array dimensions and test of pre-conditions, like explicit ODE.
void solve (int kk, double tstart, double tend, const Omu_VariableVec &x, const Omu_VariableVec &u, Omu_Program *sys, Omu_DependentVec &Ft, Omu_StateVec &xt)
 Solve differential equations over one sample period.

Protected Member Functions

Depreciated methods (provided for old versions of derived classes).
void init_stage (int k, const Omu_States &x, const Omu_Vector &u, bool sa=false)
 Initialize solution of differential equations for stage k.


Member Function Documentation

void Omu_IntODE::init ( int  k,
const Omu_StateVec xc,
const Omu_Vec q,
const Omu_DependentVec Fc,
bool  sa 
) [virtual]

Initialize integrator, like adaptation of array dimensions and test of pre-conditions, like explicit ODE.

An explicit ODE is present if Fc.Jdx.is_scalar() and Fc.Jdx[0][0] != 0.0. An algebraic state j, 0<=j<_n can be identified with Fc.Jdx.is_zero_column[j]. Note that the init method should not find consistent initial conditions of a DAE as parameters may jump between sample periods kk afterwards.

Parameters:
k stage
xc continuous-time states, dim(xc)=_n
q sensitivity parameters, dim(q)=_nq
Fc pre-initialized data structures for evaluating residuals, dim(Fc)=_n, including structurally analyzed Jacobians, dim(Fc.Jx)=_n._n, dim(Fc.Jxp)=_n._n, dim(Fc.Jq)=_n._nq
sa indicates if sensitivity analysis is required

Reimplemented from Omu_Integrator.

void Omu_IntODE::solve ( int  kk,
double  tstart,
double  tend,
const Omu_VariableVec x,
const Omu_VariableVec u,
Omu_Program sys,
Omu_DependentVec Ft,
Omu_StateVec xt 
) [virtual]

Solve differential equations over one sample period.

The differential-algebraic equations can be evaluated by calling Omu_Program::continuous for sys. Note that the first _nd elements of xt are discrete-time states that need to be treated like control parameters u by an integrator. Furthermore, the last _nv elements of xt are expansion variables that are not seen by the optimizer and accordingly no sensitivities are required with respect to them. The default implementation of solve calls the high-level version.

Parameters:
kk sample period
tstart start time for integration
tend end time for integration
x state variables for optimization, including bounds etc.
u control parameters for optimization
sys problem definition for calling Omu_Program::continuous
Ft pre-initialized data structures for resisuals and Jacobians
xt start values for integration at tstart, dim(xt)=_nxt; initial sensitivity matrices xt.Sx, dim(xt.Sx)=_nxt._nx, and xt.Su, dim(xt.Su)=_nxt._nu, if _sa is true
Return values:
xt result at tend; xt.Sx and xt.Su at tend if _sa is true
Exceptions:
E_CONV indicate that the integrator failed to converge; may be caught during optimization step length test

Reimplemented from Omu_Integrator.

virtual void Omu_IntODE::ode_solve ( double  tstart,
VECP  y,
const VECP  u,
double  tend 
) [pure virtual]

Interface to be implemented by derived ODE solvers.

y contains the initial solution and the result for values and sensitivities (dim(y)=_n=_nxt-_nd without sensitivities, dim(y)=_n*(1+_nxt-_nv+_nu) with sensitivities). u contains discrete-time states and control parameters (dim(u)=_m=_nd+_nu).

See also:
Omu_Integrator for more details about the dimensions.

Implemented in Omu_IntEuler, Omu_IntRK4, and Omu_IntRKsuite.

void Omu_IntODE::syseq ( double  t,
const VECP  y,
const VECP  u,
VECP  f 
)

Callback routine for evaluating the model by derived ODE solvers.

void Omu_IntODE::init_stage ( int  k,
const Omu_States x,
const Omu_Vector u,
bool  sa = false 
) [inline, protected, virtual]

Initialize solution of differential equations for stage k.

Reimplemented from Omu_Integrator.


The documentation for this class was generated from the following file:

HQP is hosted at SourceForge. Documentation generated on Sat Nov 8 14:21:33 2008 using doxygen.