Diana
0.8.3
|
#include <DianaBasicNLPTask.hpp>
Public Member Functions | |
BasicNLPTask (const Common::Parameter::CapeArrayParameterSpec &_soughtParams) | |
virtual | ~BasicNLPTask () |
eCapeNLPTaskType | Type () const |
virtual void | SetObjFunction (ICapeNLPFunction *func) throw (Common::Error::ECapeUnknown) |
virtual CapeDouble | CalcObjFunction () throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) |
virtual Common::Types::CapeArrayDouble | GetObjFunctionGradient () throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) |
virtual const Diana::DianaSparseArray & | GetConstraintsJacobian (ConstraintType _type) throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) |
virtual const Common::Types::CapeString & | GetComponentName () const throw (Common::Error::ECapeUnknown) |
virtual const Common::Types::CapeString & | GetComponentDescription () const throw (Common::Error::ECapeUnknown) |
Protected Member Functions | |
virtual CapeDouble | EvaluateObjFunction () throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) |
Protected Attributes | |
ICapeNLPFunction * | eval |
Objective function. | |
Diana::DianaSparseArray | mtrConstraintsJacobian |
Sparse matrix with Jacobian of constraints. | |
DerivativeApproximationType | daGradientApprType |
Finite differencing formula for approximating the gradien. | |
Common::Types::CapeDouble | dblEpsilon |
Private Attributes | |
Common::Types::CapeString | strName |
Component name. | |
Common::Types::CapeString | strDescription |
Component description. |
Class for basic NLP tasks.
BasicNLPTask | ( | const Common::Parameter::CapeArrayParameterSpec & | _soughtParams | ) |
Constructor of BasicNLPTask class.
_soughtParams | - sought parameters collection with names, bounds and precision for estimated parameters. |
virtual ~BasicNLPTask | ( | ) | [virtual] |
Destructor of BasicNLPTask class.
virtual CapeDouble CalcObjFunction | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) [virtual] |
Calculates and returns objective function value for optimization task.
Implements ICapeNLPTask.
Reimplemented in BasicDynamicNLPTask.
virtual CapeDouble EvaluateObjFunction | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) [protected, virtual] |
Calculates and returns objective function value for optimization task.
Reimplemented in BasicDynamicNLPTask.
virtual const Common::Types::CapeString& GetComponentDescription | ( | ) | const throw (Common::Error::ECapeUnknown) [virtual] |
Gets the description of the component.
Implements ICapeIdentification.
virtual const Common::Types::CapeString& GetComponentName | ( | ) | const throw (Common::Error::ECapeUnknown) [virtual] |
Gets the name of the component.
Implements ICapeIdentification.
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.
virtual Common::Types::CapeArrayDouble GetObjFunctionGradient | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeSolvingError) [virtual] |
Calculates and returns gradient with respect to objective function value for optimization task.
Implements ICapeSensNLPTask.
Reimplemented in BasicDynamicNLPTask.
virtual void SetObjFunction | ( | ICapeNLPFunction * | func | ) | throw (Common::Error::ECapeUnknown) [virtual] |
Sets objective function of optimization task.
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
).