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
Class BatchMeansSimCC

    java.lang.Object
      umontreal.iro.lecuyer.simexp.SimExp
          umontreal.iro.lecuyer.simexp.BatchMeansSim
              umontreal.iro.lecuyer.contactcenters.BatchMeansSimCC

    public abstract class BatchMeansSimCC

extends BatchMeansSim

Extends `BatchMeansSim` to use matrices of measures for storing the intermediate values 's of real batches. This class defines a list of measure matrices which is automatically initialized after the warmup period. When batch aggregation is turned OFF, these matrices contain a single period and are reinitialized at the beginning of each batch. If batch aggregation is turned ON, each period in measure matrices correspond to a real batch.

Field Summary

Fields inherited from class umontreal.iro.lecuyer.simexp.SimExp
`sim, simulating`

Constructor Summary
`BatchMeansSimCC(int minBatches, double batchSize, double warmupTime)` Calls `super` `(minBatches, batchSize, warmupTime)`.
`BatchMeansSimCC(int minBatches, int maxBatches, double batchSize, double warmupTime)` Calls `super` `(minBatches, maxBatches, batchSize, warmupTime)`.
`BatchMeansSimCC(Simulator sim, int minBatches, double batchSize, double warmupTime)` Calls `BatchMeansSim.BatchMeansSim(Simulator,int,double,double)`.
`BatchMeansSimCC(Simulator sim, int minBatches, int maxBatches, double batchSize, double warmupTime)` Calls `BatchMeansSim.BatchMeansSim(Simulator,int,int,double,double)`.

Method Summary
`void` | `addRealBatchObs()` For each `IntegralMeasureMatrix` instance in the list returned by `getMeasureMatrices()`, calls `IntegralMeasureMatrix.newRecord()`.
`void` | `allocateCapacity(int newCapacity)`
`static double[]` | `getBatchValues(MeasureMatrix mat, double[] m, int s, int h)` Equivalent to `getBatchValues(MeasureMatrix,DoubleMatrix2D,int,int)` for an array.
`static DoubleMatrix1D` | `getBatchValues(MeasureMatrix mat, DoubleMatrix1D m, int s, int h)` Equivalent to `getBatchValues(MeasureMatrix,DoubleMatrix2D,int,int)` for a `DoubleMatrix1D` instance.
`static DoubleMatrix2D` | `getBatchValues(MeasureMatrix mat, DoubleMatrix2D m, int s, int h)` Copies the values corresponding to the current effective batch for the measure matrix `mat` into the matrix `m`.
`static double[]` | `getBatchValues(MeasureMatrix mat, int s, int h)` Constructs an array with one element for each measure in `mat`, and calls `getBatchValues(MeasureMatrix,double[],int,int)`.
`static DoubleMatrix1D` | `getBatchValues1D(MeasureMatrix mat, int s, int h)` Constructs a matrix with one row for each measure in `mat`, and calls `getBatchValues(MeasureMatrix,DoubleMatrix1D,int,int)`.
`static DoubleMatrix2D` | `getBatchValues2D(MeasureMatrix mat, int s, int h)` Constructs a matrix with one row for each measure in `mat` and a single column, then calls `getBatchValues(MeasureMatrix,DoubleMatrix2D,int,int)`.
`List<MeasureMatrix>` | `getMeasureMatrices()` Returns the matrices of measures registered to this object.
`void` | `initBatchStat()` Initializes registered matrices of measures if batch aggregation is turned OFF.
`void` | `initRealBatchProbes()` Initializes the matrices of measures.
`void` | `regroupRealBatches(int x)`
`static double[]` | `timeNormalize(double[] m, double l)` Equivalent to `timeNormalize(DoubleMatrix2D,double)` for an array.
`static DoubleMatrix1D` | `timeNormalize(DoubleMatrix1D m, double l)` Equivalent to `timeNormalize(DoubleMatrix2D,double)` with an instance of `DoubleMatrix1D`.
`static DoubleMatrix2D` | `timeNormalize(DoubleMatrix2D m, double l)` Normalizes the rows of the one-column matrix `m` using the batch length `l`.

Methods inherited from class umontreal.iro.lecuyer.simexp.BatchMeansSim
`addEffectiveBatchObs, adjustTargetBatches, dropFirstRealBatches, getBatch, getBatchAggregation, getBatchFraction, getBatchLengthsKeeping, getBatchSize, getBatchSizeMultiplier, getCompletedRealBatches, getDroppedRealBatches, getEndSimEvent, getMaxBatches, getMinBatches, getNumAggregates, getRealBatchEndingTime, getRealBatchLength, getRealBatchStartingTime, getRequiredNewBatches, getSum, getSum, getSum, getSum, getSum, getTargetBatches, getWarmupTime, init, initEffectiveBatchProbes, initSimulation, isWarmupDone, regroupElements, regroupElements, regroupElements, regroupElements, setBatchAggregation, setBatchLengthsKeeping, setBatchSize, setMaxBatches, setMinBatches, setTargetBatches, setWarmupTime, simulate, simulateBatch, simulateBatch, simulateBatches, toString, warmup, warmup`

Methods inherited from class umontreal.iro.lecuyer.simexp.SimExp
`getRequiredNewObservations, getRequiredNewObservations, getRequiredNewObservations, getRequiredNewObservations, getRequiredNewObservationsTally, getRequiredNewObservationsTally, isSimulating, setSimulator, simulator`

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

Constructor Detail

### BatchMeansSimCC

    public BatchMeansSimCC(int minBatches,
                           double batchSize,
                           double warmupTime)

  Calls `super` `(minBatches, batchSize, warmupTime)`.

### BatchMeansSimCC

    public BatchMeansSimCC(Simulator sim,
                           int minBatches,
                           double batchSize,
                           double warmupTime)

  Calls `BatchMeansSim.BatchMeansSim(Simulator,int,double,double)`.

### BatchMeansSimCC

    public BatchMeansSimCC(int minBatches,
                           int maxBatches,
                           double batchSize,
                           double warmupTime)

  Calls `super` `(minBatches, maxBatches, batchSize, warmupTime)`.

### BatchMeansSimCC

    public BatchMeansSimCC(Simulator sim,
                           int minBatches,
                           int maxBatches,
                           double batchSize,
                           double warmupTime)

  Calls `BatchMeansSim.BatchMeansSim(Simulator,int,int,double,double)`.

Method Detail

### getMeasureMatrices

    public List<MeasureMatrix> getMeasureMatrices()

  Returns the matrices of measures registered to this object. These matrices must be capable of supporting multiple periods. The returned list should contain non-`null` instances of `MeasureMatrix` only.

  Returns:
    the list of measure matrices.

### initBatchStat

    public void initBatchStat()

  Initializes registered matrices of measures if batch aggregation is turned OFF.

  Specified by:
    `initBatchStat` in class `BatchMeansSim`

### allocateCapacity

    public void allocateCapacity(int newCapacity)

  Overrides:
    `allocateCapacity` in class `BatchMeansSim`

### regroupRealBatches

    public void regroupRealBatches(int x)

  Overrides:
    `regroupRealBatches` in class `BatchMeansSim`

### initRealBatchProbes

    public void initRealBatchProbes()

  Initializes the matrices of measures.

  Specified by:
    `initRealBatchProbes` in class `BatchMeansSim`

### addRealBatchObs

    public void addRealBatchObs()

  For each `IntegralMeasureMatrix` instance in the list returned by `getMeasureMatrices()`, calls `IntegralMeasureMatrix.newRecord()`.

  Specified by:
    `addRealBatchObs` in class `BatchMeansSim`

### getBatchValues

    public static DoubleMatrix2D getBatchValues(MeasureMatrix mat,
                                                DoubleMatrix2D m,
                                                int s,
                                                int h)

  Copies the values corresponding to the current effective batch for the measure matrix `mat` into the matrix `m`. The given matrix of measures should be registered to this object for this method to be used. The Colt matrix `m` must have one row for each measure, and a single column. The method returns `m` after it is filled.

  Parameters:
    `mat` - the measure matrix for which the Colt matrix is required.
    `m` - the matrix receiving the results.
    `s` - the starting real batch.
    `h` - the number of real batches per effective batch.
  Throws:
    `IllegalArgumentException` - if the dimensions of the matrix `m` are incompatible.

### getBatchValues2D

    public static DoubleMatrix2D getBatchValues2D(MeasureMatrix mat,
                                                  int s,
                                                  int h)

  Constructs a matrix with one row for each measure in `mat` and a single column, then calls `getBatchValues(MeasureMatrix,DoubleMatrix2D,int,int)`.

### getBatchValues

    public static DoubleMatrix1D getBatchValues(MeasureMatrix mat,
                                                DoubleMatrix1D m,
                                                int s,
                                                int h)

  Equivalent to `getBatchValues(MeasureMatrix,DoubleMatrix2D,int,int)` for a `DoubleMatrix1D` instance.

### getBatchValues1D

    public static DoubleMatrix1D getBatchValues1D(MeasureMatrix mat,
                                                  int s,
                                                  int h)

  Constructs a matrix with one row for each measure in `mat`, and calls `getBatchValues(MeasureMatrix,DoubleMatrix1D,int,int)`.

### getBatchValues

    public static double[] getBatchValues(MeasureMatrix mat,
                                          double[] m,
                                          int s,
                                          int h)

  Equivalent to `getBatchValues(MeasureMatrix,DoubleMatrix2D,int,int)` for an array.

### getBatchValues

    public static double[] getBatchValues(MeasureMatrix mat,
                                          int s,
                                          int h)

  Constructs an array with one element for each measure in `mat`, and calls `getBatchValues(MeasureMatrix,double[],int,int)`.

### timeNormalize

    public static DoubleMatrix2D timeNormalize(DoubleMatrix2D m,
                                               double l)

  Normalizes the rows of the one-column matrix `m` using the batch length `l`. Each row of the matrix is divided by `l` and the modified matrix is returned.

  Parameters:
    `m` - the matrix being normalized.
    `l` - the batch length.
  Returns:
    the modified matrix.

### timeNormalize

    public static DoubleMatrix1D timeNormalize(DoubleMatrix1D m,
                                               double l)

  Equivalent to `timeNormalize(DoubleMatrix2D,double)` with an instance of `DoubleMatrix1D`.

### timeNormalize

    public static double[] timeNormalize(double[] m,
                                         double l)

  Equivalent to `timeNormalize(DoubleMatrix2D,double)` for an array.

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.