Class AMVA

Direct Known Subclasses:
AQL, BardSchweitzer, Chow, Linearizer

public abstract class AMVA extends SolverMulti
This class implements the abstract superclass for approximate MVA algorithms for solving multi-closed models
Author:
Abhimanyu Chugh
  • Field Details

    • DEFAULT_TOLERANCE

      public static final double DEFAULT_TOLERANCE
    • tolerance

      protected double tolerance
    • MAX_ITERATIONS

      protected int MAX_ITERATIONS
    • clsPopulation

      protected int[] clsPopulation
    • iterations

      protected int iterations
  • Constructor Details

    • AMVA

      public AMVA(int classes, int stations, int[] classPopulation)
  • Method Details

    • validateTolerance

      public static Double validateTolerance(String tolerance)
      check whether the given tolerance is valid or not
      Parameters:
      tolerance -
      Returns:
      a Double if valid, otherwise null
    • setTolerance

      public void setTolerance(double tolerance)
    • setMaxIterations

      public void setMaxIterations(int maxIterations)
    • getIterations

      public int getIterations()
    • getTotNumJobs

      public double getTotNumJobs()
      Returns the number of jobs in the system
      Returns:
      the total number of jobs
    • solve

      public void solve()
      Description copied from class: SolverMulti
      Must be implemented to create a multi class model solver.
      Specified by:
      solve in class SolverMulti
    • solveLI

      public void solveLI()
    • getQueueLensWithOneLessCustomer

      protected abstract double[][] getQueueLensWithOneLessCustomer()
    • maxDiff

      protected double maxDiff(double[] scOldQueueLens, double[] scCurrentQueueLens)
      returns the max difference between the old queue lengths and the current queue lengths of each station
      Parameters:
      scOldQueueLens - the old queue lengths to compare with current queue lengths (scCurrentQueueLens)
      scCurrentQueueLens - the current queue lengths used for comparison
      Returns:
      the max difference
    • maxDiff

      protected double maxDiff(double[][] oldQueueLens, double[][] currentQueueLens)
      returns the max difference between the old queue lengths and the current queue lengths of each station and class
      Parameters:
      oldQueueLens - the old queue lengths to compare with current queue lengths (scCurrentQueueLens)
      currentQueueLens - the current queue lengths used for comparison
      Returns:
      the max difference
    • hasSufficientProcessingCapacity

      public boolean hasSufficientProcessingCapacity()
      Description copied from class: SolverMulti
      A system is said to have sufficient capacity to process a given load lambda if no service center is saturated as a result of the combined loads of all the classes.
      Must be implemented to create a multi class model solver.
      WARNING: This method should be called before solving the system.
      Specified by:
      hasSufficientProcessingCapacity in class SolverMulti
      Returns:
      true if sufficient capacity exists for the given workload, false otherwise