Class Basis
java.lang.Object
solvers.basis.Basis
- Direct Known Subclasses:
CoMoMBasis
A class to encapsulate the basis of CoMoM (or MoM).
Storage and access to the normalising constants is provided
- Author:
- Jack Bradshaw
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BigRational[]The vectors in which to store the basis valuesprotected intThe current class being considered.protected intThe population of the current class being considered.protected intprotected ArrayList<PopulationChangeVector> Data Structure to hold the ordering of PopualtionChangeVectorsprotected BigRational[]protected QNModelThe Queueing Network Model under studyprotected intVariables to store qnm fields for easy accessprotected intVariable to store the size of the basis, due to frequent useNot really sure what this is for yet, but MoM uses it... -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcomputatble(int i) abstract voidComputes Mean Throughput and Mean Queue Length performance indices and stores them in the queueing network model object, qnmintReturns the current class.intReturns the current class population.getNewValue(int index) abstract BigRationalReturns the Normalising Constant for the current computed populationgetOldValue(int index) intgetSize()Returns the size.abstract voidInitialises the basis for population (0,...0)voidinitialiseForClass(int current_class) Initialises the basis for recursion on the current classvoidprotected voidsetComparator(Comparator<EnhancedVector> comparator) A subclass can choose a vector comparator this method sets the comparator and uses it to sort the orderingvoidsetCurrentClassPopulation(int population) Sets the population of the current class being consideredprotected abstract voidsetSize()Calculates the size of the basis to be store in variable sizevoidsetValue(BigRational value, int index) protected final voidsort()Sorts the PopulationChangeVectors according to the 'vector_comparator'void
-
Field Details
-
qnm
The Queueing Network Model under study -
order
Data Structure to hold the ordering of PopualtionChangeVectors -
R
protected int RVariables to store qnm fields for easy access -
M
protected int M -
basis
The vectors in which to store the basis values -
previous_basis
-
current_class
protected int current_classThe current class being considered. -
current_class_population
protected int current_class_populationThe population of the current class being considered. -
uncomputables
-
size
protected int sizeVariable to store the size of the basis, due to frequent use
-
-
Constructor Details
-
Basis
-
-
Method Details
-
initialiseBasis
Initialises the basis for population (0,...0)- Throws:
InternalErrorException
-
initialiseForClass
Initialises the basis for recursion on the current class- Parameters:
current_class- The class to initialise for.- Throws:
InternalErrorException
-
setComparator
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
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
Returns the Normalising Constant for the current computed population- Throws:
InternalErrorException
-
reset_uncomputables
public void reset_uncomputables() -
computatble
public void computatble(int i) -
getUncomputables
-
getOldValue
-
getNewValue
-
setValue
-
startBasisComputation
public void startBasisComputation()
-