ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.ctmc
Class CallCenterCTMCQueues

java.lang.Object
  extended by umontreal.iro.lecuyer.contactcenters.ctmc.CallCenterCTMCQueues
All Implemented Interfaces:
Cloneable

public class CallCenterCTMCQueues
extends Object
implements Cloneable

Provides helper method used to maintain information on queued calls, for a CTMC model of a call center. This class encapsulates an array of circular arrays of integers representing the waiting queues, and provides the init() that should be called after CallCenterCTMC.initEmpty() or CallCenterCTMC.init(CallCenterCTMC). It also implements the update(CallCenterCTMC,TransitionType) method which should be called after each transition to update the waiting queues. The methods getLastWaitingTime(int), and getQueue(int) can then be used by CTMC models to implement the interface CallCenterCTMCWithQueues.


Constructor Summary
CallCenterCTMCQueues(CallCenterCTMC ctmc)
          Constructs a new object holding queueing information from the call center CTMC model ctmc.
 
Method Summary
 CallCenterCTMCQueues clone()
          Constructs and returns a deep copy of this object, including copies of the waiting queues.
 int getLastWaitingTime(int k)
          Returns the number of transitions spent by the last call of type k having left the queue, provided that the update(CallCenterCTMC,TransitionType) method has been called after each transition.
 CircularIntArray getQueue(int k)
          Returns the circular array of integers containing the transition number at which each call of type k entered the queue, provided that the update(CallCenterCTMC,TransitionType) method has been called at each transition.
 void init()
          Empties all the circular arrays representing waiting queues, and resets the last waiting times to 0.
 void init(CallCenterCTMCQueues q)
          Initializes this object with the contents of the other object q.
 void update(CallCenterCTMC ctmc, TransitionType type)
          Updates the status of the waiting queues after a transition of type type of the CTMC model ctmc.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallCenterCTMCQueues

public CallCenterCTMCQueues(CallCenterCTMC ctmc)
Constructs a new object holding queueing information from the call center CTMC model ctmc.

Parameters:
ctmc - the call center CTMC model.
Method Detail

getQueue

public CircularIntArray getQueue(int k)
Returns the circular array of integers containing the transition number at which each call of type k entered the queue, provided that the update(CallCenterCTMC,TransitionType) method has been called at each transition.

Parameters:
k - the tested call type.
Returns:
the circular array representing the queue.

getLastWaitingTime

public int getLastWaitingTime(int k)
Returns the number of transitions spent by the last call of type k having left the queue, provided that the update(CallCenterCTMC,TransitionType) method has been called after each transition.

Parameters:
k - the tested call type.
Returns:
the number of transitions spent in queue.

init

public void init()
Empties all the circular arrays representing waiting queues, and resets the last waiting times to 0.


init

public void init(CallCenterCTMCQueues q)
Initializes this object with the contents of the other object q.

Parameters:
q - another object holding queue information.

update

public void update(CallCenterCTMC ctmc,
                   TransitionType type)
Updates the status of the waiting queues after a transition of type type of the CTMC model ctmc.

Parameters:
ctmc - the CTMC model in which the transition occurred.
type - the type of transition.

clone

public CallCenterCTMCQueues clone()
Constructs and returns a deep copy of this object, including copies of the waiting queues.

Overrides:
clone in class Object

ContactCenters
V. 0.9.9.

To submit a bug or ask questions, send an e-mail to Richard Simard.