In conjunction with the blocking read/write facilities, the DDE domain uses a distributed, local notion of time. In a network of actors governed by a DDEDirector each actor has a local notion of time. Several features of the DDEDirector are intended to facilitate these local notions of time.
All DDE models have a completion time. The completion time is a preset time after which all execution ceases. The completion time for a DDEDirector is specified via the stopTime parameter. The value of the stopTime parameter is passed to the receivers of all actors that the DDEDirector governs via newReceiver() during initialize(). After initialize() has been called, the value of stopTime can not be changed.
The default value of the stopTime parameter is PrioritizedTimedQueue.ETERNITY. Given this value, a DDE model will continue executing without regard for a completion time.
Deadlock due to feedback loops is dealt with via NullTokens. When an actor in a DDE model receives a NullToken, it may advance its local time value even though no computation results directly from consumption of the NullToken. For models with feedback topologies, the FeedBackDelay actor should be used in the feedback loop.
The DDE model of computation assumes that valid time stamps have non-negative values. Three special purpose negative time values are reserved with the following meanings. The value of PrioritizedTimedQueue.INACTIVE is reserved to indicate the termination of a receiver. The value of PrioritizedTimedQueue.ETERNITY is reserved to indicate that a receiver has not begun to participate in a model's execution. The value of PrioritizedTimedQueue.IGNORE is reserved to indicate that the current token at the head of a DDEReceiver should be ignored in favor of the tokens contained in the other receivers of the actor in question. More details of IGNORE can be found in FeedBackDelay.
NOTE: The current implementation of this director does not include an infrastructure for mutations. Hence, ChangeRequest and other facilities for changing the topology of a model are not included in this director. @author John S. Davis II, Mudit Goel @version $Id: DDEDirector.java,v 1.132 2007/12/06 18:21:59 cxh Exp $ @since Ptolemy II 0.3 @Pt.ProposedRating Red (davisj) @Pt.AcceptedRating Red (cxh) @see ptolemy.domains.pn.kernel.PNDirector @see ptolemy.domains.dde.kernel.FeedBackDelay @see ptolemy.domains.dde.kernel.NullToken
|
|
|
|