Package ons
Class WDMPhysicalTopology
java.lang.Object
ons.PhysicalTopology
ons.WDMPhysicalTopology
public class WDMPhysicalTopology extends PhysicalTopology
-
Field Summary
Fields Modifier and Type Field Description protected int
wavelengths
Fields inherited from class ons.PhysicalTopology
adjMatrix, configurationTimeOXC, datacenters, links, linkVector, mensageProcessingTime, nodes, nodeVector, olaExpenditure, oxcAddDropDegreeExpenditure, oxcNodeDegreeExpenditure, oxcOperationExpenditure, oxcSleepModeExpenditure, oxcTransitionTime, propagationDelayTime, spanSize, switchTime, trIdleExpenditure, trOverloadExpenditure
-
Constructor Summary
Constructors Constructor Description WDMPhysicalTopology(org.w3c.dom.Element xml)
-
Method Summary
Modifier and Type Method Description void
addRate(int rate, LightPath lightpath)
boolean
canAddRate(int rate, LightPath lightpath)
boolean
canCreatePhysicalLightpath(LightPath lightpath)
void
createPhysicalLightpath(LightPath lightpath)
int
getBW(LightPath lightpath)
int
getBWAvailable(LightPath lightpath)
int
getNumWavelengths()
Retrieves the number of wavelengths in a given PhysicalTopology.WeightedGraph
getWeightedGraph(int wvl, int bw)
Returns a weighted graph with vertices representing the physical network nodes, and the edges representing the physical links.void
removePhysicalLightpath(LightPath lightpath)
void
removeRate(int rate, LightPath lightpath)
int
usedConverters(WDMLightPath lightpath)
Retrieves the number of wavelength converters a given LightPath object uses.Methods inherited from class ons.PhysicalTopology
checkLinkPath, getAdjMatrix, getAllFreeGroomingInputPorts, getDatacenterGroup, getDatacentersGroup, getLink, getLink, getNode, getNumLinks, getNumNodes, getSpanSize, getTopologyName, getTransponderGraph, getWeightedGraph, hasLink, printXpressInputFile, toString
-
Field Details
-
wavelengths
protected int wavelengths
-
-
Constructor Details
-
WDMPhysicalTopology
public WDMPhysicalTopology(org.w3c.dom.Element xml)
-
-
Method Details
-
getNumWavelengths
public int getNumWavelengths()Retrieves the number of wavelengths in a given PhysicalTopology.- Returns:
- the value of the PhysicalTopology's wavelengths attribute
-
createPhysicalLightpath
- Specified by:
createPhysicalLightpath
in classPhysicalTopology
-
removePhysicalLightpath
- Specified by:
removePhysicalLightpath
in classPhysicalTopology
-
canCreatePhysicalLightpath
- Specified by:
canCreatePhysicalLightpath
in classPhysicalTopology
-
getBWAvailable
- Specified by:
getBWAvailable
in classPhysicalTopology
-
addRate
- Specified by:
addRate
in classPhysicalTopology
-
getBW
- Specified by:
getBW
in classPhysicalTopology
-
usedConverters
Retrieves the number of wavelength converters a given LightPath object uses.- Parameters:
lightpath
- the LightPath object- Returns:
- the number of converters the lightpath uses
-
getWeightedGraph
Returns a weighted graph with vertices representing the physical network nodes, and the edges representing the physical links. The weight of each edge receives the same value of the original link weight if the wavelength wvl in that link has at least bw Mbps of bandwidth available. Otherwise it has no edges.- Parameters:
wvl
- the wavelength idbw
- the amount of bandwidth to be established- Returns:
- an WeightedGraph class object
-
canAddRate
- Specified by:
canAddRate
in classPhysicalTopology
-
removeRate
- Specified by:
removeRate
in classPhysicalTopology
-