|
|||||||||
| 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.sched.StaticSchedulingDirector
ptolemy.domains.ct.kernel.CTDirector
ptolemy.domains.ct.kernel.CTMultiSolverDirector
ptolemy.domains.ct.kernel.CTEmbeddedDirector
public class CTEmbeddedDirector
An embedded director for CT inside CT or FSM. Conceptually, this director interacts with a continuous outside domain. As a consequence, this director exposes its step size control information to the outer domain through its container, which must be a CTCompositeActor.
Unlike the CTMixedSignalDirector, this director does not run ahead of the global time and rollback, simply because the step size control information is accessible from outer domain which has a continuous time and understands the meaning of step size.
CTMultiSolverDirector,
CTTransparentDirector,
Serialized Form
| Red (hyzheng) |
| Yellow (hyzheng) |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
|---|
NamedObj.ContainedObjectsIterator |
| Field Summary | |
|---|---|
private boolean |
_outputAcceptable
|
private boolean |
_stateAcceptable
|
| Fields inherited from class ptolemy.domains.ct.kernel.CTMultiSolverDirector |
|---|
_initialStatesNotReady, breakpointODESolver, ODESolver |
| Fields inherited from class ptolemy.domains.ct.kernel.CTDirector |
|---|
_timeBase, errorTolerance, initStepSize, maxIterations, maxStepSize, minStepSize, startTime, stopTime, synchronizeToRealTime, valueResolution |
| Fields inherited from class ptolemy.actor.sched.StaticSchedulingDirector |
|---|
_postfireReturns |
| 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 | |
|---|---|
CTEmbeddedDirector()
Construct a director in the default workspace with an empty string as its name. |
|
CTEmbeddedDirector(CompositeEntity container,
java.lang.String name)
Construct a director in the given container with the given name. |
|
CTEmbeddedDirector(Workspace workspace)
Construct a director in the workspace with an empty name. |
|
| Method Summary | |
|---|---|
boolean |
canBeInsideDirector()
Always return true indicating that this director can be an inside director. |
boolean |
canBeTopLevelDirector()
Always return false indicating that this director cannot be a top-level director. |
void |
emitCurrentStates()
Emit the current states of the dynamic actors executed by this director. |
void |
fire()
Execute the subsystem for one iteration. |
double |
getCurrentStepSize()
Return the current integration step size, which is inherited from the executive CT director. |
CTExecutionPhase |
getExecutionPhase()
Get the current execution phase, which is inherited from the executive CT director. |
CTGeneralDirector |
getExecutiveCTGeneralDirector()
Return the executive CT general director of this director. |
Time |
getIterationBeginTime()
Return the begin time of the current iteration. |
void |
goToMarkedState()
Restore the saved states, which include the states of stateful actors. |
void |
initialize()
Call the initialize() method of the super class. |
boolean |
isDiscretePhase()
Return true if this is the discrete phase execution. |
boolean |
isOutputAccurate()
Return true if all output step size control actors are satisfied with the current step size. |
boolean |
isStateAccurate()
Return true if all state step size control actors are satisfied with the current step size. |
void |
markState()
Mark the known good states, including the states of the stateful actors. |
boolean |
postfire()
Return false if some actor returns false from its postfire method or a stop is requested. |
double |
predictedStepSize()
Return the predicted next step size, which is the minimum of the prediction from all step size control actors. |
boolean |
prefire()
Call the prefire of the super class. |
void |
preinitialize()
Check whether the container implements the CTStepSizeControlActor interface. |
double |
refinedStepSize()
Return the refined step size if the current fire is not accurate. |
| Methods inherited from class ptolemy.actor.sched.StaticSchedulingDirector |
|---|
_setScheduler, addDebugListener, getScheduler, invalidateSchedule, isScheduleValid, removeDebugListener, setScheduler |
| Methods inherited from class ptolemy.kernel.util.Attribute |
|---|
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ptolemy.domains.ct.kernel.CTTransparentDirector |
|---|
hasCurrentEvent, prefireDynamicActors |
| Methods inherited from interface ptolemy.domains.ct.kernel.CTGeneralDirector |
|---|
getErrorTolerance, getODESolverClassName |
| Methods inherited from interface ptolemy.actor.TimedDirector |
|---|
getModelTime, getTimeResolution |
| Field Detail |
|---|
private boolean _outputAcceptable
private boolean _stateAcceptable
| Constructor Detail |
|---|
public CTEmbeddedDirector()
public CTEmbeddedDirector(CompositeEntity container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
container - The container.name - Name of this director.
IllegalActionException - If the director is not compatible
with the specified container. May be thrown in a derived class.
NameDuplicationException - If the container is not a
CompositeActor and the name collides with an entity in the container.public CTEmbeddedDirector(Workspace workspace)
workspace - The workspace of this object.| Method Detail |
|---|
public boolean canBeInsideDirector()
canBeInsideDirector in class CTMultiSolverDirectorpublic boolean canBeTopLevelDirector()
canBeTopLevelDirector in class CTMultiSolverDirectorpublic void emitCurrentStates()
emitCurrentStates in interface CTTransparentDirector
public void fire()
throws IllegalActionException
fire in interface Executablefire in class CTMultiSolverDirectorIllegalActionException - If there does not exits a schedule,
or ODE solver cannot be set, or any actor throws it during this
iteration.public double getCurrentStepSize()
getCurrentStepSize in interface CTGeneralDirectorgetCurrentStepSize in class CTDirectorCTDirector.setCurrentStepSize(double)public CTGeneralDirector getExecutiveCTGeneralDirector()
getExecutiveCTGeneralDirector in interface CTGeneralDirectorgetExecutiveCTGeneralDirector in class CTMultiSolverDirectorpublic CTExecutionPhase getExecutionPhase()
getExecutionPhase in interface CTGeneralDirectorgetExecutionPhase in class CTDirectorpublic Time getIterationBeginTime()
getIterationBeginTime in interface CTGeneralDirectorgetIterationBeginTime in class CTDirectorpublic void goToMarkedState()
goToMarkedState in interface CTTransparentDirector
public void initialize()
throws IllegalActionException
initialize in interface Initializableinitialize in class CTMultiSolverDirectorIllegalActionException - If the initialize() method of the
super class throws it, or the stop time can not be
registered as a breakpoint.public boolean isDiscretePhase()
isDiscretePhase in interface CTGeneralDirectorisDiscretePhase in class CTDirectorpublic boolean isOutputAccurate()
isOutputAccurate in interface CTTransparentDirectorpublic boolean isStateAccurate()
isStateAccurate in interface CTTransparentDirectorpublic void markState()
markState in interface CTTransparentDirector
public boolean postfire()
throws IllegalActionException
postfire in interface Executablepostfire in class CTMultiSolverDirectorIllegalActionException - If thrown by any actor during its
postfire method.public double predictedStepSize()
predictedStepSize in interface CTTransparentDirector
public boolean prefire()
throws IllegalActionException
prefire in interface Executableprefire in class CTMultiSolverDirectorIllegalActionException - If super class throws it or the ODE
solver can not be set.
public void preinitialize()
throws IllegalActionException
preinitialize in interface Initializablepreinitialize in class CTMultiSolverDirectorIllegalActionException - If the container of this
director does not implement CTStepSizeControlActor, or the
preinitialize method throws it.public double refinedStepSize()
refinedStepSize in interface CTTransparentDirector
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||