Class MVAPopulationUtil
java.lang.Object
solvers.utilities.MVAPopulationUtil
Utilities for the population vectors used by the MVA algorithms of JMVA.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int[][]generatePopulations(int[] nDist) Generates all populations needed for MVA to compute indices for the required population arraygetNewEmptyQueueMapNonPriority(int[][] populations, int maxPop, int totPop, int[] type) Initialises a map of population to an array of queue lengths, Qk, for load independent stations and an array of proportion of times, pk(j|n), for load dependent stationsstatic voidstatic intpopHashCode(int[] pop, int max) Computes a hash code for a population arraystatic intpow(int a, int b) Computes an integer raised to a power of another integer
-
Constructor Details
-
MVAPopulationUtil
public MVAPopulationUtil()
-
-
Method Details
-
generatePopulations
public static int[][] generatePopulations(int[] nDist) Generates all populations needed for MVA to compute indices for the required population array- Parameters:
nDist- - final population array- Returns:
- an array of population arrays
-
getNewEmptyQueueMapNonPriority
-
popHashCode
public static int popHashCode(int[] pop, int max) Computes a hash code for a population array- Parameters:
pop- - population arraymax- - maximum population in the final population array- Returns:
- an integer hash code of pop
-
pow
public static int pow(int a, int b) Computes an integer raised to a power of another integer- Parameters:
a-b-- Returns:
- a ^ b
-
main
-