ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.msk.cv
Class CVCallCenterStat

java.lang.Object
  extended by umontreal.iro.lecuyer.contactcenters.msk.cv.CVCallCenterStat
All Implemented Interfaces:
CallCenterStatProbes

public class CVCallCenterStat
extends Object
implements CallCenterStatProbes

Represents call center statistics on which control variables are applied. An instance of this class is constructed from a CallCenterStatProbes object, and defines statistical probes for controlled estimators. When applyControlVariables(umontreal.iro.lecuyer.contactcenters.app.PerformanceMeasureType, umontreal.iro.lecuyer.stat.matrix.MatrixOfTallies, umontreal.iro.lecuyer.contactcenters.msk.cv.CVBetaFunction) is called, observations are extracted from the probes in the inner CallCenterStatProbes object, and controlled observations are added to the encapsulated probes. This way, control variables are applied after the simulation is finished and do not require modifying the simulator.


Constructor Summary
CVCallCenterStat(SimLogic sim, CallCenterStatProbes inStat, boolean fmm, ControlVariable... cvs)
          Constructs a new CV call center statistical object using the simulation logic sim, taking statistics in the stat object, and applying the control variables cvs.
 
Method Summary
 void applyControlVariables()
          Equivalent to applyControlVariables (null).
 void applyControlVariables(CVBetaFunction cvBeta)
          Applies the control variables for the supported estimators.
 void applyControlVariables(Map<PerformanceMeasureType,double[][][]> betas)
           
 DoubleMatrix2D getAverage(PerformanceMeasureType pm)
           
 DoubleMatrix2D[][] getBetaMatrixFmm(PerformanceMeasureType pm)
          Returns a 2D array of matrices representing the β constants for the control variables applied to the components of functions of multiple means represented by the type of performance measure pm.
 double[][][] getBetas(PerformanceMeasureType pm)
          Returns the $ \boldbeta$ arrays for performance measure of type pm.
 DoubleMatrix2D[] getConfidenceInterval(PerformanceMeasureType pm, double level)
           
 ControlVariable[] getControlVariables()
           
 Map<PerformanceMeasureType,MatrixOfStatProbes<?>> getMatricesOfStatProbes()
          Returns a map containing the matrix of statistical probes for each type of performance measure.
 MatrixOfFunctionOfMultipleMeansTallies<?> getMatrixOfFunctionOfMultipleMeansTallies(PerformanceMeasureType pm)
          Returns a matrix of function of multiple means tallies corresponding to the given type pm of performance measure.
 MatrixOfStatProbes<?> getMatrixOfStatProbes(PerformanceMeasureType pm)
          Returns a matrix of statistical probes corresponding to the given type pm of performance measure.
 MatrixOfTallies<?> getMatrixOfTallies(PerformanceMeasureType pm)
          Returns a matrix of tallies corresponding to the given type pm of performance measure.
 MatrixOfTallies<TallyStore> getMatrixOfTallyStores(PerformanceMeasureType pm)
          Returns a matrix of tallies corresponding to the given type pm of performance measure.
 DoubleMatrix2D getMax(PerformanceMeasureType pm)
           
 DoubleMatrix2D getMin(PerformanceMeasureType pm)
           
 PerformanceMeasureType[] getPerformanceMeasures()
          Returns the types of performance measures contained into the implemented set of call center probes.
 DoubleMatrix2D getVariance(PerformanceMeasureType pm)
           
 DoubleMatrix2D getVarianceOfAverage(PerformanceMeasureType pm)
           
 boolean hasPerformanceMeasure(PerformanceMeasureType pm)
          Determines if the implementing set of call center probes contains a matrix of probes for the performance measure pm.
 void init()
          Initializes the statistical collectors contained in this object.
 void initCV()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CVCallCenterStat

public CVCallCenterStat(SimLogic sim,
                        CallCenterStatProbes inStat,
                        boolean fmm,
                        ControlVariable... cvs)
Constructs a new CV call center statistical object using the simulation logic sim, taking statistics in the stat object, and applying the control variables cvs. If fmm is false, functions of multiple means tallies are ignored. Otherwise, control variables are applied on them when appropriate.

Parameters:
sim - the simulation logic.
inStat - the call center statistics.
fmm - if control variables are applied on functions of multiple averages.
cvs - the array of control variables to apply.
Method Detail

getControlVariables

public ControlVariable[] getControlVariables()

init

public void init()
Description copied from interface: CallCenterStatProbes
Initializes the statistical collectors contained in this object.

Specified by:
init in interface CallCenterStatProbes

getPerformanceMeasures

public PerformanceMeasureType[] getPerformanceMeasures()
Description copied from interface: CallCenterStatProbes
Returns the types of performance measures contained into the implemented set of call center probes. If the implementing group of probes does not contain any matrix of statistical probes, this method must return an array with length 0 rather than null.

Specified by:
getPerformanceMeasures in interface CallCenterStatProbes
Returns:
the supported types of performance measures.

hasPerformanceMeasure

public boolean hasPerformanceMeasure(PerformanceMeasureType pm)
Description copied from interface: CallCenterStatProbes
Determines if the implementing set of call center probes contains a matrix of probes for the performance measure pm. This method returns true if and only if CallCenterStatProbes.getPerformanceMeasures() returns an array containing pm.

Specified by:
hasPerformanceMeasure in interface CallCenterStatProbes
Parameters:
pm - the type of performance measure.
Returns:
true if the measures are computed by the simulator, false otherwise.

getMatricesOfStatProbes

public Map<PerformanceMeasureType,MatrixOfStatProbes<?>> getMatricesOfStatProbes()
Description copied from interface: CallCenterStatProbes
Returns a map containing the matrix of statistical probes for each type of performance measure.

Specified by:
getMatricesOfStatProbes in interface CallCenterStatProbes
Returns:
the map of statistical probes.

getMatrixOfStatProbes

public MatrixOfStatProbes<?> getMatrixOfStatProbes(PerformanceMeasureType pm)
Description copied from interface: CallCenterStatProbes
Returns a matrix of statistical probes corresponding to the given type pm of performance measure. If the type pm is not supported, this method throws a NoSuchElementException.

Specified by:
getMatrixOfStatProbes in interface CallCenterStatProbes
Parameters:
pm - the type of performance measure.
Returns:
the matrix of statistical probes.

getMatrixOfTallies

public MatrixOfTallies<?> getMatrixOfTallies(PerformanceMeasureType pm)
Description copied from interface: CallCenterStatProbes
Returns a matrix of tallies corresponding to the given type pm of performance measure. This method usually calls CallCenterStatProbes.getMatrixOfStatProbes(PerformanceMeasureType) and casts the results into a matrix of tallies.

Specified by:
getMatrixOfTallies in interface CallCenterStatProbes
Parameters:
pm - the type of performance measure.
Returns:
the matrix of tallies.

getMatrixOfTallyStores

public MatrixOfTallies<TallyStore> getMatrixOfTallyStores(PerformanceMeasureType pm)
Description copied from interface: CallCenterStatProbes
Returns a matrix of tallies corresponding to the given type pm of performance measure. This method usually calls CallCenterStatProbes.getMatrixOfStatProbes(PerformanceMeasureType) and casts the results into a matrix of tallies that can store their observations.

Specified by:
getMatrixOfTallyStores in interface CallCenterStatProbes
Parameters:
pm - the type of performance measure.
Returns:
the matrix of tallies.

getMatrixOfFunctionOfMultipleMeansTallies

public MatrixOfFunctionOfMultipleMeansTallies<?> getMatrixOfFunctionOfMultipleMeansTallies(PerformanceMeasureType pm)
Description copied from interface: CallCenterStatProbes
Returns a matrix of function of multiple means tallies corresponding to the given type pm of performance measure. This method usually calls CallCenterStatProbes.getMatrixOfStatProbes(PerformanceMeasureType) and casts the results into a matrix of tallies.

Specified by:
getMatrixOfFunctionOfMultipleMeansTallies in interface CallCenterStatProbes
Parameters:
pm - the type of performance measure.
Returns:
the matrix of tallies.

getBetas

public double[][][] getBetas(PerformanceMeasureType pm)
Returns the $ \boldbeta$ arrays for performance measure of type pm. Element [r][c][i] of the returned array corresponds to the ith control variable applied to the performance measure of type pm, at position (r, c).

Parameters:
pm - the type of performance measure.
Returns:
the $ \boldbeta$ vectors.

getBetaMatrixFmm

public DoubleMatrix2D[][] getBetaMatrixFmm(PerformanceMeasureType pm)
Returns a 2D array of matrices representing the β constants for the control variables applied to the components of functions of multiple means represented by the type of performance measure pm. Element [r][c] of the returned array contains the $ \boldbeta$ matrix for performance measure at position (r, c).

Parameters:
pm - the type of performance measure.
Returns:
the $ \boldbeta$ matrices.

getAverage

public DoubleMatrix2D getAverage(PerformanceMeasureType pm)
Specified by:
getAverage in interface CallCenterStatProbes

getMax

public DoubleMatrix2D getMax(PerformanceMeasureType pm)
Specified by:
getMax in interface CallCenterStatProbes

getMin

public DoubleMatrix2D getMin(PerformanceMeasureType pm)
Specified by:
getMin in interface CallCenterStatProbes

getVariance

public DoubleMatrix2D getVariance(PerformanceMeasureType pm)
Specified by:
getVariance in interface CallCenterStatProbes

getVarianceOfAverage

public DoubleMatrix2D getVarianceOfAverage(PerformanceMeasureType pm)
Specified by:
getVarianceOfAverage in interface CallCenterStatProbes

getConfidenceInterval

public DoubleMatrix2D[] getConfidenceInterval(PerformanceMeasureType pm,
                                              double level)
Specified by:
getConfidenceInterval in interface CallCenterStatProbes

initCV

public void initCV()

applyControlVariables

public void applyControlVariables()
Equivalent to applyControlVariables (null).


applyControlVariables

public void applyControlVariables(CVBetaFunction cvBeta)
Applies the control variables for the supported estimators. If betaFunc is non-null, it is used for obtaining the β constants. Otherwise, the constants are estimated from the statistics.

Parameters:
cvBeta - the beta function calculator, or null.

applyControlVariables

public void applyControlVariables(Map<PerformanceMeasureType,double[][][]> betas)

ContactCenters
V. 0.9.9.

To submit a bug or ask questions, send an e-mail to Richard Simard.