Diana  0.8.3
Public Member Functions | Protected Member Functions | Protected Attributes
BasicDynamicNLPTask Class Reference

#include <DianaDynamicNLPTask.hpp>

Inheritance diagram for BasicDynamicNLPTask:
DianaDynamicNLPTask BasicNLPTask DianaNLPTask ICapeDynamicOptimizationTask DianaNLPTask ICapeSensNLPTask ICapeNLPTask ICapeNLPTask ICapeNLPTask ICapeNLPTask ICapeIdentification ICapeUtilities ICapeIdentification ICapeUtilities ICapeIdentification ICapeUtilities ICapeIdentification ICapeUtilities

List of all members.

Public Member Functions

 BasicDynamicNLPTask (Numeric::Solvers::Solver::ICapeNumericSolver *_solver, Numeric::Solvers::Model::ICapeNumericContinuousModel *_model)
 BasicDynamicNLPTask (Diana::IDianaMain *_dianaMain, Common::Types::CapeString _solverName, Numeric::Solvers::Model::ICapeNumericContinuousModel *_model)
virtual ~BasicDynamicNLPTask ()
virtual void AddEstimatedParameter (const Common::Parameter::ICapeParameterSpec *pSpecValue, eEstimatedParameterType eptTypeOfUnknown=DIANA_PARAMETER) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument)
virtual void AddEstimatedParameter (const Common::Types::CapeString strName, eEstimatedParameterType eptTypeOfUnknown=DIANA_PARAMETER) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument)
virtual void AddEstimatedParameter (const Common::Types::CapeLong nIndex, eEstimatedParameterType eptTypeOfUnknown=DIANA_PARAMETER) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument)
virtual Common::Types::CapeDouble CalcObjFunction () throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError)
virtual void Initialize () throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeOutOfResources, Common::Error::ECapeLicenceError, Common::Error::ECapeBadInvOrder)
virtual
Common::Types::CapeArrayDouble 
GetObjFunctionGradient () throw (Common::Error::ECapeUnknown)
Common::Types::CapeLong GetModelParametersCount () const
Common::Types::CapeLong GetModelStateVarsCount () const
Common::Types::CapeLong GetFreeParametersCount () const

Protected Member Functions

virtual Common::Types::CapeDouble EvaluateObjFunction () throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError)
void Init (Diana::IDianaMain *_dianaMain, Common::Types::CapeString _solverName, Numeric::Solvers::Model::ICapeNumericContinuousModel *_model)
void Init (Numeric::Solvers::Solver::ICapeNumericSolver *_solver, Numeric::Solvers::Model::ICapeNumericContinuousModel *_model)
virtual void ExtractParams (const Numeric::Solvers::NLPTasks::Parameters::ICapeOptimizationPoint &_parVals) throw (Common::Error::ECapeUnknown)

Protected Attributes

Common::Parameter::CapeArrayParameter arrEstimatedInitStates
 Array with estimated state variables.
Common::Parameter::CapeArrayParameter arrEstimatedParameters
 Array with estimated model's parameters.
Common::Parameter::CapeArrayParameter arrEstimatedFreeParams
 Array with estimated unknowns.
Common::Types::CapeBoolean bInitialized
 Flag, indicates that optimizer is initialised.

Detailed Description

Class for dynamic optimization tasks with objactive function written on Python.


Constructor & Destructor Documentation

Constructor of BasicDynamicNLPTask class.

Parameters:
_soughtParams- sought parameters collection with names, bounds and precision of estimated model's parameters.

Constructor of BasicDynamicNLPTask class.

Parameters:
_dianaMain- pointer to DianaMain which is used to create solver
_solverName- name of the solver used for integrating
_model- considered model
_soughtParams- sought parameters collection with names, bounds and precision of estimated model's parameters.
virtual ~BasicDynamicNLPTask ( ) [virtual]

Destructor of BasicDynamicNLPTask class.


Member Function Documentation

virtual void AddEstimatedParameter ( const Common::Parameter::ICapeParameterSpec pSpecValue,
eEstimatedParameterType  eptTypeOfUnknown = DIANA_PARAMETER 
) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) [virtual]

Adds unknown to the list of sought parameters.

Parameters:
pSpecValuename of added parameter
eptTypeOfUnknowntype of added parameter (default value DIANA_PARAMETER)
virtual void AddEstimatedParameter ( const Common::Types::CapeString  strName,
eEstimatedParameterType  eptTypeOfUnknown = DIANA_PARAMETER 
) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) [virtual]

Adds unknown to the list of sought parameters.

Parameters:
strNamename of added parameter
eptTypeOfUnknowntype of added parameter (default value DIANA_PARAMETER)
virtual void AddEstimatedParameter ( const Common::Types::CapeLong  nIndex,
eEstimatedParameterType  eptTypeOfUnknown = DIANA_PARAMETER 
) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) [virtual]

Adds unknown to the list of sought parameters.

Parameters:
nIndexindex of added parameter
eptTypeOfUnknowntype of added parameter (default value DIANA_PARAMETER)

Calculates and returns objective function value for optimization task.

Reimplemented from BasicNLPTask.

Calculates and returns objective function value for optimization task.

Reimplemented from BasicNLPTask.

virtual void ExtractParams ( const Numeric::Solvers::NLPTasks::Parameters::ICapeOptimizationPoint _parVals) throw (Common::Error::ECapeUnknown) [protected, virtual]

Extracts parameters from set of parameters for setting intial values of state variables and estimated parameters.

Parameters:
_parValsset of parameters for task

Reimplemented from DianaDynamicNLPTask.

Returns count of optimizad free parameters.

Returns count of optimizad model's parameters.

Returns count of optimizad model's state variables.

Calculates and returns gradient with respect to objective function value for optimization task.

Reimplemented from BasicNLPTask.

void Init ( Diana::IDianaMain _dianaMain,
Common::Types::CapeString  _solverName,
Numeric::Solvers::Model::ICapeNumericContinuousModel _model 
) [protected]

Initialize task's class.

Parameters:
_dianaMain- pointer to DianaMain which is used to create solver
_solverName- name of the solver used for integrating
_model- considered model

Initialize task's class.

The environment will order the component to get initialized through this method. Any initialisation that could fail must be placed here. Initialize is guaranteed to be the first method called by the client (except low level methods such as class constructors or initialization persistence methods). Initialize has to be called once when the component is instantiated in a particular flowsheet. When the initialization fails, before signalling an error, the component must free all the resources that were allocated before the failure occurred. When the environment receives this error, it may not use the component anymore. The method terminate of the current interface must not either be called. Hence, the environment may only release the component through the middleware native mechanisms.

Reimplemented from DianaNLPTask.


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