ptolemy.domains.ct.kernel
Interface CTTransparentDirector

All Superinterfaces:
CTGeneralDirector
All Known Implementing Classes:
CTCaseDirector, CTEmbeddedDirector, HSFSMDirector, HSModalDirector

public interface CTTransparentDirector
extends CTGeneralDirector

Interface for CT transparent directors. This director extends the CTGeneralDirector interface.

Transparent directors in the CT domain can transfer their internal step size control information to the executive director. This interface defines methods to support the step size control queries by the executive CTDirector, such that after the internal CT subsystem finishes one integration step, its step size control information will be accessible by the outside CT director.

Directors that implement this interface are typically contained by CTCompositeActors.

Since:
Ptolemy II 0.3
Version:
$Id: CTTransparentDirector.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Jie Liu, Haiyang Zheng
See Also:
CTCompositeActor
Accepted Rating:
Green (hyzheng)
Proposed Rating:
Green (hyzheng)

Method Summary
 void emitCurrentStates()
          Implementations of this method should emit the current states of the dynamic actors executed by this director.
 void goToMarkedState()
          Implementations of this method should ask all stateful actors executed by this director to go to their marked states.
 boolean hasCurrentEvent()
          Implementations of this method should return true if there is an event at the current time.
 boolean isOutputAccurate()
          Implementations of this method should return true if all output actors declare the current integration step size is accurate.
 boolean isStateAccurate()
          Implementations of this method should return true if all stateful actors declare the current integration step size is accurate.
 void markState()
          Implementations of this method should mark the current state of the actors under the control of this director.
 double predictedStepSize()
          Implementations of this method should return the predicted next step size if this step is accurate.
 boolean prefireDynamicActors()
          Implementations of this method should prefire the dynamic actors under the control of this director.
 double refinedStepSize()
          Implementations of this method should return the refined step size if this step is not accurate.
 
Methods inherited from interface ptolemy.domains.ct.kernel.CTGeneralDirector
getCurrentStepSize, getErrorTolerance, getExecutionPhase, getExecutiveCTGeneralDirector, getIterationBeginTime, getODESolverClassName, isDiscretePhase
 

Method Detail

emitCurrentStates

void emitCurrentStates()
                       throws IllegalActionException
Implementations of this method should emit the current states of the dynamic actors executed by this director.

Throws:
IllegalActionException - If the data transfer is not completed.

goToMarkedState

void goToMarkedState()
                     throws IllegalActionException
Implementations of this method should ask all stateful actors executed by this director to go to their marked states. If there's no marked state, throws an exception.

Throws:
IllegalActionException - If there is no marked state.

hasCurrentEvent

boolean hasCurrentEvent()
Implementations of this method should return true if there is an event at the current time.

Returns:
True if there is an event at the current time.

isOutputAccurate

boolean isOutputAccurate()
Implementations of this method should return true if all output actors declare the current integration step size is accurate.

Returns:
True if the current step size is accurate.

isStateAccurate

boolean isStateAccurate()
Implementations of this method should return true if all stateful actors declare the current integration step size is accurate.

Returns:
True if the current step size is accurate.

markState

void markState()
Implementations of this method should mark the current state of the actors under the control of this director.


predictedStepSize

double predictedStepSize()
Implementations of this method should return the predicted next step size if this step is accurate.

Returns:
The predicted step size.

prefireDynamicActors

boolean prefireDynamicActors()
                             throws IllegalActionException
Implementations of this method should prefire the dynamic actors under the control of this director.

Returns:
True if all dynamic actors are prefired.
Throws:
IllegalActionException - If the scheduler throws it, or a dynamic actor throws it in its prefire() method, or it can not be prefired.

refinedStepSize

double refinedStepSize()
Implementations of this method should return the refined step size if this step is not accurate.

Returns:
The refined step size.