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[][]
adjMatrix
protected double
configurationTimeOXC
protected DatacenterGroup[]
datacenters
protected int
links
protected Link[]
linkVector
protected double
mensageProcessingTime
protected int
nodes
protected OXC[]
nodeVector
protected double
olaExpenditure
protected double
oxcAddDropDegreeExpenditure
protected double
oxcNodeDegreeExpenditure
protected double
oxcOperationExpenditure
protected double
oxcSleepModeExpenditure
protected double
oxcTransitionTime
protected double
propagationDelayTime
protected int
spanSize
protected double
switchTime
protected double
trIdleExpenditure
protected double
trOverloadExpenditure
-
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 void
addRate(int rate, LightPath lightpath)
abstract boolean
canAddRate(int rate, LightPath lightpath)
abstract boolean
canCreatePhysicalLightpath(LightPath lp)
boolean
checkLinkPath(int[] links)
Checks if a path made of links makes sense by checking its continuityabstract void
createPhysicalLightpath(LightPath lp)
Link[][]
getAdjMatrix()
Retrives a given PhysicalTopology's adjancency matrix, which contains the links between source and destination nodes.int
getAllFreeGroomingInputPorts()
Retrives the all free grooming input ports from all nodesabstract int
getBW(LightPath lp)
abstract int
getBWAvailable(LightPath lp)
protected DatacenterGroup
getDatacenterGroup(int index)
Retrieves a especific Datacenters Group in this Topologyprotected DatacenterGroup[]
getDatacentersGroup()
Retrieves all Datacenters Groups in this TopologyLink
getLink(int linkid)
Retrieves a specific link in the PhysicalTopology object, based on its unique identifier.Link
getLink(int src, int dst)
Retrieves a specific link in the PhysicalTopology object, based on its source and destination nodes.OXC
getNode(int id)
Retrieves a specific node in the PhysicalTopology object.int
getNumLinks()
Retrieves the number of links in a given PhysicalTopology.int
getNumNodes()
Retrieves the number of nodes in a given PhysicalTopology.int
getSpanSize()
java.lang.String
getTopologyName()
Retrieves the topology name.WeightedGraph
getTransponderGraph()
Returns the weighted graph with the representation of transponders [Tx/Rx] available in OXC.WeightedGraph
getWeightedGraph()
Returns a weighted graph with vertices, edges and weights representing the physical network nodes, links and weights implemented by this class object.boolean
hasLink(int node1, int node2)
Says whether exists or not a link between two given nodes.void
printXpressInputFile()
abstract void
removePhysicalLightpath(LightPath lp)
abstract void
removeRate(int rate, LightPath lightpath)
java.lang.String
toString()
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:
toString
in classjava.lang.Object
- Returns:
- string containing the PhysicalTopology's adjMatrix values
-
createPhysicalLightpath
-
removePhysicalLightpath
-
canCreatePhysicalLightpath
-
getBW
-
getBWAvailable
-
canAddRate
-
addRate
-
removeRate
-