|
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
public class QueueSizeStat
Computes statistics for a specific waiting queue. Using accumulates, this
class can compute the integral of the queue size from the last call to
init()
to the current simulation time. Optionally, it can also
compute the integral of the number of contacts of each type k in queue.
Constructor Summary | |
---|---|
QueueSizeStat(Simulator sim,
WaitingQueue queue)
Equivalent to QueueSizeStat(WaitingQueue) ,
using the given simulator sim to
construct accumulates. |
|
QueueSizeStat(Simulator sim,
WaitingQueue queue,
int numTypes)
Equivalent ot QueueSizeStat(WaitingQueue,int) ,
using the simulator sim to construct
accumulates. |
|
QueueSizeStat(WaitingQueue queue)
Constructs a new queue size statistical probe for the waiting queue queue and only computing aggregate queue size. |
|
QueueSizeStat(WaitingQueue queue,
int numTypes)
Constructs a new queue size statistical probe for the waiting queue queue supporting numTypes contact types. |
Method Summary | |
---|---|
QueueSizeStat |
clone()
Constructs and returns a clone of this queue-size collector. |
int |
getNumContactTypes()
Returns the number of contact types supported by this object. |
Accumulate |
getStatQueueSize()
Returns the statistical collector for the queue size over the simulation time. |
Accumulate |
getStatQueueSize(int type)
Returns the statistical collector for the number of contacts of type type in the queue. |
WaitingQueue |
getWaitingQueue()
Returns the waiting queue currently associated with this object. |
void |
init()
|
void |
setSimulator(Simulator sim)
Sets the simulator attached to internal accumulates to sim. |
void |
setWaitingQueue(WaitingQueue queue)
Sets the associated waiting queue to queue. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QueueSizeStat(WaitingQueue queue)
QueueSizeStat
(queue, 0).
queue
- the observed waiting queue.public QueueSizeStat(Simulator sim, WaitingQueue queue)
QueueSizeStat(WaitingQueue)
,
using the given simulator sim to
construct accumulates.
public QueueSizeStat(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 QueueSizeStat(Simulator sim, WaitingQueue queue, int numTypes)
QueueSizeStat(WaitingQueue,int)
,
using the simulator sim to construct
accumulates.
Method Detail |
---|
public void setSimulator(Simulator sim)
sim
- the new simulator.
NullPointerException
- if sim is null.public final WaitingQueue getWaitingQueue()
public final void setWaitingQueue(WaitingQueue queue)
queue
- the new associated waiting queue.public Accumulate getStatQueueSize()
public int getNumContactTypes()
public Accumulate getStatQueueSize(int type)
type
- the target contact type.
ArrayIndexOutOfBoundsException
- if type is negative or greater than or equal to the
number of supported contact types.public void init()
public String toString()
toString
in class Object
public QueueSizeStat clone()
clone
in class Object
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |