public class FeedBackDelay extends DDEActor
Two parameters - nullDelay and realDelay - are available for determining whether an FeedBackDelay actor increments the time stamp of produced output tokens. The default value of nullDelay (realDelay) is true (false). If the nullDelay (realDelay) parameter is set to true, then the time stamps of NullTokens (real tokens) will be incremented as they pass through this actor.
The delay value that is applied (given that one of the above parameters is true) is determined by the setDelay() and getDelay() methods. More elaborate delay values can be made available by overriding the getDelay() method in derived classes.
FeedBackDelay actors are effective for preventing Zeno conditions involving cycles of null tokens. If a DDE model has a feedback topology, a FeedBackDelay actor should be added into the feedback loop.
The delay value of a FeedBackDelay actor must be wisely chosen. The delay value should be smaller than any other successive time stamp increment found in a given DDE model. This means that if a particular model might have any two time stamps with time difference delta, then the delay value should be smaller than delta.
NullToken
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
Parameter |
delay
The delay for this actor.
|
TypedIOPort |
input
The input port.
|
Parameter |
nullDelay
The boolean parameter that indicates whether a delay value
will be added to the time stamp of null tokens that are
produced by this actor.
|
TypedIOPort |
output
The output port.
|
Parameter |
realDelay
The boolean parameter that indicates whether a delay value
will be added to the time stamp of real tokens that are
produced by this actor.
|
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
FeedBackDelay()
Construct a FeedBackDelay with no container and a name that
is an empty string.
|
FeedBackDelay(CompositeEntity container,
java.lang.String name)
Construct a FeedBackDelay with the specified container and
name.
|
FeedBackDelay(Workspace workspace)
Construct a FeedBackDelay with the specified workspace and
a name that is an empty string.
|
Modifier and Type | Method and Description |
---|---|
void |
fire()
Consume a single input token and produce an identical output
token.
|
double |
getDelay()
Return the delay value of this actor.
|
void |
initialize()
Initialize this actor by setting all receivers so that
they do not hide NullTokens.
|
_getNextInput, getNextToken
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
addInitializable, preinitialize, removeInitializable, wrapup
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public Parameter delay
public TypedIOPort input
public Parameter nullDelay
public TypedIOPort output
public Parameter realDelay
public FeedBackDelay() throws IllegalActionException, NameDuplicationException
IllegalActionException
- If the constructor of the
superclass throws an IllegalActionException.NameDuplicationException
- If the constructor of the
superclass throws a NameDuplicationException .public FeedBackDelay(Workspace workspace) throws IllegalActionException, NameDuplicationException
workspace
- The workspace for this FeedBackDelay.IllegalActionException
- If the constructor of the
superclass throws an IllegalActionException.NameDuplicationException
- If the constructor of the
superclass throws a NameDuplicationException .public FeedBackDelay(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container of this FeedBackDelay.name
- The name of this FeedBackDelay.IllegalActionException
- If the constructor of the
superclass throws an IllegalActionException.NameDuplicationException
- If the constructor of the
superclass throws a NameDuplicationException .public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class AtomicActor<TypedIOPort>
IllegalActionException
- If there is an error when
sending the output token or setting the current time.public double getDelay() throws IllegalActionException
IllegalActionException
- If there is a problem reading
the delay token.public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class AtomicActor<TypedIOPort>
IllegalActionException
- If there is an error when
when attempting to access the receivers of this actor.NullToken
,
DDEReceiver