Class MVAPopulationUtil

java.lang.Object
solvers.utilities.MVAPopulationUtil

public class MVAPopulationUtil extends Object
Utilities for the population vectors used by the MVA algorithms of JMVA.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int[][]
    generatePopulations(int[] nDist)
    Generates all populations needed for MVA to compute indices for the required population array
    static Map<Integer, double[][]>
    getNewEmptyQueueMapNonPriority(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 stations
    static void
    main(String[] args)
     
    static int
    popHashCode(int[] pop, int max)
    Computes a hash code for a population array
    static int
    pow(int a, int b)
    Computes an integer raised to a power of another integer

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static Map<Integer, double[][]> getNewEmptyQueueMapNonPriority(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 stations
    • popHashCode

      public static int popHashCode(int[] pop, int max)
      Computes a hash code for a population array
      Parameters:
      pop - - population array
      max - - 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

      public static void main(String[] args)