Diana  0.8.3
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
DianaNLPTask Class Reference

#include <DianaNLPTask.hpp>

Inheritance diagram for DianaNLPTask:
ICapeNLPTask ICapeUtilities ICapeIdentification BasicNLPTask DianaDynamicNLPTask MultipleFittingTask DianaOEDTask BasicDynamicNLPTask BasicDynamicNLPTask DianaParameterFittingTask SensMultipleFittingTask ParameterFittingTask SensParameterFittingTask

List of all members.

Public Member Functions

virtual ~DianaNLPTask ()
const
Common::Collection::ICapeCollection
GetSoughtParameters () const throw (Common::Error::ECapeUnknown)
virtual ConstraintFuncArrayGetConstraintFuncList (ConstraintType _type) throw (Common::Error::ECapeUnknown)
virtual void SetNLPParameters (Parameters::ICapeOptimizationPoint *_pars) throw (Common::Error::ECapeUnknown)
const
Parameters::ICapeOptimizationPoint
GetNLPParameters () throw (Common::Error::ECapeUnknown)
virtual void AddConstraintFunc (ICapeNLPFunction *_func, ConstraintType _type) throw (Common::Error::ECapeUnknown)
virtual
Common::Types::CapeArrayDouble 
CalcConstraints (ConstraintType _type) throw (Common::Error::ECapeUnknown)
virtual Common::Types::CapeDouble CalcConstraint (Common::Types::CapeLong _index, ConstraintType _type) throw (Common::Error::ECapeUnknown)
virtual Common::Types::CapeShort GetConstraintsCount (ConstraintType type) const throw (Common::Error::ECapeUnknown)
virtual void SetSimulationContext (Common::Identification::ICapeIdentification *simContextManager) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeNoImpl)
virtual void Initialize () throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeOutOfResources, Common::Error::ECapeLicenceError, Common::Error::ECapeBadInvOrder)
virtual void Terminate () throw (Common::Error::ECapeUnknown, Common::Error::ECapeOutOfResources, Common::Error::ECapeBadInvOrder)
Common::Collection::ICapeCollectionGetParameters () throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeNoImpl)
virtual void SetComponentName (const Common::Types::CapeString &_name) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument)
virtual void SetComponentDescription (const Common::Types::CapeString &_description) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument)
virtual void UpdateNLPParameters () throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument)
virtual void UpdateOptimizationPoint () throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument)
void SetReportingInterface (Diana::IDianaReporting *_pReportingInterface) throw (Common::Error::ECapeUnknown)
void RemoveReportingInterface (Diana::IDianaReporting *_pReportingInterface) throw (Common::Error::ECapeUnknown)

Protected Member Functions

void AddSoughtParameter (const Common::Parameter::ICapeParameter *parParameter)
void AddParametersSpec (const Common::Parameter::CapeArrayParameterSpec &_parspecs) throw (Common::Error::ECapeInvalidArgument)
void notifyEventHandlers (NLPTaskEvents event) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation)
bool areEventHandlers ()

Protected Attributes

Diana::DianaCollection collParameters
 Collection of task's parameters.
ConstraintFuncArray constrainsGx
 Array of $ g(x)\le 0 $ constraint functions.
ConstraintFuncArray constrainsHx
 Array of $ h(x) = 0 $ constraint functions.
Diana::DianaCollection soughtParams
 Collection of sought parameters.
Parameters::ICapeOptimizationPointfitParams
 Array of fitting parameters values generated by optimizer.

Private Attributes

std::vector
< Diana::IDianaReporting * > 
arrReportingInterfaces
 array of the reporting interfaces

Detailed Description

Represents an interface for CapeNLPTask class.


Constructor & Destructor Documentation

virtual ~DianaNLPTask ( ) [virtual]

Destructor for DianaNLPTask.


Member Function Documentation

virtual void AddConstraintFunc ( ICapeNLPFunction _func,
ConstraintType  _type 
) throw (Common::Error::ECapeUnknown) [virtual]

Adds constraint function.

Implements ICapeNLPTask.

Add parameters with specified specifications.

Parameters:
_parspecslist of specifications for parameters
void AddSoughtParameter ( const Common::Parameter::ICapeParameter parParameter) [inline, protected]

Adds parameter to the sought prameters' collection

Evaluates constraint functions of the same type for given set of parameters.

Parameters:
_indexindex of specified constraint
_typetype of constraints

Implements ICapeNLPTask.

Evaluates constraint functions of the same type for given set of parameters.

Parameters:
_typetype of constraints

Implements ICapeNLPTask.

Gets list of constrains of the type specified.

Implements ICapeNLPTask.

Returns count of constraint functions of the same type.

Parameters:
typetype of constraints

Implements ICapeNLPTask.

Get fitting parameters values.

Implements ICapeNLPTask.

Returns an ICapeCollection interface. This interface will contain a collection of ICapeParameter interfaces. This method allows any client to access all the Cape Open Parameters exposed by a model component. If the model component does not support exposing its parameters, it should raise the ECapeNoImpl error, instead of returning a NULL reference or an empty Collection. But if the PMC supports parameters but has for this call no parameters, it should return a valid ICapeCollection reference exposing zero parameters.

Implements ICapeUtilities.

Reimplemented in MultipleFittingTask.

Returns sought parameters set.

Implements ICapeNLPTask.

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.

Reimplemented in SensParameterFittingTask, ParameterFittingTask, BasicDynamicNLPTask, DianaOEDTask, and MultipleFittingTask.

Notifies all registered reporting interfaces about new step.

sets the description of the component.

Parameters:
_descriptionthe description of the component

Implements ICapeIdentification.

Reimplemented in SensParameterFittingTask.

sets the name of the component.

Parameters:
_namethe name of the component

Implements ICapeIdentification.

Reimplemented in SensParameterFittingTask.

virtual void SetNLPParameters ( Parameters::ICapeOptimizationPoint _pars) throw (Common::Error::ECapeUnknown) [inline, virtual]

Set new fitting parameters values.

Implements ICapeNLPTask.

Reimplemented in DianaParameterFittingTask.

Sets the reference to an object in charge of managing some reporting at each step of the process.

Remark
The reporting interface will be called by the Solver:

  • Immediately on entry to AdvanceToNextEvent.
  • When the independent variable reaches a value specified by it (see interface).
  • Before and after all discontinuities handled internally be the Solver.
  • Immediately before return from AdvanceToNextEvent.

Allows the environment to convey the component a reference to the former's simulation context. The simulation context will be environment objects which will expose a given set of Cape Open interfaces. Each of these interfaces will allow the component to call back the environment in order to benefit from its exposed services (such as creation of material templates, diagnostics or measurement unit conversion). If the component does not support accessing the simulation context, it is recommended to raise the ECapeNoImpl error.

Parameters:
simContextManagerthe reference to the environment's simulation context class. For the component to use this class, this reference will have to be converted to each of the defined Cape Open Simulation Context interfaces.

Implements ICapeUtilities.

The environment will order the component to get destroyed through this method. Any uninitialization that could fail must be placed here. Terminate is guaranteed to be the last method called by the client (except low level methods such as class destructors). Terminate may be called at any time, but may be only called once. When this method returns an error, the environment should report the user. However, after that the environment is not allowed to use the component anymore.

Implements ICapeUtilities.

Set Parameters values as default parameters

Implements ICapeNLPTask.

Update optimization point


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