|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.domains.ct.lib.ThresholdMonitor
Output true if the input value is in the interval [a, b], which is centered at thresholdCenter and has width thresholdWidth. This actor controls the integration step size so that the input does not cross the threshold without producing at least one true output. The output can be used as a pure event to trigger other events or state transitions. When the input crosses the interval in one step, this actor will report that the integration step is not accurate and refines the new step size by bisecting the old step size.
| Red (cxh) |
| Red (liuj) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.Entity |
Entity.ContainedObjectsIterator |
| Field Summary | |
TypedIOPort |
input
The input port, single port with type double. |
TypedIOPort |
output
The output port, single port with type boolean. |
Parameter |
thresholdCenter
The parameter for the center of the threshold. |
Parameter |
thresholdWidth
The parameter for the width of the threshold. |
| Fields inherited from class ptolemy.actor.AtomicActor |
_stopRequested |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Fields inherited from interface ptolemy.actor.Executable |
COMPLETED, NOT_READY, STOP_ITERATING |
| Constructor Summary | |
ThresholdMonitor(CompositeEntity container,
java.lang.String name)
Construct an actor in the specified container with the specified name. |
|
| Method Summary | |
void |
attributeChanged(Attribute attribute)
Update local caches if the attributes have been changed. |
void |
fire()
Consume the current input. |
void |
initialize()
Initialize the execution. |
boolean |
isThisStepAccurate()
Return true if this step did not cross the threshold. |
boolean |
postfire()
Make this input to be the history input and return true. |
double |
predictedStepSize()
Return java.lang.Double.MAX_VALUE, since this actor does not predict step sizes. |
double |
refinedStepSize()
Return half the current step size if the step crosses the threshold. |
| Methods inherited from class ptolemy.actor.TypedAtomicActor |
_addPort, attributeTypeChanged, clone, newPort, typeConstraintList |
| Methods inherited from class ptolemy.actor.AtomicActor |
_createReceivers, clone, connectionsChanged, getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, iterate, newReceiver, outputPortList, prefire, preinitialize, pruneDependencies, removeDependency, setContainer, stop, stopFire, terminate, wrapup |
| Methods inherited from class ptolemy.kernel.ComponentEntity |
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, propagateExistence, setName |
| Methods inherited from class ptolemy.kernel.Entity |
_description, _exportMoMLContents, _removePort, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName, validateSettables |
| Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ptolemy.actor.Actor |
getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, newReceiver, outputPortList |
| Methods inherited from interface ptolemy.actor.Executable |
iterate, prefire, preinitialize, stop, stopFire, terminate, wrapup |
| Methods inherited from interface ptolemy.kernel.util.Derivable |
getDerivedLevel, getDerivedList, propagateValue |
| Methods inherited from interface ptolemy.kernel.util.Nameable |
description, getFullName, getName, getName |
| Field Detail |
public TypedIOPort input
public TypedIOPort output
public Parameter thresholdWidth
public Parameter thresholdCenter
| Constructor Detail |
public ThresholdMonitor(CompositeEntity container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
container - The subsystem that this actor is lived inname - The name of the actor.
IllegalActionException - If the entity cannot be contained
by the proposed container.
NameDuplicationException - If name coincides with
an entity already in the container.| Method Detail |
public void attributeChanged(Attribute attribute)
throws IllegalActionException
attributeChanged in class NamedObjattribute - The attribute that changed.
IllegalActionException - If there is no token in the
the attribute.
public void fire()
throws IllegalActionException
fire in interface Executablefire in class AtomicActorIllegalActionException - If there is no director.
public void initialize()
throws IllegalActionException
initialize in interface Executableinitialize in class AtomicActorIllegalActionException - If thrown by the super class.public boolean isThisStepAccurate()
isThisStepAccurate in interface CTStepSizeControlActor
public boolean postfire()
throws IllegalActionException
postfire in interface Executablepostfire in class AtomicActorIllegalActionException - Not thrown in this base class.public double predictedStepSize()
predictedStepSize in interface CTStepSizeControlActorpublic double refinedStepSize()
refinedStepSize in interface CTStepSizeControlActor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||