Class Path
- java.lang.Object
-
- org.networkcalculus.dnc.network.server_graph.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 Summary
Fields Modifier and Type Field Description private java.util.LinkedList<Server>
path_servers
private java.util.LinkedList<Turn>
path_turns
-
Method Summary
Modifier and Type Method Description static Path
createEmptyPath()
boolean
equals(java.lang.Object obj)
MaxServiceCurve
getMaxScRate()
Returns the convolution of the maximum service curves of all servers on the given turn pathpath
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.private MaxServiceCurve
getMaxScRate(java.util.Collection<Server> servers)
MaxServiceCurve
getMaxServiceCurve()
Returns the convolution of the maximum service curves of all servers on the given lnik pathpath
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.private MaxServiceCurve
getMaxServiceCurve(java.util.Collection<Server> servers)
Server
getPrecedingServer(Server s)
Turn
getPrecedingTurn(Server s)
java.util.LinkedList<Server>
getServers()
ServiceCurve
getServiceCurve()
Just convolves the service curves on the path and returns the result.private ServiceCurve
getServiceCurve(java.util.Collection<Server> servers)
Server
getSink()
Server
getSource()
MaxServiceCurve
getStoredMaxSC()
private MaxServiceCurve
getStoredMaxSC(java.util.Collection<Server> servers)
MaxServiceCurve
getStoredMaxScRate()
private MaxServiceCurve
getStoredMaxScRate(java.util.Collection<Server> servers)
Path
getSubPath(Server from, Server to)
Server
getSucceedingServer(Server s)
Turn
getSucceedingTurn(Server s)
java.util.LinkedList<Turn>
getTurns()
int
hashCode()
boolean
isSource(Server s)
int
numServers()
int
numTurns()
java.lang.String
toExtendedString()
Print path as series of turns (extended representation).java.lang.String
toShortString()
Print path as series of servers (short representation).java.lang.String
toString()
Print path as series of turns (short representation).
-
-
-
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 pathpath
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 pathpath
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.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 classjava.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.
-
-