Interface CausalityInterface

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void declareDelayDependency​(IOPort input, IOPort output, double timeDelay, int index)
      Set the dependency that the specified output port has on the specified input port to represent a time delay with the specified value and superdense time index.
      java.util.Collection<IOPort> dependentPorts​(IOPort port)
      Return a collection of the ports in this actor that depend on or are depended on by the specified port.
      java.util.Collection<IOPort> equivalentPorts​(IOPort input)
      Return a collection of input ports in the associated actor that are in the same equivalence class as the specified input port.
      Actor getActor()
      Return the associated actor.
      Dependency getDefaultDependency()
      Return the default dependency.
      Dependency getDependency​(IOPort input, IOPort output)
      Return the dependency between the specified input port and the specified output port.
      void removeDependency​(IOPort inputPort, IOPort outputPort)
      Remove the dependency that the specified output port has on the specified input port, meaning that the dependency is set to oPlusIdentity.
    • Method Detail

      • declareDelayDependency

        void declareDelayDependency​(IOPort input,
                                    IOPort output,
                                    double timeDelay,
                                    int index)
        Set the dependency that the specified output port has on the specified input port to represent a time delay with the specified value and superdense time index. Implementations of this method should be adaptive to the type of Dependency provided by the director. For example, if the director provides a BooleanDependency, then an implementation of this method should define the dependency to be oTimesIdentity if the timeDelay is 0.0 and the index is 0, and otherwise it should be oPlusIdentity.
        Parameters:
        input - The input port.
        output - The output port with a time delay dependency on the input port.
        timeDelay - The time delay.
        index - The superdense time index.
      • dependentPorts

        java.util.Collection<IOPort> dependentPorts​(IOPort port)
                                             throws IllegalActionException
        Return a collection of the ports in this actor that depend on or are depended on by the specified port. A port Y depends on a port X if Y is an output and X is an input and getDependency(X,Y) returns the oTimesIdentity. The argument port should be contained by the same actor returned by getActor().
        Parameters:
        port - The port to find the dependents of.
        Returns:
        a collection of ports in this actor that depend on or are depended on by the specified port.
        Throws:
        IllegalActionException - If the dependency cannot be determined.
      • equivalentPorts

        java.util.Collection<IOPort> equivalentPorts​(IOPort input)
                                              throws IllegalActionException
        Return a collection of input ports in the associated actor that are in the same equivalence class as the specified input port. An equivalence class is defined as follows. If input ports X and Y each have a dependency equal to the default dependency's oTimesIdentity to any common output port or to the state of the associated actor, then they are in an equivalence class. That is, there is a causal dependency. They are also in the same equivalence class if there is a port Z in an equivalence class with X and in an equivalence class with Y. Otherwise, they are not in the same equivalence class.
        Parameters:
        input - The port to find the equivalence class of.
        Returns:
        a collection of input ports that are in the same equivalence class as the specified input port.
        Throws:
        IllegalActionException - If the equivalent ports cannot be determined.
      • getActor

        Actor getActor()
        Return the associated actor.
        Returns:
        The actor for which this is a dependency.
      • getDefaultDependency

        Dependency getDefaultDependency()
        Return the default dependency.
        Returns:
        The default dependency.
      • getDependency

        Dependency getDependency​(IOPort input,
                                 IOPort output)
                          throws IllegalActionException
        Return the dependency between the specified input port and the specified output port.
        Parameters:
        input - The specified input port.
        output - The specified output port.
        Returns:
        The dependency between the specified input port and the specified output port.
        Throws:
        IllegalActionException - If the dependency cannot be determined.
      • removeDependency

        void removeDependency​(IOPort inputPort,
                              IOPort outputPort)
        Remove the dependency that the specified output port has on the specified input port, meaning that the dependency is set to oPlusIdentity. If there is no defined dependency between the two ports, then this method will have no effect.
        Parameters:
        inputPort - The input port.
        outputPort - The output port that does not depend on the input port.