|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.actor.Director
ptolemy.actor.lib.hoc.CaseDirector
ptolemy.domains.ct.kernel.CTCaseDirector
public class CTCaseDirector
An CTCaseDirector governs the execution of the Case actor in CT.
| Red (liuxj) |
| Yellow (hyzheng) |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
|---|
NamedObj.ContainedObjectsIterator |
| Field Summary |
|---|
| Fields inherited from class ptolemy.actor.Director |
|---|
_actorsFinishedExecution, _currentTime, _finishRequested, _initializables, _stopRequested, timeResolution |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
|---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Fields inherited from interface ptolemy.actor.Executable |
|---|
COMPLETED, NOT_READY, STOP_ITERATING |
| Constructor Summary | |
|---|---|
CTCaseDirector(CompositeEntity container,
java.lang.String name)
Construct a director in the given container with the given name. |
|
| Method Summary | |
|---|---|
void |
emitCurrentStates()
Iterate the enbled refinements to emit the current states of their dynamic actors. |
double |
getCurrentStepSize()
Ask for the current step size used by the solver from the executive CT director. |
double |
getErrorTolerance()
Return error tolerance used for detecting enabled transitions. |
CTExecutionPhase |
getExecutionPhase()
Get the current execution phase of this director. |
CTGeneralDirector |
getExecutiveCTGeneralDirector()
Return the executive CT director of this director, or null if this director is at the top level or the executive director is not a CT general director. |
Time |
getIterationBeginTime()
Return the begin time of the current iteration, this method only makes sense in continuous-time domain. |
Time |
getModelTime()
Return the current time obtained from the executive director, if there is one, and otherwise return the local view of current time. |
java.lang.String |
getODESolverClassName()
Get the ODE solver class name. |
void |
goToMarkedState()
Restore the states of all the enabled refinements to the previously marked states. |
boolean |
hasCurrentEvent()
Return true if the enabled refinements may produce events. |
boolean |
isDiscretePhase()
Return true if this is the discrete phase execution. |
boolean |
isOutputAccurate()
Retun true if all the current refinement has accurate output with the current step size. |
boolean |
isStateAccurate()
Retun true if all the refinements can resolve their states with the current step size. |
void |
markState()
Make the current states of all the enabled refinements. |
Receiver |
newReceiver()
Return a CTReceiver. |
double |
predictedStepSize()
Return the smallest next step size predicted by the all the enabled refinements, which are refinements that returned true in their prefire() methods in this iteration. |
boolean |
prefireDynamicActors()
Return true if all the dynamic actors contained by the enabled refinements return true from their prefire() method. |
double |
refinedStepSize()
Return the step size refined by all the enabled refinements, which are refinements that returned true in their prefire() methods in this iteration, or the enabled transition which requires the current time be the same with the time it is enabled. |
| Methods inherited from class ptolemy.actor.lib.hoc.CaseDirector |
|---|
fire, fireAt, postfire, prefire |
| Methods inherited from class ptolemy.kernel.util.Attribute |
|---|
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CTCaseDirector(CompositeEntity container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
container - Container of this director.name - Name of this director.
IllegalActionException - If the name has a period in it, or
the director is not compatible with the specified container.
NameDuplicationException - If the container is not a
CompositeActor and the name collides with an entity in the container.| Method Detail |
|---|
public void emitCurrentStates()
throws IllegalActionException
emitCurrentStates in interface CTTransparentDirectorIllegalActionException - If the current states can not
be emitted.public double getCurrentStepSize()
getCurrentStepSize in interface CTGeneralDirectorpublic final double getErrorTolerance()
getErrorTolerance in interface CTGeneralDirectorgetErrorTolerance in class Directorpublic CTGeneralDirector getExecutiveCTGeneralDirector()
getExecutiveCTGeneralDirector in interface CTGeneralDirectorpublic CTExecutionPhase getExecutionPhase()
getExecutionPhase in interface CTGeneralDirectorpublic Time getIterationBeginTime()
getIterationBeginTime in interface CTGeneralDirectorpublic Time getModelTime()
getModelTime in class DirectorDirector.setModelTime(Time)public java.lang.String getODESolverClassName()
getODESolverClassName in interface CTGeneralDirector
public void goToMarkedState()
throws IllegalActionException
goToMarkedState in interface CTTransparentDirectorIllegalActionException - If there is no marked state.public boolean hasCurrentEvent()
hasCurrentEvent in interface CTTransparentDirectorpublic boolean isDiscretePhase()
isDiscretePhase in interface CTGeneralDirectorpublic boolean isOutputAccurate()
isOutputAccurate in interface CTTransparentDirectorpublic boolean isStateAccurate()
isStateAccurate in interface CTTransparentDirectorpublic void markState()
markState in interface CTTransparentDirectorpublic Receiver newReceiver()
newReceiver in class CaseDirectorpublic double predictedStepSize()
predictedStepSize in interface CTTransparentDirector
public boolean prefireDynamicActors()
throws IllegalActionException
prefireDynamicActors in interface CTTransparentDirectorIllegalActionException - If the local directors of refinements
throw it.public double refinedStepSize()
refinedStepSize in interface CTTransparentDirector
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||