public static class GenCMuRouting.GenCMuRouter extends Router
Modifier and Type | Field and Description |
---|---|
protected boolean[][] |
canServe
A matrix of size [number of groups][number of types] which
determines if a group can serve a call type.
|
protected NumFunctionArgs[] |
derFunctions
The derivative functions.
|
protected int |
numGroups
The number of agent groups in the call center.
|
protected int |
numTypes
The number of call types in the call center.
|
protected double[][] |
serviceRates
A matrix of size [number of call types][number of groups] that
contains the service rates of each pair of call type and agent group.
|
protected RandomStream |
streamAgentSelection
The random stream used (if needed) to select an idle agent.
|
protected RandomStream |
streamContactSelection
The random stream used (if needed) to select a waiting call.
|
BLOCKTYPE_CANTQUEUE, BLOCKTYPE_NOLINE, BLOCKTYPE_QUEUEFULL, DEQUEUETYPE_BEGINSERVICE, DEQUEUETYPE_FANTOM, DEQUEUETYPE_NOAGENT, DEQUEUETYPE_TRANSFER, dqTypeRet
Constructor and Description |
---|
GenCMuRouting.GenCMuRouter(int numTypes,
int numGroups,
NumFunctionArgs[] derFunctions,
double[][] mu,
boolean[][] canServe)
Constructor of the generalized-cmu router.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canServe(int group,
int type) |
protected void |
checkWaitingQueues(AgentGroup agentGroup) |
protected double |
computeScoreFreeAgent(int type,
int group)
Compute the current score for the pair (call type, group).
|
protected double |
computeScoreNewContact(int type,
int group)
Compute the current score for the pair (call type, group).
|
boolean[][] |
getCanServeGT()
Get the canServe skillset matrix.
|
double[][] |
getDerFuncParams()
Get the parameters of the derivative functions.
|
NumFunctionArgs[] |
getDerFunctions()
Get the derivative functions.
|
String |
getDescription() |
RandomStream |
getStreamAgentSelection()
Get the random stream used for tie-breaking when choosing
an agent group.
|
RandomStream |
getStreamContactSelection()
Get the random stream used for tie-breaking when choosing
a call type.
|
WaitingQueueType |
getWaitingQueueType() |
boolean |
needsDetailedAgentGroup(int i) |
protected EndServiceEvent |
selectAgent(Contact contact)
Select a free agent to serve this contact.
|
protected DequeueEvent |
selectContact(AgentGroup agentGroup,
Agent agent) |
protected DequeueEvent |
selectWaitingQueue(Contact contact) |
void |
setCanServeGT(boolean[][] b)
Change the canServe skillset matrix of the agent groups, must be a boolean
matrix of dimensions
I×K where I is the number of agent groups and
K is the number of call types.
|
void |
setDerFuncParams(double[][] params)
Set the parameters of the derivative functions.
|
void |
setDerFunctions(NumFunctionArgs[] f)
Set the derivative functions for all call types and agent groups.
|
void |
setStreamAgentSelection(RandomStream s)
Set the random stream for tie-breaking when selecting an
agent group.
|
void |
setStreamContactSelection(RandomStream s)
Set the random stream for tie-breaking when selecting an
call type.
|
addExitedContactListener, agentReroutingEventsIterator, beginService, checkFreeAgents, clearExitedContactListeners, contactReroutingEventsIterator, dequeued, endContact, endService, enqueued, exitBlocked, exitDequeued, exitServed, formatAgentGroups, formatWaitingQueues, getAgentGroup, getAgentGroupListener, getAgentGroups, getAgentReroutingEvents, getContactFactory, getContactReroutingEvents, getCurrentQueueSize, getDialers, getExitedContactListeners, getNeededWaitingQueueComparator, getNeededWaitingQueueStructure, getNumAgentGroups, getNumContactTypes, getNumWaitingQueues, getReroutingDelay, getReroutingDelay, getTotalQueueCapacity, getWaitingQueue, getWaitingQueueListener, getWaitingQueues, init, isKeepingReroutingEvents, mustClearWaitingQueue, newContact, notifyBlocked, notifyDequeued, notifyServed, removeExitedContactListener, restore, save, selectAgent, selectContact, selectWaitingQueue, setAgentGroup, setClearWaitingQueue, setClearWaitingQueues, setContactFactory, setKeepingReroutingEvents, setTotalQueueCapacity, setWaitingQueue, startDialers, toLongString, toString
protected int numTypes
protected int numGroups
protected NumFunctionArgs[] derFunctions
protected boolean[][] canServe
canServe
.protected RandomStream streamAgentSelection
protected RandomStream streamContactSelection
protected double[][] serviceRates
public GenCMuRouting.GenCMuRouter(int numTypes, int numGroups, NumFunctionArgs[] derFunctions, double[][] mu, boolean[][] canServe)
numTypes
- the number of call types.numGroups
- the number of agent groups.derFunctions
- the derivative functions for the call types.mu
- matrix of size numTypes times numGroups that defines the service rate of
a group on a call type.canServe
- matrix of size numGroups times numTypes that defines if a group
has the skill to serve a call type.public boolean needsDetailedAgentGroup(int i)
needsDetailedAgentGroup
in class Router
public WaitingQueueType getWaitingQueueType()
getWaitingQueueType
in class Router
public String getDescription()
getDescription
in class Router
public void setStreamAgentSelection(RandomStream s)
s
- the random stream for tie-breaking agent groups.public void setStreamContactSelection(RandomStream s)
s
- the random stream for tie-breaking call types.public RandomStream getStreamAgentSelection()
public RandomStream getStreamContactSelection()
public NumFunctionArgs[] getDerFunctions()
public void setDerFunctions(NumFunctionArgs[] f)
f
- the derivative functions for all call types and agent groups.IllegalArgumentException
- if the number of functions is different than
the sum of numbers of call types and agent groups.public void setCanServeGT(boolean[][] b)
b
- the new canServe skillset matrix.public boolean[][] getCanServeGT()
protected double computeScoreFreeAgent(int type, int group)
Double.NEGATIVE_INFINITY
.
Implementation note : This function is called only when an agent of group group
becomes free.
For new call, use the function computeScoreNewContact(int, int)
.type
- the call type.group
- the agent group.protected double computeScoreNewContact(int type, int group)
Double.NEGATIVE_INFINITY
.
Implementation note : This score function is adapted to compute the score
of a new call only.
To compute the score when an agent becomes free, use the function int)
.type
- the call type of the new call.group
- the agent group.protected EndServiceEvent selectAgent(Contact contact)
Note : This method should be called only when a new call just arrived.
selectAgent
in class Router
contact
- the contact to be served.protected DequeueEvent selectWaitingQueue(Contact contact)
selectWaitingQueue
in class Router
protected DequeueEvent selectContact(AgentGroup agentGroup, Agent agent)
selectContact
in class Router
protected void checkWaitingQueues(AgentGroup agentGroup)
checkWaitingQueues
in class Router
public double[][] getDerFuncParams()
public void setDerFuncParams(double[][] params)
getDerFuncParams()
.
Note that this method is array safe (deep copy used), so changing params will
not affect the routing.params
- set the new parameters of the derivative functions.