public class WDMUtils
extends Object
Constructor and Description |
---|
WDMUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
checkConsistency(NetPlan physicalLayer)
Performs extra checks to those applicable to every network design, especially
focused on WDM networks.
|
static void |
checkLightpath(int[][] fiberTable,
int[] seqFibers,
boolean checkCycles)
Checks for validity of a given lightpath (fiber continuity and no loops).
|
static int[] |
computeRegeneratorPositions(int[][] fiberTable,
int[] seqFibers,
double[] l_f,
double maxRegeneratorDistanceInKm)
Returns the list of nodes within the lightpath route containing a regenerator,
only following a distance criterium, assuming no wavelength conversion is required.
|
static int[] |
getRegeneratorOccupancy(NetPlan physicalLayer)
Returns the number of regenerators installed per node.
|
static List<Set<Integer>> |
getWavelengthOccupancy(NetPlan physicalLayer)
Returns the set of used wavelengths per fiber.
|
static void |
WA_firstFit(int[][] fiberTable,
List<int[]> lightpaths,
int[] w_f,
List<Set<Integer>> wavelengthOccupancy,
List<int[]> seqWavelengths)
Wavelength assignment algorithm based on a first-fit fashion.
|
static void |
WA_RPP_firstFit(int[][] fiberTable,
List<int[]> lightpaths,
int[] w_f,
List<Set<Integer>> wavelengthOccupancy,
List<int[]> seqWavelengths,
double[] l_f,
int[] regeneratorOccupancy,
List<int[]> nodesWithRegenerator,
double maxRegeneratorDistanceInKm)
Wavelength assignment algorithm based on a first-fit fashion assuming
full wavelength conversion and regeneration.
|
public static void checkConsistency(NetPlan physicalLayer)
Performs extra checks to those applicable to every network design, especially focused on WDM networks.
physicalLayer
- A NetPlan
representing a physical topologypublic static void checkLightpath(int[][] fiberTable, int[] seqFibers, boolean checkCycles)
Checks for validity of a given lightpath (fiber continuity and no loops).
fiberTable
- Set of installed fibers (first column: origin node, second column: destination node)seqFibers
- Sequence of fibers traversedcheckCycles
- true
if lightpath cycles are forbidden. Otherwise, false
public static int[] computeRegeneratorPositions(int[][] fiberTable, int[] seqFibers, double[] l_f, double maxRegeneratorDistanceInKm)
fiberTable
- Set of installed fibers (first column: origin node, second column: destination node)seqFibers
- Sequence of fibers traversed by the lightpathl_f
- Physical length in km per fibermaxRegeneratorDistanceInKm
- Maximum regeneration distancepublic static int[] getRegeneratorOccupancy(NetPlan physicalLayer)
Returns the number of regenerators installed per node.
physicalLayer
- A NetPlan
representing a physical topologypublic static List<Set<Integer>> getWavelengthOccupancy(NetPlan physicalLayer)
Returns the set of used wavelengths per fiber.
physicalLayer
- A NetPlan
representing a physical topologypublic static void WA_firstFit(int[][] fiberTable, List<int[]> lightpaths, int[] w_f, List<Set<Integer>> wavelengthOccupancy, List<int[]> seqWavelengths)
Wavelength assignment algorithm based on a first-fit fashion. Wavelengths are indexed from 0 to Wf-1, where Wf is the number of wavelengths supported by fiber f. Then, the wavelength assigned to each lightpath (along the whole physical route) is the minimum index among the common free-wavelength set for all traversed fibers.
In case a lightpath cannot be allocated, the corresponding sequence of
wavelengths (seqWavelengths
parameter) will be an empty array.
fiberTable
- Set of installed fibers (first column: origin node, second column: destination node)lightpaths
- Sequence of fibers traversed by each lightpathw_f
- Number of wavelengths per fiberwavelengthOccupancy
- Set of used wavelengths per fiberseqWavelengths
- Sequence of wavelengths traversed by each lightpathpublic static void WA_RPP_firstFit(int[][] fiberTable, List<int[]> lightpaths, int[] w_f, List<Set<Integer>> wavelengthOccupancy, List<int[]> seqWavelengths, double[] l_f, int[] regeneratorOccupancy, List<int[]> nodesWithRegenerator, double maxRegeneratorDistanceInKm)
Wavelength assignment algorithm based on a first-fit fashion assuming full wavelength conversion and regeneration. Each node selects the first free wavelength for its output fiber, and next nodes in the lightpath try to maintain it. If not possible, or regeneration is needed, then include a regenerator (can act also as a full wavelength converter) and search for the first free wavelength, and so on.
In case a lightpath cannot be allocated, the corresponding sequence of
wavelengths (seqWavelengths
parameter) will be an empty array.
fiberTable
- Set of installed fibers (first column: origin node, second column: destination node)lightpaths
- Sequence of fibers traversed by each lightpathw_f
- Number of wavelengths per fiberwavelengthOccupancy
- Set of used wavelengths per fiberseqWavelengths
- Sequence of wavelengths traversed by each lightpathl_f
- Physical length in km per fiberregeneratorOccupancy
- Number of regenerators installed per nodenodesWithRegenerator
- Set of nodes including a regenerator prior to their output fibersmaxRegeneratorDistanceInKm
- Maximum regeneration distance