|
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.expdelay.LastWaitingTimePredictor
public class LastWaitingTimePredictor
Waiting time predictor using the waiting time
of the last contact beginning service as a
prediction for the waiting time.
This predictor monitors every waiting queue
attached to the associated router, and
stores the last observed waiting time.
This waiting time is returned each time a prediction
is requested.
One can decide if the collected waiting times
include times before abandonment, and
time before service, using
methods setCollectingAbandonment(boolean)
,
and setCollectingService(boolean)
,
respectively.
By default, only the waiting times before service
are collected.
Constructor Summary | |
---|---|
LastWaitingTimePredictor()
|
Method Summary | |
---|---|
protected void |
dequeued(DequeueEvent ev)
|
Router |
getRouter()
Returns a reference to the router associated with this predictor. |
double |
getWaitingTime(Contact contact)
Returns a prediction of the waiting time of contact contact waiting in any queue. |
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. |
boolean |
isCollectingAbandonment()
Determines if the collected waiting times for predictions include times before abandonment. |
boolean |
isCollectingService()
Determines if the collected waiting times for predictions include times before service. |
void |
setCollectingAbandonment(boolean collectingAbandonment)
Sets the flag for collecting abandonment to collectingAbandonment. |
void |
setCollectingService(boolean collectingService)
Sets the flag for collecting service to collectingService. |
void |
setRouter(Router newRouter)
Sets the router associated with this predictor to router. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LastWaitingTimePredictor()
Method Detail |
---|
public Router getRouter()
WaitingTimePredictor
WaitingTimePredictor.setRouter(Router)
method.
getRouter
in interface WaitingTimePredictor
public double getWaitingTime(Contact contact)
WaitingTimePredictor
Double.NaN
if it cannot make a prediction for the given contact.
getWaitingTime
in interface WaitingTimePredictor
contact
- the contact for which we need a prediction.
public double getWaitingTime(Contact contact, WaitingQueue queue)
WaitingTimePredictor
Double.NaN
if it cannot make a prediction for the given contact,
or the given waiting queue.
getWaitingTime
in interface WaitingTimePredictor
contact
- the contact for which a delay is predicted.queue
- the target waiting queue.
public void init()
WaitingTimePredictor
init
in interface WaitingTimePredictor
public void setRouter(Router newRouter)
WaitingTimePredictor
setRouter
in interface WaitingTimePredictor
newRouter
- the new router.protected void dequeued(DequeueEvent ev)
public boolean isCollectingAbandonment()
public void setCollectingAbandonment(boolean collectingAbandonment)
collectingAbandonment
- the new value of the flag.isCollectingAbandonment()
public boolean isCollectingService()
public void setCollectingService(boolean collectingService)
collectingService
- the new value of the flag.isCollectingService()
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |