Class Basis

java.lang.Object
solvers.basis.Basis
Direct Known Subclasses:
CoMoMBasis

public abstract class Basis extends Object
A class to encapsulate the basis of CoMoM (or MoM). Storage and access to the normalising constants is provided
Author:
Jack Bradshaw
  • Field Details

    • qnm

      protected QNModel qnm
      The Queueing Network Model under study
    • order

      Data Structure to hold the ordering of PopualtionChangeVectors
    • R

      protected int R
      Variables to store qnm fields for easy access
    • M

      protected int M
    • basis

      protected BigRational[] basis
      The vectors in which to store the basis values
    • previous_basis

      protected BigRational[] previous_basis
    • current_class

      protected int current_class
      The current class being considered.
    • current_class_population

      protected int current_class_population
      The population of the current class being considered.
    • uncomputables

      protected Set<Integer> uncomputables
      Not really sure what this is for yet, but MoM uses it...
    • size

      protected int size
      Variable to store the size of the basis, due to frequent use
  • Constructor Details

    • Basis

      public Basis(QNModel qnm)
      Constructor
      Parameters:
      qnm - The Queueing Network Model under study
  • Method Details

    • initialiseBasis

      public abstract void initialiseBasis() throws InternalErrorException
      Initialises the basis for population (0,...0)
      Throws:
      InternalErrorException
    • initialiseForClass

      public void initialiseForClass(int current_class) throws InternalErrorException
      Initialises the basis for recursion on the current class
      Parameters:
      current_class - The class to initialise for.
      Throws:
      InternalErrorException
    • setComparator

      protected void setComparator(Comparator<EnhancedVector> comparator)
      A subclass can choose a vector comparator this method sets the comparator and uses it to sort the ordering
      Parameters:
      comparator -
    • sort

      protected final void sort()
      Sorts the PopulationChangeVectors according to the 'vector_comparator'
    • setSize

      protected abstract void setSize()
      Calculates the size of the basis to be store in variable size
    • getSize

      public int getSize()
      Returns the size.
      Returns:
      The size of the basis
    • computePerformanceMeasures

      public abstract void computePerformanceMeasures() throws InternalErrorException
      Computes Mean Throughput and Mean Queue Length performance indices and stores them in the queueing network model object, qnm
      Throws:
      InternalErrorException
    • getCurrentClass

      public int getCurrentClass()
      Returns the current class.
      Returns:
      The current class being considered
    • getCurrentClassPopulation

      public int getCurrentClassPopulation()
      Returns the current class population.
      Returns:
      The population in the current class being considered
    • setCurrentClassPopulation

      public void setCurrentClassPopulation(int population)
      Sets the population of the current class being considered
      Parameters:
      population - the population of the current class
    • getNormalisingConstant

      public abstract BigRational getNormalisingConstant() throws InternalErrorException
      Returns the Normalising Constant for the current computed population
      Throws:
      InternalErrorException
    • reset_uncomputables

      public void reset_uncomputables()
    • computatble

      public void computatble(int i)
    • getUncomputables

      public Set<Integer> getUncomputables()
    • getOldValue

      public BigRational getOldValue(int index)
    • getNewValue

      public BigRational getNewValue(int index)
    • setValue

      public void setValue(BigRational value, int index)
    • startBasisComputation

      public void startBasisComputation()