Class SolverMultiClosedMonteCarlo
java.lang.Object
solvers.SolverMulti
solvers.multiSolverAlgorithms.SolverMultiClosedMonteCarlo
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected intprotected int[]protected QNModelContains the queueing network modelprotected Integerprotected doubleFields inherited from class SolverMulti
classes, CLOSED_CLASS, clsNumJobs, clsRespTime, clsThroughput, DELAY, HOL, LD, LI, name, OPEN_CLASS, priorities, PRS, pw, queueLen, residenceTime, scQueueLen, scResidTime, scThroughput, scUtilization, servers, servTime, stations, sysNumJobs, sysResponseTime, sysThroughput, throughput, type, utilization, visits -
Constructor Summary
ConstructorsConstructorDescriptionSolverMultiClosedMonteCarlo(int classes, int stations, int[] population) Creates new SolverMultiClosedMonteCarlo -
Method Summary
Modifier and TypeMethodDescriptionbooleanA system is said to have sufficient capacity to process a given loadlambdaif no service center is saturated as a result of the combined loads of all the classes.booleaninput(int[] t, double[][][] s, double[][] v) Initializes the solver with the system parameters.voidsetMaxSamples(int maxSamples) voidsetTolerance(double tolerance) voidsolve()Solves the system through the MonteCarlo algorithm.static IntegervalidateMaxSamples(String maxSamples) Methods inherited from class SolverMulti
getAggrQueueLen, getAggrQueueLen, getAggrResTime, getAggrResTime, getAggrThroughput, getAggrThroughput, getAggrUtilization, getAggrUtilization, getClsResTime, getClsResTime, getClsThroughput, getClsThroughput, getQueueLen, getQueueLen, getResTime, getResTime, getThroughput, getThroughput, getTotResTime, getTotThroughput, getUtilization, getUtilization, getVisits, input, input, printIndices, setServTime, toString
-
Field Details
-
DEFAULT_MAX_SAMPLES
public static final int DEFAULT_MAX_SAMPLES- See Also:
-
population
protected int[] population -
scale
-
maxSamples
protected int maxSamples -
tolerance
protected double tolerance -
qnm
Contains the queueing network model
-
-
Constructor Details
-
SolverMultiClosedMonteCarlo
public SolverMultiClosedMonteCarlo(int classes, int stations, int[] population) Creates new SolverMultiClosedMonteCarlo- 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) 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 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:
solvein classSolverMulti
-
setMaxSamples
public void setMaxSamples(int maxSamples) -
setTolerance
public void setTolerance(double tolerance) -
validateMaxSamples
-
hasSufficientProcessingCapacity
public boolean hasSufficientProcessingCapacity()Description copied from class:SolverMultiA system is said to have sufficient capacity to process a given loadlambdaif 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:
hasSufficientProcessingCapacityin classSolverMulti- Returns:
- true if sufficient capacity exists for the given workload, false otherwise
-