|
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.router.Router
umontreal.iro.lecuyer.contactcenters.router.QueuePriorityRouter
umontreal.iro.lecuyer.contactcenters.router.LongestWeightedWaitingTimeRouter
public class LongestWeightedWaitingTimeRouter
This extends the queue priority router to select contacts with the longest weighted waiting time. The router assumes that every attached waiting queue uses a FIFO discipline. When a contact arrives into the router, the same scheme for agent group selection as with the queue priority router is used. However, when an agent becomes free, instead of using the group-to-type map to determine the order in which the queues are queried, all queues authorized by the group-to-type map are considered, and the contact with the longest weighted waiting time is removed. More specifically, let wq be a user-defined weight associated with waiting queue q, and let Wq be the waiting time of the first contact waiting in queue q (if queue q is empty, let Wq = - ∞). The router then selects the first contact in the queue with the maximal wqWq value. If more than one queue authorized by the freed agent has a first contact with the same weighted waiting time, which rarely happens in practice, the contact is removed from the first queue in the ordered list obtained from the group-to-type map.
Field Summary |
---|
Fields inherited from class umontreal.iro.lecuyer.contactcenters.router.QueuePriorityRouter |
---|
groupToTypeMap, typeToGroupMap |
Fields inherited from class umontreal.iro.lecuyer.contactcenters.router.Router |
---|
BLOCKTYPE_CANTQUEUE, BLOCKTYPE_NOLINE, BLOCKTYPE_QUEUEFULL, DEQUEUETYPE_BEGINSERVICE, DEQUEUETYPE_FANTOM, DEQUEUETYPE_NOAGENT, DEQUEUETYPE_TRANSFER, dqTypeRet |
Constructor Summary | |
---|---|
LongestWeightedWaitingTimeRouter(int[][] typeToGroupMap,
int[][] groupToTypeMap,
double[] queueWeights)
Constructs a new longest weighted waiting time router with a type-to-group map typeToGroupMap, a group-to-type map groupToTypeMap, and an array of weights queueWeights. |
Method Summary | |
---|---|
String |
getDescription()
|
double[] |
getQueueWeights()
Returns the weights associated with each waiting queue. |
protected DequeueEvent |
selectContact(AgentGroup group,
Agent agent)
Returns a dequeue event representing a queued contact to be served by the agent agent in agent group group. |
void |
setQueueWeights(double[] queueWeights)
Sets the weights of waiting queues to queueWeights. |
String |
toLongString()
Returns a string representation of detailed information about the router. |
Methods inherited from class umontreal.iro.lecuyer.contactcenters.router.QueuePriorityRouter |
---|
canServe, checkFreeAgents, checkWaitingQueues, formatGroupToTypeMap, formatTypeToGroupMap, getGroupToTypeMap, getGroupToTypeMap, getTypeToGroupMap, getTypeToGroupMap, getWaitingQueueType, selectAgent, selectWaitingQueue, setRoutingTable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LongestWeightedWaitingTimeRouter(int[][] typeToGroupMap, int[][] groupToTypeMap, double[] queueWeights)
typeToGroupMap
- the type-to-group map.groupToTypeMap
- the group-to-type map.queueWeights
- the array of weights wq for waiting queues.Method Detail |
---|
public double[] getQueueWeights()
public void setQueueWeights(double[] queueWeights)
queueWeights
- the new array of weights.protected DequeueEvent selectContact(AgentGroup group, Agent agent)
Router
Router.DEQUEUETYPE_BEGINSERVICE
, e.g., by using
queue.removeFirst (DEQUEUETYPE_BEGINSERVICE)
, or
queue.remove (ev, DEQUEUETYPE_BEGINSERVICE)
,
etc.
Generally, it is sufficient
to override this method instead of Router.checkFreeAgents(AgentGroup,Agent)
. One can
override Router.checkFreeAgents(AgentGroup,Agent)
to improve efficiency when looking for
contacts in the same waiting queue. This method is not abstract and
returns null by default in order to allow
Router.checkFreeAgents(AgentGroup,Agent)
to be overridden without implementing this
method.
selectContact
in class QueuePriorityRouter
group
- the affected agent group.agent
- the agent having ended its service.
public String getDescription()
getDescription
in class QueuePriorityRouter
public String toLongString()
Router
Router.toString()
should be used.
toLongString
in class QueuePriorityRouter
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |