Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.contactcenters.app
Class AbstractContactCenterSim

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterInfo
          umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterEval
              umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterSim

All Implemented Interfaces:
  ContactCenterEval, ContactCenterInfo, ContactCenterSim

Direct Known Subclasses:
  AbstractCallCenterCTMCSim, AbstractCallCenterCTMCSimMP, AbstractCallCenterSim, MBatchMeansSim

    public abstract class AbstractContactCenterSim

extends AbstractContactCenterEval
implements ContactCenterSim

Helper class to implement a contact center simulator.

Field Summary
`protected boolean` | `autoResetStartStream` Determines if random streams are automatically reset.
`protected boolean` | `seqSampEachEval`

Constructor Summary
`AbstractContactCenterSim()`

Method Summary
`String` | `formatStatistics()` Formats information about every performance measure after `ContactCenterEval.eval()` is called.
`boolean` | `formatStatisticsExcel(WritableWorkbook wb)` Constructs and returns an JExcel API workbook containing the results of the evaluation, and appends the contents of the generated report to the workbook `wb`.
`String` | `formatStatisticsLaTeX()` Formats and returns a statistical report that can be included into a LATEX document.
`boolean` | `getAutoResetStartStream()` Determines if the random streams are automatically reset at the end of each evaluation.
`static DoubleMatrix2D[]` | `getConfidenceInterval(MatrixOfStatProbes<?> sm, double level)`
`DoubleMatrix2D[]` | `getConfidenceInterval(PerformanceMeasureType m, double level)` Returns confidence intervals on the means or ratios of means, for the group of performance measures `m`, with confidence level `level`.
`MatrixOfFunctionOfMultipleMeansTallies<?>` | `getMatrixOfFunctionOfMultipleMeansTallies(PerformanceMeasureType m)` Returns the matrix of function of multiple means tallies used to manage observations for estimating the performance measures in group `m`.
`MatrixOfTallies<?>` | `getMatrixOfTallies(PerformanceMeasureType m)` Returns the matrix of tallies used to manage observations for estimating the performance measures in group `m`.
`DoubleMatrix2D` | `getMax(PerformanceMeasureType m)` Returns a matrix of maximum values for the performance measure `m`.
`DoubleMatrix2D` | `getMin(PerformanceMeasureType m)` Returns a matrix of minimum values for the group of performance measures `m`.
`protected boolean` | `getOneSimDone()`
`DoubleMatrix2D` | `getPerformanceMeasure(PerformanceMeasureType m)` Returns the matrix of values corresponding to the group of performance measures `m` estimated by the last call to `ContactCenterEval.eval()`.
`boolean` | `getSeqSampEachEval()` Determines if sequential sampling is done upon each call on `ContactCenterSim.eval()`.
`DoubleMatrix2D` | `getVariance(PerformanceMeasureType m)` Returns a matrix of sample variances for the group of performance measures `m`.
`boolean` | `hasPerformanceMeasure(PerformanceMeasureType m)` Calls `ContactCenterEval.getPerformanceMeasures()` and searches for `m` in the returned array.
`void` | `setAutoResetStartStream(boolean r)` Sets the automatic reset start stream indicator to `r`.
`protected void` | `setOneSimDone(boolean oneSimDone)`
`void` | `setSeqSampEachEval(boolean seqSampEachEval)` Sets the indicator for sequential sampling on each eval to `seqSamp`.

Methods inherited from class umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterEval
`getEvalInfo, getReportParams, isVerbose, setReportParams, setVerbose`

Methods inherited from class umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterInfo
`getAgentGroupName, getAgentGroupProperties, getAgentGroupSegmentName, getAgentGroupSegmentProperties, getContactTypeName, getContactTypeProperties, getContactTypeSegmentName, getContactTypeSegmentProperties, getInContactTypeSegmentName, getInContactTypeSegmentProperties, getMainPeriodName, getMainPeriodSegmentName, getMatrixOfAWTName, getNumAgentGroupSegments, getNumAgentGroupsWithSegments, getNumContactTypeSegments, getNumContactTypesWithSegments, getNumInContactTypeSegments, getNumInContactTypesWithSegments, getNumMainPeriodSegments, getNumMainPeriodsWithSegments, getNumOutContactTypeSegments, getNumOutContactTypesWithSegments, getNumWaitingQueueSegments, getNumWaitingQueuesWithSegments, getOutContactTypeSegmentName, getOutContactTypeSegmentProperties, getWaitingQueueName, getWaitingQueueProperties, getWaitingQueueSegmentName, getWaitingQueueSegmentProperties`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface umontreal.iro.lecuyer.contactcenters.app.ContactCenterSim
`eval, getCompletedSteps, getConfidenceLevel, getMatrixOfStatProbes, newSeeds, resetNextSubstream, resetStartStream, resetStartSubstream, setConfidenceLevel`

Methods inherited from interface umontreal.iro.lecuyer.contactcenters.app.ContactCenterEval
`getEvalInfo, getEvalOption, getEvalOptions, getPerformanceMeasures, getReportParams, hasEvalOption, isVerbose, reset, seemsUnstable, setEvalOption, setReportParams, setVerbose`

Methods inherited from interface umontreal.iro.lecuyer.contactcenters.app.ContactCenterInfo
`getAgentGroupName, getAgentGroupProperties, getAgentGroupSegmentName, getAgentGroupSegmentProperties, getContactTypeName, getContactTypeProperties, getContactTypeSegmentName, getContactTypeSegmentProperties, getDefaultUnit, getInContactTypeSegmentName, getInContactTypeSegmentProperties, getMainPeriodName, getMainPeriodSegmentName, getMatrixOfAWTName, getNumAgentGroups, getNumAgentGroupSegments, getNumAgentGroupsWithSegments, getNumContactTypes, getNumContactTypeSegments, getNumContactTypesWithSegments, getNumInContactTypes, getNumInContactTypeSegments, getNumInContactTypesWithSegments, getNumMainPeriods, getNumMainPeriodSegments, getNumMainPeriodsWithSegments, getNumMatricesOfAWT, getNumOutContactTypes, getNumOutContactTypeSegments, getNumOutContactTypesWithSegments, getNumWaitingQueues, getNumWaitingQueueSegments, getNumWaitingQueuesWithSegments, getOutContactTypeSegmentName, getOutContactTypeSegmentProperties, getWaitingQueueName, getWaitingQueueProperties, getWaitingQueueSegmentName, getWaitingQueueSegmentProperties`

Field Detail

### autoResetStartStream

    protected boolean autoResetStartStream

  Determines if random streams are automatically reset.

### seqSampEachEval

    protected boolean seqSampEachEval

Constructor Detail

### AbstractContactCenterSim

    public AbstractContactCenterSim()

Method Detail

### getOneSimDone

    protected boolean getOneSimDone()

### setOneSimDone

    protected void setOneSimDone(boolean oneSimDone)

### getAutoResetStartStream

    public boolean getAutoResetStartStream()

  Description copied from interface: `ContactCenterSim`
  Determines if the random streams are automatically reset at the end of each evaluation. By default, a simulator calls `RandomStream.resetStartStream()` on each `RandomStream` object he has created for `ContactCenterSim.eval()` to use the same seeds if called multiple times. If this option is set to `false`, the streams are not reset automatically, and `ContactCenterSim.eval()` always returns different results when called multiple times. However, `RandomStream.resetNextSubstream()` should still be called for all random streams after each replication.

  Specified by:
    `getAutoResetStartStream` in interface `ContactCenterSim`
  Returns:
    `true` if streams are reset automatically, `false` otherwise.

### setAutoResetStartStream

    public void setAutoResetStartStream(boolean r)

  Description copied from interface: `ContactCenterSim`
  Sets the automatic reset start stream indicator to `r`.

  Specified by:
    `setAutoResetStartStream` in interface `ContactCenterSim`
  Parameters:
    `r` - the new value of the indicator.
  See Also:
    `ContactCenterSim.getAutoResetStartStream()`

### getSeqSampEachEval

    public boolean getSeqSampEachEval()

  Description copied from interface: `ContactCenterSim`
  Determines if sequential sampling is done upon each call on `ContactCenterSim.eval()`. If the implemented simulator uses sequential sampling, the number of steps (replications or batches) simulated is random. By default, the first call to `ContactCenterSim.eval()` determines the number of simulated steps while each subsequent call to `ContactCenterSim.eval()` simulates the exact same number of steps, without reapplying sequential sampling. Turning this flag on changes this behavior, forcing the simulator to perform sequential sampling upon every call to `ContactCenterSim.eval()`.

  Specified by:
    `getSeqSampEachEval` in interface `ContactCenterSim`
  Returns:
    the value of the indicator.

### setSeqSampEachEval

    public void setSeqSampEachEval(boolean seqSampEachEval)

  Description copied from interface: `ContactCenterSim`
  Sets the indicator for sequential sampling on each eval to `seqSamp`.

  Specified by:
    `setSeqSampEachEval` in interface `ContactCenterSim`
  Parameters:
    `seqSampEachEval` - the new value of the indicator.

### hasPerformanceMeasure

    public boolean hasPerformanceMeasure(PerformanceMeasureType m)

  Calls `ContactCenterEval.getPerformanceMeasures()` and searches for `m` in the returned array.

  Specified by:
    `hasPerformanceMeasure` in interface `ContactCenterEval`
  Parameters:
    `m` - the performance measure being tested.
  Returns:
    a `true` value if the measure is supported, `false` otherwise.
  Throws:
    `NullPointerException` - if `m` is `null`.

### getMatrixOfTallies

    public MatrixOfTallies<?> getMatrixOfTallies(PerformanceMeasureType m)

  Description copied from interface: `ContactCenterSim`
  Returns the matrix of tallies used to manage observations for estimating the performance measures in group `m`. This matrix is available only for performance measures corresponding to expectations, not functions of expectations.

  Specified by:
    `getMatrixOfTallies` in interface `ContactCenterSim`
  Parameters:
    `m` - the group of performance measures of interest.
  Returns:
    the matrix of tallies.

### getMatrixOfFunctionOfMultipleMeansTallies

    public MatrixOfFunctionOfMultipleMeansTallies<?> getMatrixOfFunctionOfMultipleMeansTallies(PerformanceMeasureType m)

  Description copied from interface: `ContactCenterSim`
  Returns the matrix of function of multiple means tallies used to manage observations for estimating the performance measures in group `m`. This matrix is available only for performance measures corresponding functions of expectations.

  Specified by:
    `getMatrixOfFunctionOfMultipleMeansTallies` in interface `ContactCenterSim`
  Parameters:
    `m` - the group of performance measures of interest.
  Returns:
    the matrix of function of multiple means tallies.

### getPerformanceMeasure

    public DoubleMatrix2D getPerformanceMeasure(PerformanceMeasureType m)

  Description copied from interface: `ContactCenterEval`
  Returns the matrix of values corresponding to the group of performance measures `m` estimated by the last call to `ContactCenterEval.eval()`. The dimensions of the matrix and the role of its elements depend on the queried group of performance measures, and the capabilities of the implementing evaluation system. See the `PerformanceMeasureType` class for more information about the defined performance measures. If the queried measure is not supported by this evaluation object, this throws a `NoSuchElementException`. If the values of the measures are not available, e.g., the `ContactCenterEval.eval()` method was never called after the last call to `ContactCenterEval.reset()`, this throws an `IllegalStateException`.

  Specified by:
    `getPerformanceMeasure` in interface `ContactCenterEval`
  Parameters:
    `m` - the queried group of performance measures.
  Returns:
    the matrix of values computed by the evaluation system.

### getVariance

    public DoubleMatrix2D getVariance(PerformanceMeasureType m)

  Description copied from interface: `ContactCenterSim`
  Returns a matrix of sample variances for the group of performance measures `m`. If the group of performance measures is not supported, or the sample variance cannot be computed, this method throws a `NoSuchElementException`.

  Specified by:
    `getVariance` in interface `ContactCenterSim`
  Parameters:
    `m` - the queried group of performance measures.
  Returns:
    the matrix of sample variances.

### getMin

    public DoubleMatrix2D getMin(PerformanceMeasureType m)

  Description copied from interface: `ContactCenterSim`
  Returns a matrix of minimum values for the group of performance measures `m`. If the group of measures defines no minimum (e.g., a ratio of expectations), or it is not supported, this method throws `NoSuchElementException`.

  Specified by:
    `getMin` in interface `ContactCenterSim`
  Parameters:
    `m` - the queried group of performance measures.
  Returns:
    the matrix of minima.

### getMax

    public DoubleMatrix2D getMax(PerformanceMeasureType m)

  Description copied from interface: `ContactCenterSim`
  Returns a matrix of maximum values for the performance measure `m`. If the group of measures defines no maximum (e.g., a ratio of expectations), or if it is not supported, this method throws `NoSuchElementException`.

  Specified by:
    `getMax` in interface `ContactCenterSim`
  Parameters:
    `m` - the queried group of performance measures.
  Returns:
    the matrix of maxima.

### getConfidenceInterval

    public DoubleMatrix2D[] getConfidenceInterval(PerformanceMeasureType m,
                                                  double level)

  Description copied from interface: `ContactCenterSim`
  Returns confidence intervals on the means or ratios of means, for the group of performance measures `m`, with confidence level `level`. This must return an array of two matrices, the first containing the lower bound values and the second, the upper bound values. For an unbounded confidence interval, one of the two matrices can be `null`. For each element of the performance measure matrix, a confidence interval whose desired coverage probability is `level` must be computed, independently of the other elements in the matrix. As a result, the coverage probability of all computed intervals will be smaller than `level`. The way each interval is computed is implementation-specific.

  Specified by:
    `getConfidenceInterval` in interface `ContactCenterSim`
  Parameters:
    `m` - the queried group of performance measures.
    `level` - desired probability that, for a given performance measure, the (random) confidence interval covers the true mean (a constant).
  Returns:
    an array of two matrices containing lower and upper bounds of the confidence intervals.

### getConfidenceInterval

    public static DoubleMatrix2D[] getConfidenceInterval(MatrixOfStatProbes<?> sm,
                                                         double level)

### formatStatistics

    public String formatStatistics()

  Description copied from interface: `ContactCenterEval`
  Formats information about every performance measure after `ContactCenterEval.eval()` is called. It can be simulation statistics, information about the steps of an approximation algorithm, or simply the values of all performance measures. This method should call `ContactCenterEval.getEvalInfo()` to obtain general information about the evaluation and incorporate the information into the returned string. For each entry in the map, the method should add a `key: value` line in the string. Then, the method appends the performance measures to the returned string. The `PerformanceMeasureFormatText` class can be used to convert matrices of performance measures into strings. If the evaluation was not triggered by calling `ContactCenterEval.eval()` before this method is called, an `IllegalStateException` is thrown. If no statistical information is available even after the evaluation, this method should return an empty string instead of throwing an exception.

  Specified by:
    `formatStatistics` in interface `ContactCenterEval`
  Overrides:
    `formatStatistics` in class `AbstractContactCenterEval`
  Returns:
    a string containing a statistical report.

### formatStatisticsLaTeX

    public String formatStatisticsLaTeX()

  Description copied from interface: `ContactCenterEval`
  Formats and returns a statistical report that can be included into a LATEX document. This is similar to `ContactCenterEval.formatStatistics()`, except the generated report is in LATEX rather than plain text.

  Specified by:
    `formatStatisticsLaTeX` in interface `ContactCenterEval`
  Overrides:
    `formatStatisticsLaTeX` in class `AbstractContactCenterEval`
  Returns:
    the formatted report.

### formatStatisticsExcel

    public boolean formatStatisticsExcel(WritableWorkbook wb)

  Description copied from interface: `ContactCenterEval`
  Constructs and returns an JExcel API workbook containing the results of the evaluation, and appends the contents of the generated report to the workbook `wb`. This method may add multiple sheets, e.g., for general and detailed information. This method should add the information in the map returned by `ContactCenterEval.getEvalInfo()` to a sheet in the workbook. This method returns `true` if and only if the given workbook was modified.

  One can then customize the returned workbook as needed. The method `WritableWorkbook.write()` can be used to export the workbook to an output stream. This can be used to create files that can be opened directly by Microsoft Excel for results analysis and reporting. Excel documents can also be opened by open source software such as OpenOffice.org, KOffice, etc.

  Specified by:
    `formatStatisticsExcel` in interface `ContactCenterEval`
  Overrides:
    `formatStatisticsExcel` in class `AbstractContactCenterEval`
  Parameters:
    `wb` - the workbook to append report to.
  Returns:
    `true` if and only if the given workbook was modified.

Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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