Class QNSolver
java.lang.Object
solvers.queueingnet.QNSolver
- All Implemented Interfaces:
QNSolverInterface
- Direct Known Subclasses:
CoMoMSolver, MoMSolver, MonteCarloLogisticSolver, MonteCarloSolver, RecursiveSolver, RGFSolver, TreeConvolutionSolver, TreeMVASolver
Class which defines several methods every QNSolver object must support. It
provides generic implementation of common operations, such as initialisation,
evaluation and returning the results.
- Author:
- Michail Makaronidis, 2010
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BigRationalThe normalising constant is stored here after it has been computed.protected StringContains a human-readable string representation of the QNSolver's memory usage.protected QNModelThe QNModel object that we are working on.The Timer object responsible for keeping the total time needed by this QNSolver to evaluate the network. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidComputes the normalising constant for the specified QNModel.voidComputes and stores the performance measures (mean throughputs and mean queue lengths for the current model.Returns a string representing the normalising constant.voidPrints the highest actual memory usage during the network's evaluation.voidPrints the time needed for the solver object to evaluate the network.voidPrints a short welcome message that says which solver is used.
-
Field Details
-
totalTimer
The Timer object responsible for keeping the total time needed by this QNSolver to evaluate the network. -
qnm
The QNModel object that we are working on. -
G
The normalising constant is stored here after it has been computed. -
memUsage
Contains a human-readable string representation of the QNSolver's memory usage.
-
-
Constructor Details
-
QNSolver
Creates and initialises a QNSolver object.- Parameters:
qnm- The QNModel object that we are working on
-
-
Method Details
-
computeNormalisingConstant
public void computeNormalisingConstant() throws InternalErrorException, OperationNotSupportedException, InconsistentLinearSystemException, BTFMatrixErrorExceptionComputes the normalising constant for the specified QNModel.- Specified by:
computeNormalisingConstantin interfaceQNSolverInterface- Throws:
InternalErrorException- * @throws InternalErrorException An exception is thrown if any internal error is encountered during computations.BTFMatrixErrorExceptionInconsistentLinearSystemExceptionOperationNotSupportedException
-
getNormalisingConstant
Returns a string representing the normalising constant.- Specified by:
getNormalisingConstantin interfaceQNSolverInterface- Returns:
- String representing the normalising constant
-
printWelcome
public void printWelcome()Prints a short welcome message that says which solver is used.- Specified by:
printWelcomein interfaceQNSolverInterface
-
computePerformanceMeasures
Computes and stores the performance measures (mean throughputs and mean queue lengths for the current model.- Specified by:
computePerformanceMeasuresin interfaceQNSolverInterface- Throws:
InternalErrorException- Thrown when any computation fails
-
printTimeStatistics
public void printTimeStatistics()Prints the time needed for the solver object to evaluate the network.- Specified by:
printTimeStatisticsin interfaceQNSolverInterface
-
printMemUsage
public void printMemUsage()Prints the highest actual memory usage during the network's evaluation.- Specified by:
printMemUsagein interfaceQNSolverInterface
-