Muscle Java API: muscle::core::kernel::Submodel Class Reference

muscle::core::kernel::Submodel Class Reference

Inheritance diagram for muscle::core::kernel::Submodel:

muscle::core::kernel::Instance muscle::core::kernel::RawInstance muscle::core::kernel::Module

List of all members.


Public Member Functions

boolean willStop ()

Protected Member Functions

void execute ()
Timestamp init (Timestamp previousOrigin)
void solvingStep ()
void intermediateObservation ()
void finalObservation ()
boolean endCondition ()
boolean restartSubmodel ()
Timestamp getCurrentTime ()

Detailed Description

A submodel following the description of the Multiscale Modeling Language. This means it has the submodel execution loop. The boundary condition and solving step operator are combined into one, into the solvingStep() function.
Author:
Joris Borgdorff

Member Function Documentation

void muscle::core::kernel::Submodel::execute (  )  [inline, protected, virtual]

Timestamp muscle::core::kernel::Submodel::init ( Timestamp  previousOrigin  )  [inline, protected]

Initializes the submodel, determining at what time it will start. It will be called once at the start. Override to implement the f_init operator in MML. May only receive messages. The default implementation is to start at origin 0, and to increase this with getScale().getOmegaT() every next run.

Parameters:
previousOrigin the previous time origin. This is null if there was no previous origin.
Returns:
the new time origin. This can be determined for instance by the timestamp of a conduitExit.receiveObservation().getTimestamp() or simply 0.

void muscle::core::kernel::Submodel::solvingStep (  )  [inline, protected]

Perform one step of the submodel. It will be called while the model is active. Override to implement the S and B operators in MML. During this step, messages may only received.

void muscle::core::kernel::Submodel::intermediateObservation (  )  [inline, protected]

Send messages from within the loop. It will be called while the model is active. Override to implement the O_i operator in MML. During this step, messages may only be sent.

void muscle::core::kernel::Submodel::finalObservation (  )  [inline, protected]

Send messages and clean up as a final operation. It will be called at the end of a submodel. Override to implement the O_f operator in MML. During this step, messages may only be sent.

boolean muscle::core::kernel::Submodel::endCondition (  )  [inline, protected]

Determines whether the submodel will exit the submodel execution loop, and jump to the final observation.

Returns:
by default, the value of willStop().

boolean muscle::core::kernel::Submodel::restartSubmodel (  )  [inline, protected]

Determines whether a submodel will be restarted, once it is finished.

Returns:
false by default.

Timestamp muscle::core::kernel::Submodel::getCurrentTime (  )  [inline, protected]

boolean muscle::core::kernel::Submodel::willStop (  )  [inline]

currently returns true if all portals of this kernel have passed a maximum timestep given in the cxa properties (this is a temporary implementation because this mechanism is going to change anyway) note: if init portals are being used, they do increment their time only once! do not change signature! (used from native code)

Reimplemented from muscle::core::kernel::RawInstance.


Generated on Thu Oct 18 14:28:29 2012 for Muscle Java API by  doxygen 1.5.6