public class FlexGridUtils
extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FlexGridUtils.ModulationFormat
Class to define modulation formats.
|
Modifier and Type | Method and Description |
---|---|
static List<Pair<Integer,Integer>> |
computeAvailableSpectrumVoids(TreeSet<Integer> slotOccupancy,
int totalAvailableSlotsPerFiber)
Computes the list of spectral voids (list of available contiguous slots)
from a slot availability vector of a path.
|
static int |
computeMaximumRequests(List<Pair<Integer,Integer>> availableSpectrumVoids,
int numSlots)
Computes the maximum number of requests (each one measured in number of slots) which
can be allocated in a set of spectrum voids.
|
static FlexGridUtils.ModulationFormat |
computeModulationFormat(double pathLengthInKm,
Set<FlexGridUtils.ModulationFormat> availableModulationFormats)
Returns the modulation format with the maximum spectral efficiency, whereas
the optical reach constraint is fulfilled, for the given path.
|
static FlexGridUtils.ModulationFormat |
computeModulationFormat(Map<Long,Double> fiberLengthInKmMap,
List<Long> seqFibers,
Set<FlexGridUtils.ModulationFormat> availableModulationFormats)
Returns the modulation format with the maximum spectral efficiency, whereas
the optical reach constraint is fulfilled, for the given path.
|
static Map<Long,FlexGridUtils.ModulationFormat> |
computeModulationFormatPerPath(CandidatePathList cpl,
Map<Long,Double> fiberLengthInKmMap,
Set<FlexGridUtils.ModulationFormat> availableModulationFormats)
Returns the modulation format with the maximum spectral efficiency, while
the optical reach constraint is fulfilled, for each path in a
CandidatePathList
object. |
static int |
computeNumberOfSlots(double bandwidthInGbps,
double slotGranularityInGHz,
double guardBandInGHz,
FlexGridUtils.ModulationFormat modulationFormat)
Computes the number of frequency slots required for a certain amount of
bandwidth (measured in Gbps), including guard-bands.
|
static TreeSet<Integer> |
computePathSlotOccupancy(List<Long> seqFibers,
Map<Long,TreeSet<Integer>> slotOccupancyMap,
int totalAvailableSlotsPerFiber)
Computes the slot availability vector of a path, represented by a sequence
of fibers, where each position indicates whether or not its corresponding
frequency slot is available along the path.
|
public static List<Pair<Integer,Integer>> computeAvailableSpectrumVoids(TreeSet<Integer> slotOccupancy, int totalAvailableSlotsPerFiber)
Computes the list of spectral voids (list of available contiguous slots) from a slot availability vector of a path.
slotOccupancy
- Set of slots that are already occupiedtotalAvailableSlotsPerFiber
- Number of slots per fiberpublic static int computeMaximumRequests(List<Pair<Integer,Integer>> availableSpectrumVoids, int numSlots)
availableSpectrumVoids
- List of available spectrum voids (first item of each pair is the initial slot identifier, whereas the second one is the number of consecutive slots)numSlots
- Number of required slots for a reference connectionpublic static FlexGridUtils.ModulationFormat computeModulationFormat(double pathLengthInKm, Set<FlexGridUtils.ModulationFormat> availableModulationFormats)
pathLengthInKm
- Path length (in kilometers)availableModulationFormats
- Set of candidate modulation formatspublic static FlexGridUtils.ModulationFormat computeModulationFormat(Map<Long,Double> fiberLengthInKmMap, List<Long> seqFibers, Set<FlexGridUtils.ModulationFormat> availableModulationFormats)
fiberLengthInKmMap
- Map indicating for each link its length (in kilometers)seqFibers
- (Loop-free) Sequence of traversed fibers (unchecked for conitinuity or cycles)availableModulationFormats
- Set of candidate modulation formatspublic static Map<Long,FlexGridUtils.ModulationFormat> computeModulationFormatPerPath(CandidatePathList cpl, Map<Long,Double> fiberLengthInKmMap, Set<FlexGridUtils.ModulationFormat> availableModulationFormats)
CandidatePathList
object.cpl
- Candidate path listfiberLengthInKmMap
- Map indicating for each link its length (in kilometers)availableModulationFormats
- Set of candidate modulation formatspublic static int computeNumberOfSlots(double bandwidthInGbps, double slotGranularityInGHz, double guardBandInGHz, FlexGridUtils.ModulationFormat modulationFormat)
bandwidthInGbps
- Requested bandwidth (in Gbps)slotGranularityInGHz
- Slot granularity (in GHz)guardBandInGHz
- Guard-band size (in GHz)modulationFormat
- Modulation formatpublic static TreeSet<Integer> computePathSlotOccupancy(List<Long> seqFibers, Map<Long,TreeSet<Integer>> slotOccupancyMap, int totalAvailableSlotsPerFiber)
Computes the slot availability vector of a path, represented by a sequence of fibers, where each position indicates whether or not its corresponding frequency slot is available along the path.
Important: Loop-free paths should be employed, but it is not checked by the method.
slotOccupancyMap
- Indicates per each fiber its slot occupancy, where already-occupied slots appearseqFibers
- (Loop-free) Sequence of traversed fibers (unchecked for conitinuity or cycles)totalAvailableSlotsPerFiber
- Number of slots per fiber