Class PtidesDirector
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.actor.Director
-
- ptolemy.domains.de.kernel.DEDirector
-
- ptolemy.domains.ptides.kernel.PtidesDirector
-
- All Implemented Interfaces:
java.lang.Cloneable
,Executable
,Initializable
,SuperdenseTimeDirector
,Changeable
,Debuggable
,DebugListener
,Decorator
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class PtidesDirector extends DEDirector implements Decorator
This director implements the Ptides programming model, which is used for the design of distributed real-time systems.This director can only be used inside the PtidesPlatform and if the PtidesPlatform is dragged and dropped from the library, it already contains a PtidesDirector. A PtidesPlatform must be embedded in a timed director such as DE or Continuous. The time of this enclosing director simulates physical time. The localClock of this PtidesDirector simulates platformTime.
The Ptides director is based on the DE director. Like the DE director, this director maintains a totally ordered set of events. Event timestamps are given in logical time. The logical time is decoupled from the platformTime. The model time of the director is the platformTime unless an actor is fired; then the model time is the timestamp of the event that caused the actor firing.
Unlike the DE Director, this director can process events out of timestamp order if they are not causally related. Whether events can be processed is checked in a safe-to-process analysis. This analysis returns a boolean to indicate whether an event can be processed without violating Ptides semantics, based on information such as events currently in the event queue, their model time relationship with each other, as well as the current platform physical time. In this particular version of the Ptides scheduler, the director takes all events from the event queue, and compares their timestamp with the current platform time + a pre-computed offset (call this the delayOffset). If the platform time is larger, than this event is safe to process. Otherwise, we wait for platform time to pass until this event becomes safe, at which point it is processed. Other, smarter kinds of safe-to-process analysis can be implemented in future versions.
Currently, only the DE director can be used as the enclosing director. One reason for using the DE director is that time cannot go backwards in DE, which is an important physical time property. More importantly, the fire method of this director changes the persistent state of actors, which means this director cannot be used inside of an actor that performs fix point iteration, which includes (currently), Continuous, CT and SR. For more details, please refer to Edward A. Lee, Haiyang Zheng. Leveraging Synchronous Language Principles for Heterogeneous Modeling and Design of Embedded Systems, Proceedings of the 7th ACM & IEEE international conference on Embedded software, ACM, 114-123, 2007.
This director provides a set of features to address both the distributed and the real-time aspects of system design. To address the distributed aspect, each PtidesPlatform simulates a computation platform (e.g., a microprocessor), while the enclosing director simulates the physical world. Actors under the Ptides director then communicate to the outside via SensorPorts, ActuatorPorts, or network ports (NetworkReceivers, NetworkTransmitters).
This director allows for simulation of execution time. If the PtidesPlatform contains ResourceSchedulers, the scheduling of actors is performed by these. Actors must specify in parameters which ResourceSchedulers they are assigned to and the executionTime. The passage of execution time equals the passage of platformTime. Execution time has no influence on the event timestamps.
In a Ptides environment, all platforms are assumed to be synchronized within a bounded error.
The platform time is used in the following situations: generating timestamps for sensor events, enforcing deadlines for actuation events, and to setup the wake-up time for timed interrupts. Also, the Ptides operational semantics assumes a bound in the time synchronization error. This error is captured in the parameter
clockSynchronizationErrorBound
. If the actual error exceeds this bound, the safe-to-process analysis could produce an incorrect result. The demo PtidesNetworkLatencyTest illustrates this error.The implementation is based on the operational semantics of Ptides, as described in: Jia Zou, Slobodan Matic, Edward A. Lee, Thomas Huining Feng, Patricia Derler. Execution Strategies for Ptides, a Programming Model for Distributed Embedded Systems, 15th IEEE Real-Time and Embedded Technology and Applications Symposium, 2009, IEEE Computer Society, 77-86, April, 2009.
- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Patricia Derler, Edward A. Lee, Slobodan Matic, Mike Zimmer, Jia Zou
- Pt.AcceptedRating:
- Red (derler)
- Pt.ProposedRating:
- Red (derler)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<TypedIOPort,java.util.Set<TypedIOPort>>
_inputPortGroups
Map an input port to a set which is its input port group.protected java.util.List<TypedIOPort>
_inputPorts
List of all input ports in the model (actuator and network transmitter ports are also considered input ports).protected Time
_nextFireTime
The earliest time this director should be refired.protected java.util.Map<TypedIOPort,java.util.Map<TypedIOPort,SuperdenseDependency>>
_superdenseDependencyPair
Store the superdense dependency between pairs of input ports using nested Maps.Parameter
autoThrottling
Auto throttling of local sources.SharedParameter
clockSynchronizationErrorBound
Bound on clock synchronization error across all platforms.-
Fields inherited from class ptolemy.domains.de.kernel.DEDirector
_actorsFinished, _actorsInExecution, _disabledActors, _eventQueue, _eventQueueLock, _isInitializing, _microstep, _noMoreActorsToFire, _stopFireRequested, binCountFactor, enforceMicrostepSemantics, isCQAdaptive, minBinCount, stopWhenQueueIsEmpty, synchronizeToRealTime
-
Fields inherited from class ptolemy.actor.Director
_actorsFinishedExecution, _aspectForActor, _aspectsPresent, _defaultMicrostep, _executionAspects, _finishRequested, _initializables, _nextScheduleTime, _stopRequested, _tokenSentToCommunicationAspect, _zeroTime, localClock, startTime, stopTime
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _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
Constructors Constructor Description PtidesDirector(CompositeEntity container, java.lang.String name)
Construct a director in the given container with the given name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
_checkForNextEvent()
Model time is only used for correct execution of actors and the scheduler will determine whether another event can be fired in the current firing of the platform, so this method isn't needed.protected void
_enqueueTriggerEvent(IOPort ioPort, Token token, Receiver receiver)
Put a trigger event into the event queue.protected static java.lang.Double
_getDoubleParameterValue(NamedObj object, java.lang.String parameterName)
Return the value stored in a parameter associated with the NamedObj.protected static java.lang.Integer
_getIntParameterValue(NamedObj object, java.lang.String parameterName)
Return the value stored in a parameter associated with the NamedObj.protected Actor
_getNextActorToFire()
Return the actor to fire in this iteration, or null if no actor should be fired.protected void
_issueExecutionAspectWarning()
In DE, a warning is issued when execution aspects are used because these might change the DE semantics of the execution.void
addInputEvent(PtidesPort sourcePort, PtidesEvent event, double deviceDelay)
Add a new event to the input queue.void
attributeChanged(Attribute attribute)
Update the director parameters when attributes are changed.java.lang.Object
clone(Workspace workspace)
Clone the object into the specified workspace.DecoratorAttributes
createDecoratorAttributes(NamedObj target)
Create and return the decorated attributes for the PtidesDirector.java.util.List<NamedObj>
decoratedObjects()
Return local sources contained by the composite of this director.Dependency
defaultDependency()
Return the default dependency between input and output ports, which for the Ptides domain is aSuperdenseDependency
.void
fire()
Before super.fire() is called, transfer all input events that are ready are transferred.Time
fireAt(Actor actor, Time time, int index)
Add a pure event to the queue of pure events.Time
getCurrentSourceTimestamp()
Return the source timestamp of the event that is currently being processed.Time
getDeadline(NamedObj actor, Time timestamp)
Compute the deadline for an actor that requests a firing at time timestamp.int
getIndex()
Return a superdense time index for the current time, where the index is equal to the microstep.int
getMicrostep()
Return the current microstep or the microstep of the event, if an actor is currently executing.Time
getModelTime()
Return the local time or, (i) if an actor is executing or (ii) an input token is read, (i) the timestamp of the event that caused the actor execution or (ii) the timestamp of the input event.java.util.Map<TypedIOPort,java.util.Map<TypedIOPort,SuperdenseDependency>>
getSuperdenseDependencyPair()
Return the superdense dependency hashmap This is used for the code generation in order to fill the generated director hashmap.void
initialize()
Initialize all the actors and variables.boolean
isGlobalDecorator()
Returns false, as this director only decorates local sources immediately contained by the PtidesDirector, thus it should not cross opaque hierarchy boundaries.Receiver
newReceiver()
Return a new receiver of the typePtidesReceiver
.boolean
postfire()
Return false if there are no more actors to be fired or the stop() method has been called.boolean
prefire()
Override the base class to not set model time to that of the enclosing director.void
preinitialize()
Call the preinitialize of the super class and create new event Queue.void
resumeActor(NamedObj actor)
Resume the execution of an actor that was previously blocked because it didn't have all the resources it needed for execution.void
setContainer(NamedObj container)
Override the base class to first set the container, then establish a connection with any decorated objects it finds in scope in the new container.-
Methods inherited from class ptolemy.domains.de.kernel.DEDirector
_actorFired, _disableActor, _enqueueEvent, _enqueueTriggerEvent, _fire, _getDepthOfActor, _getDepthOfIOPort, _noActorToFire, _requestFiring, _schedule, addDebugListener, cancelFireAt, cancelFireAt, describePriorities, fireAt, fireAtCurrentTime, fireAtRelativeTime, getCausalityInterface, getModelNextIterationTime, getNextEventTime, getStartTime, getStopTime, invalidateSchedule, mutexLockObject, removeDebugListener, setIndex, stop, stopFire, suggestedModalModelDirectors, transferInputs, wrapup
-
Methods inherited from class ptolemy.actor.Director
_actorFinished, _consultTimeRegulators, _description, _isEmbedded, _isTopLevel, _transferInputs, _transferOutputs, addInitializable, createSchedule, delayDependency, elapsedTimeSinceStart, finish, fireAt, fireContainerAt, fireContainerAt, getCurrentTime, getEnvironmentTime, getExecutionAspect, getGlobalTime, getModelStartTime, getModelStopTime, getNextIterationTime, getTimeResolution, implementsStrictActorSemantics, initialize, invalidateResolvedTypes, isEmbedded, isFireFunctional, isStopRequested, isStrict, iterate, notifyTokenSentToCommunicationAspect, preinitialize, removeInitializable, requestInitialization, resume, scheduleContainedActors, setCurrentTime, setEmbedded, setModelTime, setTimeResolution, supportMultirateFiring, suspend, terminate, transferOutputs, transferOutputs
-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
-
-
-
-
Field Detail
-
clockSynchronizationErrorBound
public SharedParameter clockSynchronizationErrorBound
Bound on clock synchronization error across all platforms.
-
autoThrottling
public Parameter autoThrottling
Auto throttling of local sources. This parameter is only visible in expert mode and defaults to the boolean value true.
-
_inputPorts
protected java.util.List<TypedIOPort> _inputPorts
List of all input ports in the model (actuator and network transmitter ports are also considered input ports).
-
_inputPortGroups
protected java.util.Map<TypedIOPort,java.util.Set<TypedIOPort>> _inputPortGroups
Map an input port to a set which is its input port group.
-
_nextFireTime
protected Time _nextFireTime
The earliest time this director should be refired.
-
_superdenseDependencyPair
protected java.util.Map<TypedIOPort,java.util.Map<TypedIOPort,SuperdenseDependency>> _superdenseDependencyPair
Store the superdense dependency between pairs of input ports using nested Maps. Providing the source input as a key will return a Map value, where the destination input port can be used as a key to return the superdense dependency.
-
-
Constructor Detail
-
PtidesDirector
public PtidesDirector(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct a director in the given container with the given name. The container argument must not be null, or a NullPointerException will be thrown. If the name argument is null, then the name is set to the empty string. Increment the version number of the workspace.- Parameters:
container
- Container of the director.name
- Name of this director.- Throws:
IllegalActionException
- If the director is not compatible with the specified container.NameDuplicationException
- If the container not a CompositeActor and the name collides with an entity in the container.
-
-
Method Detail
-
addInputEvent
public void addInputEvent(PtidesPort sourcePort, PtidesEvent event, double deviceDelay) throws IllegalActionException
Add a new event to the input queue. Compute the time when this input can be consumed and store in queue. The time depends on the device delay.- Parameters:
sourcePort
- the source port.event
- New input event.deviceDelay
- The device delay.- Throws:
IllegalActionException
- If device delay parameter cannot be computed.
-
attributeChanged
public void attributeChanged(Attribute attribute) throws IllegalActionException
Update the director parameters when attributes are changed.- Overrides:
attributeChanged
in classDEDirector
- Parameters:
attribute
- The changed parameter.- Throws:
IllegalActionException
- If the parameter set is not valid. Not thrown in this class.
-
clone
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
Clone the object into the specified workspace. The new object is not added to the directory of that workspace (you must do this yourself if you want it there). The result is an attribute with no container.- Overrides:
clone
in classDEDirector
- Parameters:
workspace
- The workspace for the cloned object.- Returns:
- The new Attribute.
- Throws:
java.lang.CloneNotSupportedException
- Not thrown in this base class- See Also:
NamedObj.exportMoML(Writer, int, String)
,NamedObj.setDeferringChangeRequests(boolean)
-
createDecoratorAttributes
public DecoratorAttributes createDecoratorAttributes(NamedObj target)
Create and return the decorated attributes for the PtidesDirector. The director decorates local sources with throttling attributes that allow for specification of how far ahead in logical time these actors can execute or how many tokens they can produce at a time.- Specified by:
createDecoratorAttributes
in interfaceDecorator
- Parameters:
target
- The NamedObj that will be decorated.- Returns:
- The decorated attributes for the target NamedObj, or null if the specified NamedObj is not decorated by this decorator.
-
defaultDependency
public Dependency defaultDependency()
Return the default dependency between input and output ports, which for the Ptides domain is aSuperdenseDependency
.- Overrides:
defaultDependency
in classDirector
- Returns:
- The default dependency that describes a time delay of 0.0, and a index delay of 0 between ports.
- See Also:
Dependency
,CausalityInterface
,Actor.getCausalityInterface()
-
decoratedObjects
public java.util.List<NamedObj> decoratedObjects()
Return local sources contained by the composite of this director.- Specified by:
decoratedObjects
in interfaceDecorator
- Returns:
- List of entities.
-
fire
public void fire() throws IllegalActionException
Before super.fire() is called, transfer all input events that are ready are transferred. After super.fire() is called, transfer all output events that are ready are transferred.- Specified by:
fire
in interfaceExecutable
- Overrides:
fire
in classDEDirector
- Throws:
IllegalActionException
- If we couldn't process an event or if an event of smaller timestamp is found within the event queue.- See Also:
DEDirector._fire()
-
fireAt
public Time fireAt(Actor actor, Time time, int index) throws IllegalActionException
Add a pure event to the queue of pure events.- Overrides:
fireAt
in classDEDirector
- Parameters:
actor
- Actor to fire.time
- Time the actor should be fired at.index
- Microstep the actor should be fired at.- Returns:
- The time the actor requested to be refired at.
- Throws:
IllegalActionException
- If firing of the container doesn't succeed.- See Also:
DEDirector.fireAtCurrentTime(Actor)
-
getCurrentSourceTimestamp
public Time getCurrentSourceTimestamp()
Return the source timestamp of the event that is currently being processed. If no event is being processed, (i.e. event is analyzed for safe to process, actor is fired, ...) this method can return null or the timestamp of the previous event. This method should not be called if no event is currently being processed.- Returns:
- The current source timestamp.
-
getDeadline
public Time getDeadline(NamedObj actor, Time timestamp) throws IllegalActionException
Compute the deadline for an actor that requests a firing at time timestamp.- Overrides:
getDeadline
in classDirector
- Parameters:
actor
- The actor that requests firing.timestamp
- The time when the actor wants to be fired.- Returns:
- The deadline for the actor.
- Throws:
IllegalActionException
- If time objects cannot be created.
-
getIndex
public int getIndex()
Return a superdense time index for the current time, where the index is equal to the microstep.- Specified by:
getIndex
in interfaceSuperdenseTimeDirector
- Overrides:
getIndex
in classDEDirector
- Returns:
- A superdense time index.
- See Also:
DEDirector.setIndex(int)
,SuperdenseTimeDirector
-
getModelTime
public Time getModelTime()
Return the local time or, (i) if an actor is executing or (ii) an input token is read, (i) the timestamp of the event that caused the actor execution or (ii) the timestamp of the input event.- Overrides:
getModelTime
in classDirector
- Returns:
- The local time or the semantic time.
- See Also:
Director.setModelTime(Time)
-
getMicrostep
public int getMicrostep()
Return the current microstep or the microstep of the event, if an actor is currently executing.- Overrides:
getMicrostep
in classDEDirector
- Returns:
- microstep of the current time.
- See Also:
DEDirector.getIndex()
,DEDirector.setIndex(int)
,SuperdenseTimeDirector
-
getSuperdenseDependencyPair
public java.util.Map<TypedIOPort,java.util.Map<TypedIOPort,SuperdenseDependency>> getSuperdenseDependencyPair()
Return the superdense dependency hashmap This is used for the code generation in order to fill the generated director hashmap.- Returns:
- The Superdense dependency hashmap
-
initialize
public void initialize() throws IllegalActionException
Initialize all the actors and variables. Perform static analysis on superdense dependencies between input ports in the topology.- Specified by:
initialize
in interfaceInitializable
- Overrides:
initialize
in classDEDirector
- Throws:
IllegalActionException
- If any of the methods contained in initialize() throw it.
-
isGlobalDecorator
public boolean isGlobalDecorator()
Returns false, as this director only decorates local sources immediately contained by the PtidesDirector, thus it should not cross opaque hierarchy boundaries.- Specified by:
isGlobalDecorator
in interfaceDecorator
- Returns:
- false.
-
newReceiver
public Receiver newReceiver()
Return a new receiver of the typePtidesReceiver
.- Overrides:
newReceiver
in classDEDirector
- Returns:
- A new PtidesReceiver.
-
postfire
public boolean postfire() throws IllegalActionException
Return false if there are no more actors to be fired or the stop() method has been called.- Specified by:
postfire
in interfaceExecutable
- Overrides:
postfire
in classDEDirector
- Returns:
- True If this director will be fired again.
- Throws:
IllegalActionException
- If the stopWhenQueueIsEmpty parameter does not contain a valid token, or refiring can not be requested.
-
prefire
public boolean prefire() throws IllegalActionException
Override the base class to not set model time to that of the enclosing director. This method always returns true, deferring the decision about whether to fire an actor to the fire() method.- Specified by:
prefire
in interfaceExecutable
- Overrides:
prefire
in classDEDirector
- Returns:
- True.
- Throws:
IllegalActionException
-
preinitialize
public void preinitialize() throws IllegalActionException
Call the preinitialize of the super class and create new event Queue.- Specified by:
preinitialize
in interfaceInitializable
- Overrides:
preinitialize
in classDEDirector
- Throws:
IllegalActionException
- If the preinitialize() method of the container or one of the deeply contained actors throws it, or the parameters, minBinCount, binCountFactor, and isCQAdaptive, do not have valid tokens.
-
_issueExecutionAspectWarning
protected void _issueExecutionAspectWarning()
In DE, a warning is issued when execution aspects are used because these might change the DE semantics of the execution. In Ptides, this is not the case.- Overrides:
_issueExecutionAspectWarning
in classDEDirector
-
resumeActor
public void resumeActor(NamedObj actor) throws IllegalActionException
Description copied from class:DEDirector
Resume the execution of an actor that was previously blocked because it didn't have all the resources it needed for execution. This method puts an event into the queue for the current time.- Overrides:
resumeActor
in classDEDirector
- Parameters:
actor
- The actor that resumes execution.- Throws:
IllegalActionException
- Not thrown here but in derived classes.
-
setContainer
public void setContainer(NamedObj container) throws IllegalActionException, NameDuplicationException
Override the base class to first set the container, then establish a connection with any decorated objects it finds in scope in the new container.- Overrides:
setContainer
in classDirector
- Parameters:
container
- The container to attach this attribute to..- Throws:
IllegalActionException
- If this attribute is not of the expected class for the container, or it has no name, or the attribute and container are not in the same workspace, or the proposed container would result in recursive containment.NameDuplicationException
- If the container already has an attribute with the name of this attribute.- See Also:
Attribute.getContainer()
-
_checkForNextEvent
protected boolean _checkForNextEvent()
Model time is only used for correct execution of actors and the scheduler will determine whether another event can be fired in the current firing of the platform, so this method isn't needed. By always returning true, _getNextActorToFire() will be called which runs the scheduler.- Overrides:
_checkForNextEvent
in classDEDirector
- Returns:
- true Always.
-
_enqueueTriggerEvent
protected void _enqueueTriggerEvent(IOPort ioPort, Token token, Receiver receiver) throws IllegalActionException
Put a trigger event into the event queue.The trigger event has the same timestamp as that of the director. The microstep of this event is always equal to the current microstep of this director. The depth for the queued event is the depth of the destination IO port. Finally, the token and the destination receiver are also stored in the event.
If the event queue is not ready or the actor that contains the destination port is disabled, do nothing.
- Parameters:
ioPort
- The destination IO port.token
- The token associated with this event.receiver
- The destination receiver.- Throws:
IllegalActionException
- If the time argument is not the current time, or the depth of the given IO port has not be calculated, or the new event can not be enqueued.
-
_getDoubleParameterValue
protected static java.lang.Double _getDoubleParameterValue(NamedObj object, java.lang.String parameterName) throws IllegalActionException
Return the value stored in a parameter associated with the NamedObj.- Parameters:
object
- The object that has the parameter.parameterName
- The name of the parameter to be retrieved.- Returns:
- the value of the named parameter if the parameter is not null. Otherwise return null.
- Throws:
IllegalActionException
- If thrown while getting the value of the parameter.
-
_getIntParameterValue
protected static java.lang.Integer _getIntParameterValue(NamedObj object, java.lang.String parameterName) throws IllegalActionException
Return the value stored in a parameter associated with the NamedObj.- Parameters:
object
- The object that has the parameter.parameterName
- The name of the parameter to be retrieved.- Returns:
- the value of the named parameter if the parameter is not null. Otherwise return null.
- Throws:
IllegalActionException
- If thrown while getting the value of the parameter.
-
_getNextActorToFire
protected Actor _getNextActorToFire() throws IllegalActionException
Return the actor to fire in this iteration, or null if no actor should be fired. Since _checkForNextEvent() always returns true, this method will keep being called until it returns null.- Overrides:
_getNextActorToFire
in classDEDirector
- Returns:
- The next actor to be fired, which can be null.
- Throws:
IllegalActionException
- If _isSafeToProcess() throws it.
-
-