Class MultiThreadTCSolver
java.lang.Object
solvers.queueingnet.treeAlgorithms.TreeTraverserMulti
solvers.queueingnet.treeAlgorithms.treeConvolution.MultiThreadTCSolver
- All Implemented Interfaces:
IThreadedTCSolver
Tree Convolution solver that uses multiple threads.
- Author:
- Ben Homer, 2014.
-
Field Summary
Fields inherited from class TreeTraverserMulti
taskExecutorFields inherited from interface IThreadedTCSolver
normalisationConstantTimer, queueLengthTimer, throughputTimer -
Constructor Summary
ConstructorsConstructorDescriptionMultiThreadTCSolver(QNModel qnm, ConvolutionLayer cl, TreePlanter tp, int numThreads) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionBigRational[][]Calculates per class and per station mean queue lengths using methods outlined in LamLien83 paper.Calculates per class throughputs using methods outlined in LamLien83 paper.computeG(Node node, PopulationVector pv) Computes G using postorder tree traversal.getComputeLeafNodeThread(Node node, PopulationVector pv) Computes results at leaf node by creating an appropriate thread to run the computation.getSubnetNodeThread(Node node, PopulationVector pv) Computes results at subnetwork node by creating an appropriate thread to run the computation.Methods inherited from class TreeTraverserMulti
traverse
-
Constructor Details
-
MultiThreadTCSolver
Constructor.- Parameters:
qnm- The queueing network model to solve.cl- The convolution layer to delegate to.tp- The tree planter.
-
-
Method Details
-
computeG
Computes G using postorder tree traversal.- Specified by:
computeGin interfaceIThreadedTCSolver- Parameters:
node- The current node to compute the normalisation constant G for.pv- The population vector to be used during the computation.- Returns:
- The normalisation constant G at the given node, calculated using the specified population vector.
-
calculateThroughputs
Calculates per class throughputs using methods outlined in LamLien83 paper.- Specified by:
calculateThroughputsin interfaceIThreadedTCSolver- Parameters:
p- The population vector to use during the calculation.- Returns:
- The per class throughputs as an array of BigRationals.
-
calculateMeanQueueLengths
Calculates per class and per station mean queue lengths using methods outlined in LamLien83 paper.- Specified by:
calculateMeanQueueLengthsin interfaceIThreadedTCSolver- Parameters:
p- The population vector to use during the calculation.- Returns:
- The per class per station mean queue lengths as a 2D array of BigRationals.
-
getComputeLeafNodeThread
Computes results at leaf node by creating an appropriate thread to run the computation.- Specified by:
getComputeLeafNodeThreadin classTreeTraverserMulti- Parameters:
node- The leaf node.pv- The population vector to use for the computation.- Returns:
- The thread which will run the computation.
-
getSubnetNodeThread
Computes results at subnetwork node by creating an appropriate thread to run the computation.- Specified by:
getSubnetNodeThreadin classTreeTraverserMulti- Parameters:
node- The subnetwork node.pv- The population vector to use for the computation.- Returns:
- The thread which will run the computation.
-