|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MeasureMatrix
Represents a matrix of measures for a set of related values during successive
simulation periods. For example, it can compute the number of served
customers of different types, for each simulation period. A period can be any
time interval such as half an hour, a complete day, a batch, etc. At the
beginning of a simulation, the matrix is initialized using the init()
method. During the simulation, it is updated with new events or values by
implementation-specific methods. An implementation of this interface computes
raw observations of a simulated system by counting the number of occurrences
of events, by summing values, or by computing integrals. At determined times,
e.g., at the end of a replication or a batch, these raw observations are
processed to be added into some statistical collectors. This interface
provides an abstraction layer to separate the computation of observations
from the required processing before they are collected.
Some methods specified by this interface are mandatory whereas others are
optional. When an unsupported optional method is called, its implementation
simply throws an UnsupportedOperationException
.
Method Summary | |
---|---|
double |
getMeasure(int i,
int p)
Returns the measure corresponding to the index i and period p. |
int |
getNumMeasures()
Returns the number of measures calculated by the implementation of this interface. |
int |
getNumPeriods()
Returns the number of periods stored into this matrix of measures. |
void |
init()
Initializes this matrix of measures for a new simulation replication. |
void |
regroupPeriods(int x)
Increases the length of stored periods by regrouping them. |
void |
setNumMeasures(int nm)
Sets the number of measures to nm. |
void |
setNumPeriods(int np)
Sets the number of periods of this matrix to np. |
Method Detail |
---|
void init()
int getNumMeasures()
void setNumMeasures(int nm)
nm
- the new number of measures.
IllegalArgumentException
- if the given number is negative or not accepted.
UnsupportedOperationException
- if the number of measures cannot be changed.int getNumPeriods()
void setNumPeriods(int np)
np
- the new number of periods.
IllegalArgumentException
- if the given number is negative or not accepted.
UnsupportedOperationException
- if the number of periods cannot be changed.double getMeasure(int i, int p)
i
- the index of the measure.p
- the period of the measure.
IndexOutOfBoundsException
- if i or p are negative or greater than or
equal to the number of measures or the number of periods,
respectively.void regroupPeriods(int x)
getNumPeriods()
/x -
1, it sums the values for periods xp, ...,xp+x-1,
and stores the results in period p whose length will be
x times the length of original periods. If the number of periods
is not a multiple of x, an additional period is used to contain
the remaining sums of values. The unused periods are zeroed for future
use. This method can be useful for memory management when using batch
means to estimate steady-state performance measures.
x
- the number of periods per group.
IllegalArgumentException
- if the number of periods per group is negative or 0.
UnsupportedOperationException
- if the matrix does not support regrouping.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |