|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.simexp.SimExp
umontreal.iro.lecuyer.simexp.RepSim
umontreal.iro.lecuyer.contactcenters.RepSimCC
public abstract class RepSimCC
Extends RepSim
to use measure matrices as counters, to compute
observations. This class defines a list matrices of measures that can be added to.
At the beginning of each replication, the matrices are initialized, and the
program updates them. Each column of such matrices usually corresponds to a
period as defined by a period-change event. At the end of the replication, in
the RepSim.addReplicationObs(int)
method, values are extracted from the matrices
before they are added to matrices of tallies.
Field Summary |
---|
Fields inherited from class umontreal.iro.lecuyer.simexp.SimExp |
---|
sim, simulating |
Constructor Summary | |
---|---|
RepSimCC(int minReps)
Calls super (minReps). |
|
RepSimCC(int minReps,
int maxReps)
Calls super (minReps, maxReps). |
|
RepSimCC(Simulator sim,
int minReps)
Calls RepSim.RepSim(Simulator,int) . |
|
RepSimCC(Simulator sim,
int minReps,
int maxReps)
Calls RepSim.RepSim(Simulator,int,int) . |
Method Summary | |
---|---|
List<MeasureMatrix> |
getMeasureMatrices()
Returns the matrices of measures registered to this object. |
static DoubleMatrix2D |
getReplicationValues(MeasureMatrix mat)
Constructs a matrix m with as many rows as the number of measures in mat and as many columns as the number of periods, calls getReplicationValues
(mat, m) to fill the matrix, and returns it. |
static DoubleMatrix2D |
getReplicationValues(MeasureMatrix mat,
boolean preliminary,
boolean wrapup)
Equivalent to getReplicationValues
(mat, preliminary, wrapup, null). |
static DoubleMatrix2D |
getReplicationValues(MeasureMatrix mat,
boolean preliminary,
boolean wrapup,
boolean[] mainPeriods)
Computes the matrix of observations for the measure matrix mat, and returns the result in a matrix. |
static DoubleMatrix2D |
getReplicationValues(MeasureMatrix mat,
DoubleMatrix2D m)
Computes the matrix of observations from the matrix of measures mat, and stores the result in m. |
static DoubleMatrix2D |
getReplicationValues(MeasureMatrix mat,
DoubleMatrix2D m,
boolean preliminary,
boolean wrapup)
Equivalent to getReplicationValues
(mat, m, preliminary, wrapup, null). |
static DoubleMatrix2D |
getReplicationValues(MeasureMatrix mat,
DoubleMatrix2D m,
boolean preliminary,
boolean wrapup,
boolean[] mainPeriods)
Computes the matrix of observations for the measure matrix mat and stores the result in m. |
void |
performReplication(int r)
This method is overridden to initialize the matrices of measures after the simulator is initialized. |
static DoubleMatrix2D |
timeNormalize(PeriodChangeEvent pce,
DoubleMatrix2D m,
boolean preliminary,
boolean wrapup)
Equivalent to timeNormalize
(pce, m, preliminary, wrapup, null). |
static DoubleMatrix2D |
timeNormalize(PeriodChangeEvent pce,
DoubleMatrix2D m,
boolean preliminary,
boolean wrapup,
boolean[] mainPeriods)
Equivalent to timeNormalize(PeriodChangeEvent,DoubleMatrix2D,double) with
automatic computation of total simulation time. |
static DoubleMatrix2D |
timeNormalize(PeriodChangeEvent pce,
DoubleMatrix2D m,
double totalTime)
Normalizes the matrix m using simulation time. |
Methods inherited from class umontreal.iro.lecuyer.simexp.RepSim |
---|
addReplicationObs, adjustTargetReplications, getCompletedReplications, getMaxReplications, getMinReplications, getRequiredNewReplications, getTargetReplications, init, initReplication, initReplicationProbes, replicationDone, setMaxReplications, setMinReplications, setTargetReplications, simulate, toString |
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 |
---|
public RepSimCC(int minReps)
super
(minReps).
public RepSimCC(Simulator sim, int minReps)
RepSim.RepSim(Simulator,int)
.
public RepSimCC(int minReps, int maxReps)
super
(minReps, maxReps).
public RepSimCC(Simulator sim, int minReps, int maxReps)
RepSim.RepSim(Simulator,int,int)
.
Method Detail |
---|
public List<MeasureMatrix> getMeasureMatrices()
MeasureMatrix
only.
public void performReplication(int r)
performReplication
in class RepSim
public static DoubleMatrix2D getReplicationValues(MeasureMatrix mat, DoubleMatrix2D m)
mat
- the matrix of measures for which observations are queried.m
- the matrix of double's filled with the result.
IllegalArgumentException
- if the dimensions of the matrix are invalid.
NullPointerException
- if mat or m are null.public static DoubleMatrix2D getReplicationValues(MeasureMatrix mat)
getReplicationValues
(mat, m) to fill the matrix, and returns it.
mat
- the measure matrix for which observations are queried.
NullPointerException
- if mat is null.public static DoubleMatrix2D getReplicationValues(MeasureMatrix mat, DoubleMatrix2D m, boolean preliminary, boolean wrapup, boolean[] mainPeriods)
Each column of the matrix corresponds to one period and the last column contains the values for the whole replication. Each row corresponds to one type of measure.
mat
- the measure matrix for which observations are queried.m
- the matrix filled with the result.preliminary
- if the preliminary period is included in the last column of the
matrix.wrapup
- if the wrap-up period is included in the last column of the
matrix.mainPeriods
- indicates which main periods are included in the aggregate
measure.
IllegalArgumentException
- if the dimensions of the matrix are invalid, or if
mainPeriods is non-null and has an invalid
length.
NullPointerException
- if mat or m are null.public static DoubleMatrix2D getReplicationValues(MeasureMatrix mat, DoubleMatrix2D m, boolean preliminary, boolean wrapup)
getReplicationValues
(mat, m, preliminary, wrapup, null).
mat
- the measure matrix for which observations are queried.m
- the matrix filled with the result.preliminary
- if the preliminary period is included in the last column of the
matrix.wrapup
- if the wrap-up period is included in the last column of the
matrix.
IllegalArgumentException
- if the dimensions of the matrix are invalid.
NullPointerException
- if mat or m are null.public static DoubleMatrix2D getReplicationValues(MeasureMatrix mat, boolean preliminary, boolean wrapup, boolean[] mainPeriods)
getReplicationValues
for the computation.
mat
- the measure matrix for which observations are queried.preliminary
- if the preliminary period is included in the last column of the
matrix.wrapup
- if the wrap-up period is included in the last column of the
matrix.mainPeriods
- indicates which main periods are included in the aggregated
measure.
NullPointerException
- if mat or m are null.
IllegalArgumentException
- if mainPeriods is not null and has an
invalid length.public static DoubleMatrix2D getReplicationValues(MeasureMatrix mat, boolean preliminary, boolean wrapup)
getReplicationValues
(mat, preliminary, wrapup, null).
mat
- the measure matrix for which observations are queried.preliminary
- if the preliminary period is included in the last column of the
matrix.wrapup
- if the wrap-up period is included in the last column of the
matrix.
NullPointerException
- if mat or m are null.public static DoubleMatrix2D timeNormalize(PeriodChangeEvent pce, DoubleMatrix2D m, double totalTime)
getReplicationValues(umontreal.iro.lecuyer.stat.mperiods.MeasureMatrix, cern.colt.matrix.DoubleMatrix2D)
. It
assumes that each row corresponds to a count or an integral and one column
corresponds to a main period. If there is one more column than the number
of main periods, the last column corresponds to values for the whole
replication. Each element of the matrix is divided by a simulation time
determined by the period-change event pce. For each column
c corresponding to one main period, each row is divided by the
period duration obtained using
PeriodChangeEvent.getPeriodDuration
(c + 1). For the column corresponding to the whole replication,
the rows are divided by the total simulation time totalTime.
pce
- the period-change event defining the periods.m
- the matrix being normalized.totalTime
- the supplied total simulation time.
IllegalArgumentException
- if the number of columns of m is incorrect.public static DoubleMatrix2D timeNormalize(PeriodChangeEvent pce, DoubleMatrix2D m, boolean preliminary, boolean wrapup, boolean[] mainPeriods)
timeNormalize(PeriodChangeEvent,DoubleMatrix2D,double)
with
automatic computation of total simulation time. The total time is computed
by summing the duration of the periods defined by pce. The
parameters preliminary, wrapup and mainPeriods
play the same role as with getReplicationValues(umontreal.iro.lecuyer.stat.mperiods.MeasureMatrix, cern.colt.matrix.DoubleMatrix2D)
.
pce
- the period-change event defining the periods.m
- the matrix being normalized.preliminary
- determines if the preliminary period is included in the
time-aggregate values.wrapup
- determines if the wrap-up period is included in the
time-aggregate values.mainPeriods
- indicates which main periods are included in the aggregated
measure.
IllegalArgumentException
- if the number of columns of m is incorrect.public static DoubleMatrix2D timeNormalize(PeriodChangeEvent pce, DoubleMatrix2D m, boolean preliminary, boolean wrapup)
timeNormalize
(pce, m, preliminary, wrapup, null).
pce
- the period change event defining the periods.m
- the matrix being normalized.preliminary
- determines if the preliminary period is included in the
time-aggregate values.wrapup
- determines if the wrap-up period is included in the
time-aggregate values.
IllegalArgumentException
- if the number of columns of m is incorrect.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |