Class SingleThreadTCSolver

java.lang.Object
solvers.queueingnet.treeAlgorithms.TreeTraverser
solvers.queueingnet.treeAlgorithms.treeConvolution.SingleThreadTCSolver
All Implemented Interfaces:
IThreadedTCSolver

public class SingleThreadTCSolver extends TreeTraverser implements IThreadedTCSolver
Tree Convolution solver that uses a single thread.
Author:
Ben Homer, 2014.
  • Constructor Details

    • SingleThreadTCSolver

      public SingleThreadTCSolver(QNModel qnm, ConvolutionLayer cl, TreePlanter tp)
      Constructor.
      Parameters:
      qnm - The queueing network model to solve.
      cl - The convolution layer to delegate to.
      tp - The tree planter.
  • Method Details

    • computeG

      public BigRational computeG(Node node, PopulationVector pv)
      Computes G using postorder tree traversal.
      Specified by:
      computeG in interface IThreadedTCSolver
      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.
    • initLeafNode

      public void initLeafNode(Node node, PopulationVector pv)
      Computes results at leaf node by delegating to the convolution layer.
      Specified by:
      initLeafNode in class TreeTraverser
      Parameters:
      node - The leaf node.
      pv - The population vector to use for the computation.
    • computeSubnetNode

      public void computeSubnetNode(Node node, PopulationVector pv)
      Computes results at subnetwork node by delegating to the convolution layer.
      Specified by:
      computeSubnetNode in class TreeTraverser
      Parameters:
      node - The subnetwork node.
      pv - The population vector to use for the computation.
    • calculateThroughputs

      public BigRational[] calculateThroughputs(PopulationVector p)
      Calculates per class throughputs using methods outlined in LamLien83 paper.
      Specified by:
      calculateThroughputs in interface IThreadedTCSolver
      Parameters:
      p - The full population vector.
      Returns:
      The per class throughputs as an array of BigRationals.
    • calculateMeanQueueLengths

      public BigRational[][] calculateMeanQueueLengths(PopulationVector p)
      Calculates per class and per station mean queue lengths using methods outlined in LamLien83 paper.
      Specified by:
      calculateMeanQueueLengths in interface IThreadedTCSolver
      Parameters:
      p - The full population vector.
      Returns:
      The per class per station mean queue lengths as a 2D array of BigRationals.