Diana
0.8.3
|
#include <DianaParameterFittingTask.hpp>
Public Member Functions | |
SensParameterFittingTask (Numeric::Solvers::Solver::ICapeNumericSolver *_solver, Diana::IDianaContinuousModel *_model, Common::NLPData::CapeMeasuredData *_expdata) | |
SensParameterFittingTask (Diana::IDianaMain *_dianaMain, Common::Types::CapeString _solverName, Numeric::Solvers::Model::ICapeNumericContinuousModel *_model, const Common::NLPData::CapeMeasuredData *_expdata) | |
SensParameterFittingTask (Diana::IDianaMain *_dianaMain, Common::Types::CapeString _solverName, Numeric::Solvers::Model::ICapeNumericContinuousModel *_model, const Common::NLPData::CapeMeasuredData *_expdata, const Common::Collection::ICapeCollection *pars) | |
virtual | ~SensParameterFittingTask () |
virtual void | AddEstimatedParameterBySpec (const Common::Parameter::ICapeParameterSpec *pSpecValue, eEstimatedParameterType eptTypeOfUnknown=DIANA_PARAMETER) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
virtual void | AddEstimatedParameterByName (const Common::Types::CapeString strName, eEstimatedParameterType eptTypeOfUnknown=DIANA_PARAMETER) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
virtual void | AddEstimatedParameterByIndex (const Common::Types::CapeLong nIndex, eEstimatedParameterType eptTypeOfUnknown=DIANA_PARAMETER) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Common::Types::CapeLong | GetFixedSoughtParamsCount () |
Common::Types::CapeLong | GetStateSoughtParamsCount () |
virtual eCapeNLPTaskType | Type () const |
virtual Common::Types::CapeDouble | CalcObjFunction () throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) |
virtual Common::Types::CapeArrayDouble | GetObjFunctionGradient () throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) |
void | ExecuteAllCalculations () throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) |
virtual const Diana::DianaSparseArray & | GetConstraintsJacobian (ConstraintType _type) 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) |
const Common::Types::CapeString & | GetComponentName () const throw (Common::Error::ECapeUnknown) |
const Common::Types::CapeString & | GetComponentDescription () const throw (Common::Error::ECapeUnknown) |
void | SetComponentName (const Common::Types::CapeString &_name) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
void | SetComponentDescription (const Common::Types::CapeString &_description) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Protected Attributes | |
Common::Parameter::CapeArrayParameter | arrEstimatedInitStates |
Array with estimated state variables. | |
Common::Parameter::CapeArrayParameter | arrEstimatedParameters |
Array with estimated parameters. | |
Diana::DianaSparseArray | mtrConstraintsJacobian |
Sparse matrix with Jacobian of constraints. | |
Common::Types::CapeDouble | dblEpsilon |
Common::Types::CapeBoolean | bInitialized |
Flag, indicates that optimizer is initialised. | |
Private Member Functions | |
void | ExtractParams (const Numeric::Solvers::NLPTasks::Parameters::ICapeOptimizationPoint &_parVals) throw (Common::Error::ECapeUnknown) |
Private Attributes | |
Common::Types::CapeString | strName |
Component name. | |
Common::Types::CapeString | strDescription |
Component description. | |
Common::Types::CapeArrayDouble | arrDefaultDerivatives |
array of default derivatives | |
Common::Types::CapeArrayDouble | arrDefaultSensitivities |
array of default sensitivities | |
Common::Types::CapeArrayDouble | arrDefaultModelDerivatives |
array of default model derivatives | |
Common::Types::CapeArrayDouble | arrDefaultModelVariables |
array of default model sensitivities |
Class for parameter fitting task with sensativities calculation.
SensParameterFittingTask | ( | Numeric::Solvers::Solver::ICapeNumericSolver * | _solver, |
Diana::IDianaContinuousModel * | _model, | ||
Common::NLPData::CapeMeasuredData * | _expdata | ||
) |
Constructor of parameter fitting task class based on one experiment with external solver and sens. model (not defined in SWIG)
_solver | - solver used for integrating trajectory & calculating sensitivities |
_model | - considered model (this model must contain DianaSensESO with preseted estimated parameters & fitted) |
_expdata | - set of experimental state variables values in measured time points |
SensParameterFittingTask | ( | Diana::IDianaMain * | _dianaMain, |
Common::Types::CapeString | _solverName, | ||
Numeric::Solvers::Model::ICapeNumericContinuousModel * | _model, | ||
const Common::NLPData::CapeMeasuredData * | _expdata | ||
) |
Constructor of parameter fitting task class based on one experiment using solver with name specified and CapeNLPSoughtParameters.
_dianaMain | - pointer to DianaMain which is used to create solver |
_solverName | - name of the solver used for integrating |
_model | - considered model |
_expdata | - set of experimental state variables values in measured time points |
SensParameterFittingTask | ( | Diana::IDianaMain * | _dianaMain, |
Common::Types::CapeString | _solverName, | ||
Numeric::Solvers::Model::ICapeNumericContinuousModel * | _model, | ||
const Common::NLPData::CapeMeasuredData * | _expdata, | ||
const Common::Collection::ICapeCollection * | pars | ||
) |
Constructor of parameter fitting task class based on one experiment using solver with name specified and CapeNLPSoughtParameters.
_dianaMain | - pointer to DianaMain which is used to create solver |
_solverName | - name of the solver used for integrating |
_model | - considered model |
_expdata | - set of experimental state variables values in measured time points |
pars | - estimated parameter set |
virtual ~SensParameterFittingTask | ( | ) | [virtual] |
Destructor of BasicNLPTask class.
virtual void AddEstimatedParameterByIndex | ( | 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.
nIndex | index of added parameter |
eptTypeOfUnknown | type of added parameter (default value DIANA_PARAMETER) |
virtual void AddEstimatedParameterByName | ( | 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.
strName | name of added parameter |
eptTypeOfUnknown | type of added parameter (default value DIANA_PARAMETER) |
virtual void AddEstimatedParameterBySpec | ( | 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.
pSpecValue | name of added parameter |
eptTypeOfUnknown | type of added parameter (default value DIANA_PARAMETER) |
virtual Common::Types::CapeDouble CalcObjFunction | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) [virtual] |
void ExecuteAllCalculations | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) |
Calculates objective function and its gradient
void ExtractParams | ( | const Numeric::Solvers::NLPTasks::Parameters::ICapeOptimizationPoint & | _parVals | ) | throw (Common::Error::ECapeUnknown) [private, virtual] |
Extracts parameters from set of parameters for setting intial values of state variables and estimated parameters.
_parVals | set of parameters for task |
Reimplemented from DianaDynamicNLPTask.
const Common::Types::CapeString& GetComponentDescription | ( | ) | const throw (Common::Error::ECapeUnknown) [inline, virtual] |
Gets the description of the component.
Implements ICapeIdentification.
References ParameterFittingTask::strDescription.
const Common::Types::CapeString& GetComponentName | ( | ) | const throw (Common::Error::ECapeUnknown) [inline, virtual] |
Gets the name of the component.
Implements ICapeIdentification.
References ParameterFittingTask::strName.
virtual const Diana::DianaSparseArray& GetConstraintsJacobian | ( | ConstraintType | _type | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) [virtual] |
Calculates Jacoian with respect to constraint functions of the same type. Calculation performs by using the forward-difference:
.
_type | type of constraints |
Implements ICapeSensNLPTask.
Common::Types::CapeLong GetFixedSoughtParamsCount | ( | ) | [inline, virtual] |
Gets number of fixed variables among sought parameters.
Implements DianaParameterFittingTask.
virtual Common::Types::CapeArrayDouble GetObjFunctionGradient | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) [virtual] |
Calculates and returns objective function's gradient with respect to initial values of state variables
and estimated parameters
Implements ICapeSensNLPTask.
Common::Types::CapeLong GetStateSoughtParamsCount | ( | ) | [inline, virtual] |
Gets number of state variables among sought parameters.
Implements DianaParameterFittingTask.
virtual void Initialize | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeOutOfResources, Common::Error::ECapeLicenceError, Common::Error::ECapeBadInvOrder) [virtual] |
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.
Implements ICapeUtilities.
void SetComponentDescription | ( | const Common::Types::CapeString & | _description | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) [virtual] |
Sets the description of the component.
_description | the description of the component |
Implements ICapeIdentification.
void SetComponentName | ( | const Common::Types::CapeString & | _name | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) [virtual] |
Sets the name of the component.
_name | the name of the component |
Implements ICapeIdentification.
virtual eCapeNLPTaskType Type | ( | ) | const [inline, virtual] |
Returns type of solver that can be used for solvin this task
Implements ICapeNLPTask.
References Numeric::Solvers::NLPTasks::CAPE_FIRSTRANGE.
Common::Types::CapeDouble dblEpsilon [protected] |
Parameter that represents in formulas for approximating derivative. Default value
. Usually
for forward-difference where
is unit roundoff (for double
).