Class MoMSolverDispatcher
java.lang.Object
solvers.control.MoMSolverDispatcher
This class implements the API to allow use by other applications. One can
define the queueing network model details, call the solvers transparently and,
afterwards, read the results.
- Author:
- Michail Makaronidis, 2010
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intnumber of classes or jobs in the systemstatic final intconstant for delay centerstatic final intconstant for Load Dependent service centerstatic final intconstant for Load Independent service centerprotected intNumber of threads that the MoMSolver should useprotected int[]Array containing population for each classprotected QNModelContains the queueing network modelprotected double[][]array containing the queue length of each service centerprotected intnumber of resourcesprotected double[]array containing the throughput of each service center -
Constructor Summary
ConstructorsConstructorDescriptionMoMSolverDispatcher(int classes, int stations, int[] population) Creates new MoMSolverDispatcher -
Method Summary
Modifier and TypeMethodDescriptiondouble[][]Returns the mean queue lengths as an MxR array of doubles.double[]Returns the mean throughputs as an array of R doubles.Returns the value of the normalising constant as a BigRational.Returns the value of the normalising constant as a string.booleaninput(int[] t, double[][] s, double[][] v, int nThreads) Initializes the solver with the system parameters.voidsolve()Solves the system through the MoM algorithm.
-
Field Details
-
classes
protected int classesnumber of classes or jobs in the system -
population
protected int[] populationArray containing population for each class -
qnm
Contains the queueing network model -
nThreads
protected int nThreadsNumber of threads that the MoMSolver should use -
LD
public static final int LDconstant for Load Dependent service center- See Also:
-
LI
public static final int LIconstant for Load Independent service center- See Also:
-
DELAY
public static final int DELAYconstant for delay center- See Also:
-
stations
protected int stationsnumber of resources -
throughput
protected double[] throughputarray containing the throughput of each service center -
queueLen
protected double[][] queueLenarray containing the queue length of each service center
-
-
Constructor Details
-
MoMSolverDispatcher
public MoMSolverDispatcher(int classes, int stations, int[] population) Creates new MoMSolverDispatcher- Parameters:
classes- number of classesstations- number of service centerspopulation- array of class populations
-
-
Method Details
-
input
public boolean input(int[] t, double[][] s, double[][] v, int nThreads) Initializes the solver with the system parameters. It must be called before trying to solve the model.- Parameters:
t- array of the types (LD or LI) of service centerss- matrix of service times of the service centersv- array of visits to the service centersnThreads- The number of threads the solver should use. If nThreads > 2 then the parallel algorithm is used.- Returns:
- True if the operation is completed with success
-
solve
public void solve() throws InternalErrorException, OperationNotSupportedException, InconsistentLinearSystemException, BTFMatrixErrorExceptionSolves the system through the MoM algorithm. input(...) must have been called first. -
getPrettyNormalisingConstant
Returns the value of the normalising constant as a string. May contain fractional part.- Returns:
- The string representing the normalising constant
-
getNormalisingConstant
Returns the value of the normalising constant as a BigRational.- Returns:
- The BigRational representing the normalising constant
-
getMeanQueueLengths
public double[][] getMeanQueueLengths()Returns the mean queue lengths as an MxR array of doubles.- Returns:
- The double[M][R] array.
-
getMeanThroughputs
public double[] getMeanThroughputs()Returns the mean throughputs as an array of R doubles.- Returns:
- The double[R] array.
-