|
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.msk.stat.QueueSizeChecker
public final class QueueSizeChecker
Computes the maximal queue size for every waiting queue and statistical period, during the simulation. An object of this class registers as a listener for every waiting queue of the model. Each time a contact enters a queue, the object checks that the queue size is not greater than the current maximum, and updates the maximum if necessary. When the model is simulated over multiple periods, such maxima are computed for each period. A queue-size checker is also a period-change listener, because at the beginning of periods, it needs to set the per-period initial maxima to the current queue size.
Constructor Summary | |
---|---|
QueueSizeChecker(CallCenter cc,
StatPeriod statP)
Constructs a new queue-size checker using call center cc, and object statP to obtain statistical periods. |
Method Summary | |
---|---|
void |
dequeued(DequeueEvent ev)
This method is called when a contact is removed from a waiting queue, ev representing the corresponding dequeue event. |
void |
enqueued(DequeueEvent ev)
This method is called after a contact was added to a queue. |
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()
Resets the values of maxima to 0. |
void |
init(WaitingQueue queue)
This method is called after the WaitingQueue.init() method is called
for the waiting queue queue. |
void |
initForCurrentPeriod()
|
void |
register()
Registers this queue-size checker with the associated call center model. |
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. |
void |
unregister()
Unregisters this queue-size checker with the associated model. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueueSizeChecker(CallCenter cc, StatPeriod statP)
Method Detail |
---|
public void init()
init
in interface MeasureMatrix
public void initForCurrentPeriod()
public void register()
public void unregister()
register()
.
public void init(WaitingQueue queue)
WaitingQueueListener
WaitingQueue.init()
method is called
for the waiting queue queue.
init
in interface WaitingQueueListener
queue
- the queue being initialized.public void enqueued(DequeueEvent ev)
WaitingQueueListener
enqueued
in interface WaitingQueueListener
ev
- the dequeue event associated with the queued contact.public void dequeued(DequeueEvent ev)
WaitingQueueListener
dequeued
in interface WaitingQueueListener
ev
- the obsolete dequeue event.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 int getNumMeasures()
MeasureMatrix
getNumMeasures
in interface MeasureMatrix
public int getNumPeriods()
MeasureMatrix
getNumPeriods
in interface MeasureMatrix
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 void setNumMeasures(int nm)
MeasureMatrix
setNumMeasures
in interface MeasureMatrix
nm
- the new number of measures.public void setNumPeriods(int np)
MeasureMatrix
setNumPeriods
in interface MeasureMatrix
np
- the new number of periods.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |