Class Path


  • public class Path
    extends java.lang.Object
    A flows path is a sequence of crossed buffers -- either represented by the sequence servers (said buffers) or turns connecting them.

    Remember for modeling purpose: A flow usually does not reach the output buffer of its sink. Therefore a flow's path should not contain a turn to it. Otherwise the flow interference pattern of the network will be too pessimistic, yet, the results remain valid.

    • Field Detail

      • path_servers

        private java.util.LinkedList<Server> path_servers
      • path_turns

        private java.util.LinkedList<Turn> path_turns
    • Constructor Detail

      • Path

        private Path()
      • Path

        protected Path​(java.util.List<Server> path_servers,
                       java.util.List<Turn> path_turns)
      • Path

        public Path​(Path path)
      • Path

        public Path​(Server single_hop)
    • Method Detail

      • createEmptyPath

        public static Path createEmptyPath()
      • getSource

        public Server getSource()
      • isSource

        public boolean isSource​(Server s)
      • getSink

        public Server getSink()
      • numServers

        public int numServers()
      • numTurns

        public int numTurns()
      • getTurns

        public java.util.LinkedList<Turn> getTurns()
      • getServers

        public java.util.LinkedList<Server> getServers()
      • getSubPath

        public Path getSubPath​(Server from,
                               Server to)
                        throws java.lang.Exception
        Parameters:
        from - Source, inclusive.
        to - Sink, inclusive.
        Returns:
        The subpath.
        Throws:
        java.lang.Exception - No subpath found; most probably an input parameter problem.
      • getPrecedingTurn

        public Turn getPrecedingTurn​(Server s)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getSucceedingTurn

        public Turn getSucceedingTurn​(Server s)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getPrecedingServer

        public Server getPrecedingServer​(Server s)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getSucceedingServer

        public Server getSucceedingServer​(Server s)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getServiceCurve

        public ServiceCurve getServiceCurve()
                                     throws java.lang.Exception
        Just convolves the service curves on the path and returns the result.
        Returns:
        The convolved curve
        Throws:
        java.lang.Exception
      • getServiceCurve

        private ServiceCurve getServiceCurve​(java.util.Collection<Server> servers)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getMaxServiceCurve

        public MaxServiceCurve getMaxServiceCurve()
                                           throws java.lang.Exception
        Returns the convolution of the maximum service curves of all servers on the given lnik path path that have the useMaxSC flag set.
        If a server either has no maximum service curve set or useMaxSC is disabled, calculations take place with the default maximum service curve, i.e., the zero delay burst curve, so the result will not be influenced.
        Returns:
        The convolved curve
        Throws:
        java.lang.Exception
      • getMaxServiceCurve

        private MaxServiceCurve getMaxServiceCurve​(java.util.Collection<Server> servers)
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getStoredMaxSC

        public MaxServiceCurve getStoredMaxSC()
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getStoredMaxSC

        private MaxServiceCurve getStoredMaxSC​(java.util.Collection<Server> servers)
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getMaxScRate

        public MaxServiceCurve getMaxScRate()
                                     throws java.lang.Exception
        Returns the convolution of the maximum service curves of all servers on the given turn path path that have the useMaxScRate flag set.
        If a server either has no maximum service curve set or useMaxScRate is disabled, calculations take place with the default maximum service curve, i.e., the zero delay burst curve, so the result will not be influenced.
        Returns:
        The convolved curve
        Throws:
        java.lang.Exception
      • getMaxScRate

        private MaxServiceCurve getMaxScRate​(java.util.Collection<Server> servers)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getStoredMaxScRate

        public MaxServiceCurve getStoredMaxScRate()
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getStoredMaxScRate

        private MaxServiceCurve getStoredMaxScRate​(java.util.Collection<Server> servers)
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toShortString

        public java.lang.String toShortString()
        Print path as series of servers (short representation).
        Returns:
        String representation of the path.
      • toString

        public java.lang.String toString()
        Print path as series of turns (short representation).
        Overrides:
        toString in class java.lang.Object
        Returns:
        String representation of the path.
      • toExtendedString

        public java.lang.String toExtendedString()
        Print path as series of turns (extended representation).
        Returns:
        String representation of the path.