Package ons
Class PhysicalTopology
java.lang.Object
ons.PhysicalTopology
- Direct Known Subclasses:
EONPhysicalTopology,WDMPhysicalTopology
public abstract class PhysicalTopology
extends java.lang.Object
The physical topology of a network refers to he physical layout of devices on
a network, or to the way that the devices on a network are arranged and how
they communicate with each other.
-
Field Summary
Fields Modifier and Type Field Description protected Link[][]adjMatrixprotected doubleconfigurationTimeOXCprotected DatacenterGroup[]datacentersprotected intlinksprotected Link[]linkVectorprotected doublemensageProcessingTimeprotected intnodesprotected OXC[]nodeVectorprotected doubleolaExpenditureprotected doubleoxcAddDropDegreeExpenditureprotected doubleoxcNodeDegreeExpenditureprotected doubleoxcOperationExpenditureprotected doubleoxcSleepModeExpenditureprotected doubleoxcTransitionTimeprotected doublepropagationDelayTimeprotected intspanSizeprotected doubleswitchTimeprotected doubletrIdleExpenditureprotected doubletrOverloadExpenditure -
Constructor Summary
Constructors Constructor Description PhysicalTopology()PhysicalTopology(org.w3c.dom.Element xml)Creates a new PhysicalTopology object. -
Method Summary
Modifier and Type Method Description abstract voidaddRate(int rate, LightPath lightpath)abstract booleancanAddRate(int rate, LightPath lightpath)abstract booleancanCreatePhysicalLightpath(LightPath lp)booleancheckLinkPath(int[] links)Checks if a path made of links makes sense by checking its continuityabstract voidcreatePhysicalLightpath(LightPath lp)Link[][]getAdjMatrix()Retrives a given PhysicalTopology's adjancency matrix, which contains the links between source and destination nodes.intgetAllFreeGroomingInputPorts()Retrives the all free grooming input ports from all nodesabstract intgetBW(LightPath lp)abstract intgetBWAvailable(LightPath lp)protected DatacenterGroupgetDatacenterGroup(int index)Retrieves a especific Datacenters Group in this Topologyprotected DatacenterGroup[]getDatacentersGroup()Retrieves all Datacenters Groups in this TopologyLinkgetLink(int linkid)Retrieves a specific link in the PhysicalTopology object, based on its unique identifier.LinkgetLink(int src, int dst)Retrieves a specific link in the PhysicalTopology object, based on its source and destination nodes.OXCgetNode(int id)Retrieves a specific node in the PhysicalTopology object.intgetNumLinks()Retrieves the number of links in a given PhysicalTopology.intgetNumNodes()Retrieves the number of nodes in a given PhysicalTopology.intgetSpanSize()java.lang.StringgetTopologyName()Retrieves the topology name.WeightedGraphgetTransponderGraph()Returns the weighted graph with the representation of transponders [Tx/Rx] available in OXC.WeightedGraphgetWeightedGraph()Returns a weighted graph with vertices, edges and weights representing the physical network nodes, links and weights implemented by this class object.booleanhasLink(int node1, int node2)Says whether exists or not a link between two given nodes.voidprintXpressInputFile()abstract voidremovePhysicalLightpath(LightPath lp)abstract voidremoveRate(int rate, LightPath lightpath)java.lang.StringtoString()Prints all nodes and links between them in the PhysicalTopology object.
-
Field Details
-
nodes
protected int nodes -
links
protected int links -
nodeVector
-
linkVector
-
adjMatrix
-
datacenters
-
mensageProcessingTime
protected double mensageProcessingTime -
configurationTimeOXC
protected double configurationTimeOXC -
propagationDelayTime
protected double propagationDelayTime -
switchTime
protected double switchTime -
oxcTransitionTime
protected double oxcTransitionTime -
oxcSleepModeExpenditure
protected double oxcSleepModeExpenditure -
oxcOperationExpenditure
protected double oxcOperationExpenditure -
oxcNodeDegreeExpenditure
protected double oxcNodeDegreeExpenditure -
oxcAddDropDegreeExpenditure
protected double oxcAddDropDegreeExpenditure -
trOverloadExpenditure
protected double trOverloadExpenditure -
trIdleExpenditure
protected double trIdleExpenditure -
olaExpenditure
protected double olaExpenditure -
spanSize
protected int spanSize
-
-
Constructor Details
-
PhysicalTopology
public PhysicalTopology(org.w3c.dom.Element xml)Creates a new PhysicalTopology object. Takes the XML file containing all the information about the simulation environment and uses it to populate the PhysicalTopology object. The physical topology is basically composed of nodes connected by links, each supporting different wavelengths.- Parameters:
xml- file that contains the simulation environment information
-
PhysicalTopology
public PhysicalTopology()
-
-
Method Details
-
getTopologyName
public java.lang.String getTopologyName()Retrieves the topology name.- Returns:
- the string topology name
-
getNumNodes
public int getNumNodes()Retrieves the number of nodes in a given PhysicalTopology.- Returns:
- the value of the PhysicalTopology's nodes attribute
-
getSpanSize
public int getSpanSize() -
getNumLinks
public int getNumLinks()Retrieves the number of links in a given PhysicalTopology.- Returns:
- number of items in the PhysicalTopology's linkVector attribute
-
getNode
Retrieves a specific node in the PhysicalTopology object.- Parameters:
id- the node's unique identifier- Returns:
- specified node from the PhysicalTopology's nodeVector
-
getAllFreeGroomingInputPorts
public int getAllFreeGroomingInputPorts()Retrives the all free grooming input ports from all nodes- Returns:
- the number of grooming input ports from all nodes
-
getLink
Retrieves a specific link in the PhysicalTopology object, based on its unique identifier.- Parameters:
linkid- the link's unique identifier- Returns:
- specified link from the PhysicalTopology's linkVector
-
getLink
Retrieves a specific link in the PhysicalTopology object, based on its source and destination nodes.- Parameters:
src- the link's source nodedst- the link's destination node- Returns:
- the specified link from the PhysicalTopology's adjMatrix
-
getAdjMatrix
Retrives a given PhysicalTopology's adjancency matrix, which contains the links between source and destination nodes.- Returns:
- the PhysicalTopology's adjMatrix
-
hasLink
public boolean hasLink(int node1, int node2)Says whether exists or not a link between two given nodes.- Parameters:
node1- possible link's source nodenode2- possible link's destination node- Returns:
- true if the link exists in the PhysicalTopology's adjMatrix
-
checkLinkPath
public boolean checkLinkPath(int[] links)Checks if a path made of links makes sense by checking its continuity- Parameters:
links- to be checked- Returns:
- true if the link exists in the PhysicalTopology's adjMatrix
-
getWeightedGraph
Returns a weighted graph with vertices, edges and weights representing the physical network nodes, links and weights implemented by this class object.- Returns:
- an WeightedGraph class object
-
getTransponderGraph
Returns the weighted graph with the representation of transponders [Tx/Rx] available in OXC. Only node, without edges- Returns:
- the WeightedGraph
-
printXpressInputFile
public void printXpressInputFile() -
getDatacentersGroup
Retrieves all Datacenters Groups in this Topology- Returns:
- all DatacentersGroup objects
-
getDatacenterGroup
Retrieves a especific Datacenters Group in this Topology- Returns:
- the DatacentersGroup object
-
toString
public java.lang.String toString()Prints all nodes and links between them in the PhysicalTopology object.- Overrides:
toStringin classjava.lang.Object- Returns:
- string containing the PhysicalTopology's adjMatrix values
-
createPhysicalLightpath
-
removePhysicalLightpath
-
canCreatePhysicalLightpath
-
getBW
-
getBWAvailable
-
canAddRate
-
addRate
-
removeRate
-