public class TrafficMatrixGenerationModels
extends Object
Set of methods implementing different traffic generation models based on traffic matrices. All of them are based on those detailed in [1].
Important: In Net2Plan
self-demands are not allowed, thus the diagonal of the traffic matrices must be always zero.
[1] R. S. Cahn, Wide area network design: concepts and tools for optimization, Morgan Kaufmann Publishers Inc., 1998
Constructor and Description |
---|
TrafficMatrixGenerationModels() |
Modifier and Type | Method and Description |
---|---|
static double |
activityFactor(double UTC,
int timezoneOffset,
double minValueFactor,
double maxValueFactor)
Returns the activity factor of a node, given the current UTC hour and its timezone (see [1]).
|
static double[][] |
bimodalUniformRandom(int N,
double percentageThreshold,
double minValueClass1,
double maxValueClass1,
double minValueClass2,
double maxValueClass2)
Generates a traffic matrix using a bimodal uniform random distribution, that is, a distribution in which a value is taken for a uniform random distribution with probability p, and from the other one with probability 1-p.
|
static double[][] |
normalizationPattern_incomingTraffic(double[][] trafficMatrix,
double[] incomingTraffic)
Normalizes the input traffic matrix with respect to a given incoming traffic vector.
|
static double[][] |
normalizationPattern_outgoingTraffic(double[][] trafficMatrix,
double[] outgoingTraffic)
Normalizes the input traffic matrix with respect to a given outgoing traffic vector.
|
static double[][] |
normalizationPattern_totalTraffic(double[][] trafficMatrix,
double totalTraffic)
Normalizes the input traffic matrix so that the sum of all entries is equal to a given value.
|
static double[][] |
normalizeToLinkLoad(double[][] trafficMatrix,
double linkCapacity,
double load)
Normalizes the load of a traffic matrix in an effort to assess the merits
of the algorithms for different traffic load conditions.
|
static double[][] |
populationDistanceModel(double[][] distanceMatrix,
int[] populationVector,
int[] levelVector,
double[][] levelMatrix,
double randomFactor,
double populationOffset,
double populationPower,
double distanceOffset,
double distancePower)
Generates a traffic matrix using the population-distance model detailed in [1].
|
static double[][] |
read2DMatrixFromFile(File f,
boolean checkSameColumns)
Reads a 2D matrix from a file.
|
static double[][] |
uniformRandom(int N,
double minValue,
double maxValue)
Generates a traffic matrix using a uniform random distribution.
|
public static double activityFactor(double UTC, int timezoneOffset, double minValueFactor, double maxValueFactor)
UTC
- Universal Time Coordinated hour in decimal format (e.g. 10:30h is represented as 10.5)timezoneOffset
- Timezone offset from UTC in range [-12, 12]minValueFactor
- Minimum value at low-traffic hour in range [0,1] (in ref. [1] is equal to 0.1)maxValueFactor
- Maximum value at peak hour in range [0,1] (in ref. [1] is equal to 1)J. Milbrandt, M. Menth, S. Kopf, "Adaptive Bandwidth Allocation: Impact of Traffic Demand Models for Wide Area Networks," University of Würzburg, Germany, Report No. 363, June 2005
public static double[][] bimodalUniformRandom(int N, double percentageThreshold, double minValueClass1, double maxValueClass1, double minValueClass2, double maxValueClass2)
N
- Number of nodespercentageThreshold
- Mixture coefficientminValueClass1
- Minimum traffic value for class 1maxValueClass1
- Maximum traffic value for class 1minValueClass2
- Minimum traffic value for class 2maxValueClass2
- Maximum traffic value for class 2public static double[][] uniformRandom(int N, double minValue, double maxValue)
N
- Number of nodesminValue
- Minimum traffic valuemaxValue
- Maximum traffic valuepublic static double[][] populationDistanceModel(double[][] distanceMatrix, int[] populationVector, int[] levelVector, double[][] levelMatrix, double randomFactor, double populationOffset, double populationPower, double distanceOffset, double distancePower)
distanceMatrix
- Distance matrix, where cell (i, j) represents the distance from node i to node jpopulationVector
- Vector with N elements in which each element is the population of the corresponding nodelevelVector
- Vector with N elements in which each element is the level (i.e. type) of the corresponding nodelevelMatrix
- Level matrixrandomFactor
- Random factorpopulationOffset
- Population offsetpopulationPower
- Population powerdistanceOffset
- Distance offsetdistancePower
- Distance powermore information, see [1]
public static double[][] normalizationPattern_outgoingTraffic(double[][] trafficMatrix, double[] outgoingTraffic)
trafficMatrix
- Input traffic matrixoutgoingTraffic
- Vector of outgoing traffic to each nodepublic static double[][] normalizationPattern_incomingTraffic(double[][] trafficMatrix, double[] incomingTraffic)
trafficMatrix
- Input traffic matrixincomingTraffic
- Vector of incoming traffic to each nodepublic static double[][] normalizationPattern_totalTraffic(double[][] trafficMatrix, double totalTraffic)
trafficMatrix
- Input traffic matrixtotalTraffic
- Total traffic expectedpublic static double[][] normalizeToLinkLoad(double[][] trafficMatrix, double linkCapacity, double load)
Normalizes the load of a traffic matrix in an effort to assess the merits
of the algorithms for different traffic load conditions. The value
load
represents the average amount of traffic between two nodes,
among all the entries, during the highest loaded time, measured in number of links.
Consequently, a value of load
=0.5 corresponds to the case
when the (maximum) average traffic between two nodes equals 50% of a single link capacity.
In constrast, a value of load
=10 captures cases in which the
(maximum) average traffic between two nodes fills on average 10 links.
trafficMatrix
- Input traffic matrixlinkCapacity
- Link capacity (in same units as trafficMatrix
)load
- Load factor (measured in number of links). The highest value of the resulting traffic matrix will be equal to load
*linkCapacity
public static double[][] read2DMatrixFromFile(File f, boolean checkSameColumns)
f
- Input filecheckSameColumns
- Checks whether the number of columns is the same for every row