|
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.contactcenters.queue.QueueSizeStat
umontreal.iro.lecuyer.contactcenters.queue.QueueSizeStatMeasureMatrix
public class QueueSizeStatMeasureMatrix
Queue size statistical collector implementing
MeasureMatrix
.
This class extends QueueSizeStat
and implements the MeasureMatrix
interface and defines
measures for queue sizes. If the object supports K > 1 contact types, the
measure 0≤k < K corresponds to the integral of the number of contacts of
type k over the simulation time. The measure K corresponds to the
integral of the queue size over the simulation time. If K = 1, only the
integral of the queue size is computed and stored in measure 0. Since this
measure matrix supports only one period, it must be combined with
IntegralMeasureMatrix
for the
integral of the queue size to be obtained for each period.
Constructor Summary | |
---|---|
QueueSizeStatMeasureMatrix(Simulator sim,
WaitingQueue queue)
Equivalent to QueueSizeStatMeasureMatrix(WaitingQueue) ,
using the given simulator sim
to create internal probes. |
|
QueueSizeStatMeasureMatrix(Simulator sim,
WaitingQueue queue,
int numTypes)
Equivalent to QueueSizeStatMeasureMatrix(WaitingQueue,int) ,
using the given simulator sim to create
internal probes. |
|
QueueSizeStatMeasureMatrix(WaitingQueue queue)
Constructs a new queue size statistical probe for the waiting queue queue and only computing aggregate queue size. |
|
QueueSizeStatMeasureMatrix(WaitingQueue queue,
int numTypes)
Constructs a new queue size statistical probe for the waiting queue queue supporting numTypes contact types. |
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. |
static MeasureSet |
getQueueSizeIntegralMeasureSet(MeasureMatrix[] qscalc)
Returns a measure set regrouping the queue size integrals for several waiting queues. |
static MeasureSet |
getQueueSizeIntegralMeasureSet(MeasureMatrix[] qscalc,
int numTypes)
Returns a measure set regrouping the integrals of the number of contacts of each type in a set of waiting queues. |
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. |
Methods inherited from class umontreal.iro.lecuyer.contactcenters.queue.QueueSizeStat |
---|
clone, getNumContactTypes, getStatQueueSize, getStatQueueSize, getWaitingQueue, init, setSimulator, setWaitingQueue, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface umontreal.iro.lecuyer.stat.mperiods.MeasureMatrix |
---|
init |
Constructor Detail |
---|
public QueueSizeStatMeasureMatrix(WaitingQueue queue)
QueueSizeStat
(queue, 0).
queue
- the observed waiting queue.public QueueSizeStatMeasureMatrix(Simulator sim, WaitingQueue queue)
QueueSizeStatMeasureMatrix(WaitingQueue)
,
using the given simulator sim
to create internal probes.
public QueueSizeStatMeasureMatrix(WaitingQueue queue, int numTypes)
queue
- the observed waiting queue.numTypes
- the supported number of contact types.
IllegalArgumentException
- if the number of contact types is smaller than 0.public QueueSizeStatMeasureMatrix(Simulator sim, WaitingQueue queue, int numTypes)
QueueSizeStatMeasureMatrix(WaitingQueue,int)
,
using the given simulator sim to create
internal probes.
Method Detail |
---|
public int getNumMeasures()
MeasureMatrix
getNumMeasures
in interface MeasureMatrix
public void setNumMeasures(int nm)
MeasureMatrix
setNumMeasures
in interface MeasureMatrix
nm
- the new number of measures.public int getNumPeriods()
MeasureMatrix
getNumPeriods
in interface MeasureMatrix
public void setNumPeriods(int np)
MeasureMatrix
setNumPeriods
in interface MeasureMatrix
np
- the new number of periods.public double getMeasure(int i, int p)
MeasureMatrix
getMeasure
in interface MeasureMatrix
i
- the index of the measure.p
- the period of the measure.
public void regroupPeriods(int x)
MeasureMatrix
MeasureMatrix.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.
regroupPeriods
in interface MeasureMatrix
x
- the number of periods per group.public static MeasureSet getQueueSizeIntegralMeasureSet(MeasureMatrix[] qscalc)
qscalc
- the queue size matrices.
public static MeasureSet getQueueSizeIntegralMeasureSet(MeasureMatrix[] qscalc, int numTypes)
qscalc
- the queue size integral matrices.numTypes
- the number of contact types.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |