Class SolverMultiClosedMonteCarlo

java.lang.Object
solvers.SolverMulti
solvers.multiSolverAlgorithms.SolverMultiClosedMonteCarlo

public class SolverMultiClosedMonteCarlo extends SolverMulti
Solves a multiclass closed model with the Monte Carlo algorithm, an exact technique that estimates the normalizing constants of large models by sampling, as described in the JMVA chapter of the JMT user manual.
Author:
ellasu
  • Field Details

    • DEFAULT_MAX_SAMPLES

      public static final int DEFAULT_MAX_SAMPLES
      See Also:
    • population

      protected int[] population
    • scale

      protected Integer scale
    • maxSamples

      protected int maxSamples
    • tolerance

      protected double tolerance
    • qnm

      protected QNModel qnm
      Contains the queueing network model
  • Constructor Details

    • SolverMultiClosedMonteCarlo

      public SolverMultiClosedMonteCarlo(int classes, int stations, int[] population)
      Creates new SolverMultiClosedMonteCarlo
      Parameters:
      classes - number of classes
      stations - number of service centers
      population - array of class populations
  • Method Details

    • input

      public boolean input(int[] t, double[][][] s, double[][] v)
      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 centers
      s - matrix of service times of the service centers
      v - array of visits to the service centers
      Returns:
      True if the operation is completed with success
    • solve

      public void solve()
      Solves the system through the MonteCarlo algorithm. input(...) must have been called first.
      Specified by:
      solve in class SolverMulti
    • setMaxSamples

      public void setMaxSamples(int maxSamples)
    • setTolerance

      public void setTolerance(double tolerance)
    • validateMaxSamples

      public static Integer validateMaxSamples(String maxSamples)
    • hasSufficientProcessingCapacity

      public boolean hasSufficientProcessingCapacity()
      Description copied from class: SolverMulti
      A system is said to have sufficient capacity to process a given load lambda if no service center is saturated as a result of the combined loads of all the classes.
      Must be implemented to create a multi class model solver.
      WARNING: This method should be called before solving the system.
      Specified by:
      hasSufficientProcessingCapacity in class SolverMulti
      Returns:
      true if sufficient capacity exists for the given workload, false otherwise