ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.expdelay
Class LastWaitingTimePerQueuePredictor

java.lang.Object
  extended by umontreal.iro.lecuyer.contactcenters.expdelay.LastWaitingTimePredictor
      extended by umontreal.iro.lecuyer.contactcenters.expdelay.LastWaitingTimePerQueuePredictor
All Implemented Interfaces:
WaitingTimePredictor

public class LastWaitingTimePerQueuePredictor
extends LastWaitingTimePredictor

Waiting time predictor using the waiting time of the last contact exiting queue q for service as a prediction for the waiting time of a new contact entering queue q. This predictor collects the waiting times of contacts, and stores the last waiting time separately for each queue. If a prediction is requested for a specific queue, the last waiting time for that queue is given. If a prediction is requested for any queue, the last waiting time over all queues is given.


Constructor Summary
LastWaitingTimePerQueuePredictor()
           
 
Method Summary
protected  void dequeued(DequeueEvent ev)
           
 double getWaitingTime(Contact contact, WaitingQueue queue)
          Returns a prediction of the waiting time for the given contact contact conditional on the contact joining the waiting queue queue.
 void init()
          Resets any internal variable of this predictor.
 void setRouter(Router router)
          Sets the router associated with this predictor to router.
 
Methods inherited from class umontreal.iro.lecuyer.contactcenters.expdelay.LastWaitingTimePredictor
getRouter, getWaitingTime, isCollectingAbandonment, isCollectingService, setCollectingAbandonment, setCollectingService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LastWaitingTimePerQueuePredictor

public LastWaitingTimePerQueuePredictor()
Method Detail

getWaitingTime

public double getWaitingTime(Contact contact,
                             WaitingQueue queue)
Description copied from interface: WaitingTimePredictor
Returns a prediction of the waiting time for the given contact contact conditional on the contact joining the waiting queue queue. This method returns Double.NaN if it cannot make a prediction for the given contact, or the given waiting queue.

Specified by:
getWaitingTime in interface WaitingTimePredictor
Overrides:
getWaitingTime in class LastWaitingTimePredictor
Parameters:
contact - the contact for which a delay is predicted.
queue - the target waiting queue.
Returns:
the predicted delay.

init

public void init()
Description copied from interface: WaitingTimePredictor
Resets any internal variable of this predictor.

Specified by:
init in interface WaitingTimePredictor
Overrides:
init in class LastWaitingTimePredictor

setRouter

public void setRouter(Router router)
Description copied from interface: WaitingTimePredictor
Sets the router associated with this predictor to router. When router is non-null, this method can also register any listener required to make the predictions. If the router associated with a predictor is changed, the predictor should unregister any listener associated with the previous router.

Specified by:
setRouter in interface WaitingTimePredictor
Overrides:
setRouter in class LastWaitingTimePredictor
Parameters:
router - the new router.

dequeued

protected void dequeued(DequeueEvent ev)
Overrides:
dequeued in class LastWaitingTimePredictor

ContactCenters
V. 0.9.9.

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