Diana
0.8.3
|
#include <DianaModel.hpp>
Public Member Functions | |
DianaContinuousModel (Numeric::Solvers::Eso::ICapeNumericESO *pESO=NULL) | |
virtual | ~DianaContinuousModel () |
const Common::Types::CapeString & | GetComponentName () const throw (Common::Error::ECapeUnknown) |
void | SetComponentName (const Common::Types::CapeString &_name) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
const Common::Types::CapeString & | GetComponentDescription () const throw (Common::Error::ECapeUnknown) |
void | SetComponentDescription (const Common::Types::CapeString &_description) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Common::Collection::ICapeCollection * | GetParameters () throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeNoImpl) |
void | SetSimulationContext (Common::Identification::ICapeIdentification *simContextManager) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeNoImpl) |
void | Initialize () throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeOutOfResources, Common::Error::ECapeLicenceError, Common::Error::ECapeBadInvOrder) |
void | Terminate () throw (Common::Error::ECapeUnknown, Common::Error::ECapeOutOfResources, Common::Error::ECapeBadInvOrder) |
Common::Types::CapeLong | SetVariablesIndex (Common::Types::CapeArrayLong varIndices) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeOutOfBounds, Common::Error::ECapeNoImpl) |
void | SetActiveESO (Numeric::Solvers::Eso::ICapeNumericESO *theActiveESO) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeSolvingError, Common::Error::ECapeBadInvOrder) |
Numeric::Solvers::Eso::ICapeNumericESO * | GetActiveESO () throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder) |
void | SetCommonESO (Numeric::Solvers::Eso::ICapeNumericESO *anESO) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeNoImpl) |
Numeric::Solvers::Eso::ICapeNumericESO * | GetCommonESO () throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder, Common::Error::ECapeNoImpl) |
Diana::IDianaSensDAESO * | GetSensESO () throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder, Common::Error::ECapeNoImpl) |
IDianaContinuousModel * | GetSensitivityModelByIndex (const Common::Types::CapeArrayLong &_sensParIndices, const Common::Types::CapeArrayLong &_sensInitStateIndices) throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder, Common::Error::ECapeNoImpl) |
IDianaContinuousModel * | GetSensitivityModel (const Common::Types::CapeArrayString &_sensParNames, const Common::Types::CapeArrayString &_sensInitStateNames) throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder, Common::Error::ECapeNoImpl) |
Numeric::Solvers::Model::ICapeNumericExternalEventInfo * | AddExternalEvent (Numeric::Solvers::Model::ICapeNumericEvent *anEvent) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeBadInvOrder, Common::Error::ECapeNoImpl) |
Protected Attributes | |
Common::Types::CapeString | name |
model name | |
Common::Types::CapeString | description |
model description | |
Numeric::Solvers::Eso::ICapeNumericESO * | pActiveESO |
Defines simulation model.
DianaContinuousModel | ( | Numeric::Solvers::Eso::ICapeNumericESO * | pESO = NULL | ) |
Constructor.
pESO | equation set object. Model is the owner of object. |
virtual ~DianaContinuousModel | ( | ) | [virtual] |
Destructor. Frees equation set object.
Adds an Event to the list of the already defined External Events for this Model.
anEvent | the event to be added to the list |
Implements ICapeNumericModel.
Numeric::Solvers::Eso::ICapeNumericESO* GetActiveESO | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder) [virtual] |
Gets the global active ESO which is the current one.
Implements ICapeNumericModel.
Numeric::Solvers::Eso::ICapeNumericESO* GetCommonESO | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder, Common::Error::ECapeNoImpl) [virtual] |
Gets the common or specific ESO of this particular model.
Implements ICapeNumericModel.
const Common::Types::CapeString& GetComponentDescription | ( | ) | const throw (Common::Error::ECapeUnknown) [virtual] |
gets the description of the component.
Implements ICapeIdentification.
const Common::Types::CapeString& GetComponentName | ( | ) | const throw (Common::Error::ECapeUnknown) [virtual] |
gets the name of the component.
Implements ICapeIdentification.
Common::Collection::ICapeCollection* GetParameters | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeNoImpl) [virtual] |
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.
Diana::IDianaSensDAESO* GetSensESO | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder, Common::Error::ECapeNoImpl) [virtual] |
Gets the sensitivity extended ESO for this particular model.
Implements IDianaContinuousModel.
IDianaContinuousModel* GetSensitivityModel | ( | const Common::Types::CapeArrayString & | _sensParNames, |
const Common::Types::CapeArrayString & | _sensInitStateNames | ||
) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder, Common::Error::ECapeNoImpl) [virtual] |
Create a new Model based on this which is augmented with sensitivity equations. The caller is the owner of the new object. 'This' should be initialized already.
Implements IDianaContinuousModel.
IDianaContinuousModel* GetSensitivityModelByIndex | ( | const Common::Types::CapeArrayLong & | _sensParIndices, |
const Common::Types::CapeArrayLong & | _sensInitStateIndices | ||
) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeBadInvOrder, Common::Error::ECapeNoImpl) [virtual] |
Create a new Model based on this which is augmented with sensitivity equations. The caller is the owner of the new object. 'This' should be initialized already.
Implements IDianaContinuousModel.
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 SetActiveESO | ( | Numeric::Solvers::Eso::ICapeNumericESO * | theActiveESO | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeSolvingError, Common::Error::ECapeBadInvOrder) [virtual] |
Sets the global ESO which is the current one depending of all the active states in the STN and all the common or specific ESOs. This needs to be done for the top level Model only. Currently not implemented.
Implements ICapeNumericModel.
void SetCommonESO | ( | Numeric::Solvers::Eso::ICapeNumericESO * | anESO | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeNoImpl) [virtual] |
Assigns the common or specific ESO to this particular model. Currently not implemented.
Implements ICapeNumericModel.
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.
void SetSimulationContext | ( | Common::Identification::ICapeIdentification * | simContextManager | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeNoImpl) [virtual] |
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.
simContextManager | the 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.
Sets the general indices of the variables in this Model to establish the mapping between the list of variable in the ESO and the list of the Physical Variables. This is one way (a choice) for establishing the mapping, another way would be to reference the Physical Variables object in the Model directly.
varIndices | the set of general indices for all the variables |
Implements ICapeNumericModel.
void Terminate | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeOutOfResources, Common::Error::ECapeBadInvOrder) [virtual] |
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.
Numeric::Solvers::Eso::ICapeNumericESO* pActiveESO [protected] |
Active ESO object. Currently supported only one ESO in model.