public static class WeightRoutingThreshold.WeightRouterThreshold extends WeightRouting.WeightRouter
Modifier and Type | Field and Description |
---|---|
protected double[][] |
minIdleAgents
This is the minIdleAgentsGT parameter matrix.
|
protected double[][] |
randomThreshold |
protected RandomStream |
streamThreshold
Random stream used to generate the random idle agent thresholds when the parameter
values are not integers.
|
callCoeffs, canServe, constWeights, delayCheckEvent, groupCoeffs, numGroups, numTypes, ROUTING_DELAY_CONSTTIME, ROUTING_DELAY_EXPTIME, routingDelayConstTime, routingDelayMethod, streamAgentSelection, streamContactSelection
BLOCKTYPE_CANTQUEUE, BLOCKTYPE_NOLINE, BLOCKTYPE_QUEUEFULL, DEQUEUETYPE_BEGINSERVICE, DEQUEUETYPE_FANTOM, DEQUEUETYPE_NOAGENT, DEQUEUETYPE_TRANSFER, dqTypeRet
Constructor and Description |
---|
WeightRoutingThreshold.WeightRouterThreshold(int numTypes,
int numGroups,
double[][] constWeightsTG,
double[][] callCoeffsTG,
double[][] groupCoeffsGT,
double[][] minIdleAgentsGT,
boolean[][] canServeGT)
Constructor of the weight router.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkRandomThreshold()
Need to call this method to initialize the check matrix in order to determine
if the threshold needs to be randomized.
|
protected double |
computeScore(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).
|
String |
getDescription() |
double[][] |
getMinIdleAgentsGT()
Get the minimum idle agent threshold matrix.
|
RandomStream |
getStreamIdleAgentsThreshold()
Get the random stream used to generate the random idle agent thresholds.
|
protected boolean |
satisfyThreshold(int type,
int group)
Returns true if the number of idle agents is
greater than the randomized threshold.
|
void |
setMinIdleAgentGT(double min,
int group,
int type)
Change the min idle agent threshold of a particular group and call type.
|
void |
setMinIdleAgentsGT(double[][] min)
Change the min idle agent threshold, matrix with index [group][type].
|
void |
setStreamIdleAgentsThreshold(RandomStream s)
Set the random stream to randomized the idle agent threshold when
the value is not an integer.
|
canServe, checkWaitingQueues, computeDelayCheckTime, getCallCoeffsTG, getCanServeGT, getConstWeightsTG, getGroupCoeffsGT, getRoutingDelayConstTime, getRoutingDelayMethod, getStreamAgentSelection, getStreamContactSelection, getWaitingQueueType, needsDetailedAgentGroup, selectAgent, selectAgentRerouting, selectContact, selectWaitingQueue, setCallCoeffsTG, setCanServeGT, setConstWeightsTG, setGroupCoeffsGT, setRoutingDelayConstTime, setRoutingDelayMethod, setStreamAgentSelection, setStreamContactSelection
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 double[][] minIdleAgents
protected double[][] randomThreshold
protected RandomStream streamThreshold
public WeightRoutingThreshold.WeightRouterThreshold(int numTypes, int numGroups, double[][] constWeightsTG, double[][] callCoeffsTG, double[][] groupCoeffsGT, double[][] minIdleAgentsGT, boolean[][] canServeGT)
numTypes
- the number of call types.numGroups
- the number of agent groups.constWeightsTG
- the constant weight matrix, if null
then it will
use an all-zero matrix.callCoeffsTG
- the call waiting time coefficient matrix, if null
then it
will use an all-one matrix.groupCoeffsGT
- the group idle time coefficient matrix, if null
then it
will use an all-one matrix.canServeGT
- a matrix with indices [group][call type]
.
The element at index [i][j]
is true
if group i
can serve call type j
.public String getDescription()
getDescription
in class WeightRouting.WeightRouter
public void setStreamIdleAgentsThreshold(RandomStream s)
s
- the random stream to be used to generate the random thresholds.public RandomStream getStreamIdleAgentsThreshold()
protected void checkRandomThreshold()
public void setMinIdleAgentsGT(double[][] min)
min
- the new threshold, matrix with index [group][type].public void setMinIdleAgentGT(double min, int group, int type)
min
- the new threshold.group
- the group to change.type
- the call type to change.public double[][] getMinIdleAgentsGT()
protected boolean satisfyThreshold(int type, int group)
type
- the call type to check.group
- the agent group to check.protected double computeScore(int type, int group)
Double.NEGATIVE_INFINITY
.
Implementation note : This score function should not be used when a new call just arrived,
because new calls do not enter the waiting queue immediately on arrival.
For new call, use the score functio computeScoreNewContact(int, int)
.computeScore
in class WeightRouting.WeightRouter
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.computeScoreNewContact
in class WeightRouting.WeightRouter
type
- the call type of the new call.group
- the agent group.