ptolemy.domains.tdl.kernel
Class TDLCausalityInterface
java.lang.Object
ptolemy.actor.util.DefaultCausalityInterface
ptolemy.actor.util.CausalityInterfaceForComposites
ptolemy.domains.tdl.kernel.TDLCausalityInterface
- All Implemented Interfaces:
- CausalityInterface
public class TDLCausalityInterface
- extends CausalityInterfaceForComposites
This class gives a specialized causality interface for TDL.
- Since:
- Ptolemy II 8.0
- Version:
- $Id: TDLCausalityInterface.java 57044 2010-01-27 22:41:05Z cxh $
- Author:
- Patricia Derler, Contributor: Edward A. Lee
- Accepted Rating:
- Proposed Rating:
| Methods inherited from class ptolemy.actor.util.CausalityInterfaceForComposites |
_computeActorDepth, checkForCycles, dependentPorts, describeDepths, equivalentPorts, getDependency, getDepthOfActor, getDepthOfPort, invalidate, removeDependency, topologicalSort |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_minimumDelays
private java.util.Map<IOPort,Dependency> _minimumDelays
- Cache of minimum delays that were already computed.
TDLCausalityInterface
public TDLCausalityInterface(Actor actor,
Dependency defaultDependency)
throws java.lang.IllegalArgumentException
- Construct a causality interface for the specified actor.
- Parameters:
actor - The actor for which this is a causality interface.
This is required to be an instance of CompositeEntity.defaultDependency - The default dependency of an output
port on an input port.
- Throws:
java.lang.IllegalArgumentException - If the actor parameter is not
an instance of CompositeEntity.
getMinimumDelay
public Dependency getMinimumDelay(IOPort port)
throws IllegalActionException
- Return the minimum delay for this port. The minimum delay is
the minimum model time delay between this port or any
equivalent port and a source actor.
- Parameters:
port - Port for which the minimum delay should be computed.
- Returns:
- the minimum delay for the specified port.
- Throws:
IllegalActionException - Thrown if minimum delay
cannot be computed, because e.g. equivalent ports cannot be
computed.
wrapup
public void wrapup()
- Override the base class
Clear local variables.
_getMinimumDelay
private Dependency _getMinimumDelay(IOPort port,
java.util.Collection<IOPort> visitedPorts)
throws IllegalActionException
- Recursively compute the minimum delay. To avoid loops, remember visited ports.
- Parameters:
port - Port to compute minimum delay for.visitedPorts - Ports that have already been considered in the recursive computation.
- Returns:
- Dependency describing the minimum Delay.
- Throws:
IllegalActionException - Thrown if minimum delay cannot be computed.