ptolemy.domains.continuous.kernel
Class ContinuousIntegrator.IntegratorCausalityInterface

java.lang.Object
  extended by ptolemy.actor.util.DefaultCausalityInterface
      extended by ptolemy.domains.continuous.kernel.ContinuousIntegrator.IntegratorCausalityInterface
All Implemented Interfaces:
CausalityInterface
Enclosing class:
ContinuousIntegrator

private static class ContinuousIntegrator.IntegratorCausalityInterface
extends DefaultCausalityInterface

Custom causality interface that fine tunes the equivalent ports and removes the dependence of the state output on the derivative input. Ensure that only the impulse and initialState inputs are equivalent (the base class will make all ports equivalent because the initialState input is a ParameterPort).


Field Summary
private  ContinuousIntegrator _actor
           
private  java.util.LinkedList<IOPort> _derivativeEquivalents
           
private  java.util.LinkedList<IOPort> _otherEquivalents
           
 
Fields inherited from class ptolemy.actor.util.DefaultCausalityInterface
_backwardPrunedDependencies, _defaultDependency, _delayDependencies, _EMPTY_COLLECTION, _forwardPrunedDependencies
 
Constructor Summary
ContinuousIntegrator.IntegratorCausalityInterface(ContinuousIntegrator actor, Dependency defaultDependency)
           
 
Method Summary
 java.util.Collection<IOPort> equivalentPorts(IOPort input)
          Override the base class to declare that the initialState and impulse inputs are equivalent, but not the derivative input port.
 
Methods inherited from class ptolemy.actor.util.DefaultCausalityInterface
_growDependencies, declareDelayDependency, dependentPorts, getActor, getDefaultDependency, getDependency, removeDependency, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_actor

private ContinuousIntegrator _actor

_derivativeEquivalents

private java.util.LinkedList<IOPort> _derivativeEquivalents

_otherEquivalents

private java.util.LinkedList<IOPort> _otherEquivalents
Constructor Detail

ContinuousIntegrator.IntegratorCausalityInterface

public ContinuousIntegrator.IntegratorCausalityInterface(ContinuousIntegrator actor,
                                                         Dependency defaultDependency)
Method Detail

equivalentPorts

public java.util.Collection<IOPort> equivalentPorts(IOPort input)
Override the base class to declare that the initialState and impulse inputs are equivalent, but not the derivative input port. This is because to react to inputs at either initialState or impulse, we have to know what the input at the other is. But the input at derivative does not need to be known. It will affect the future only.

Specified by:
equivalentPorts in interface CausalityInterface
Overrides:
equivalentPorts in class DefaultCausalityInterface
Parameters:
input - The port to find the equivalence class of.
Returns:
set of the input ports in this actor that are in an equivalence class with the specified input.
Throws:
java.lang.IllegalArgumentException - If the argument is not contained by the associated actor.