public class WeightRoutingThreshold extends Object
This version adds the minimum idle agent threshold to the weight routing policy.
It implements the same randomized threshold policy as MinIdleAgentsRouting
.
This adds a new condition to WeightRouting
such that
an idle agent of group i cannot serve a call of type k if the number
of idle agents is equal or less than mk, i.
Note that the frequency of the delay can affect the behavior of the randomized
threshold policy since a random value is generated at each decision epoch (which
includes delay check). Although not satisfying the threshold will not create
a delay check event (because the score would be minus infinity), the delay
check event can be created by another group.
If the delay check time interval is short, then there is a higher chance that
one delay event will generate the lower bound value of the threshold.
Note that this router considers an agent idle if he is free and ready to receive a
new call. This number corresponds to the value returned by the function
AgentGroup.getNumFreeAgents()
.
In particular, if the agent is busy working on an after service task, then
he is not considered idle by the router.
The user must input 3 matrices :
The score ck, i of pair (type k, group i) is :
The router works as follows. Set c = maxk, i{ck, i} as the maximum of all the score at current time. If c = cbar(k), bar(i) >= 0 then the router will assign the longest-waiting call of type bar(k) to the longest-idle agent of group bar(i). If c < 0 then the router does nothing. We should assume that ck, i = - ∞ if group i cannot serve call type k, if there are no call of type k waiting, or if the are no idle agent of group i.
The user must use the routing policy name WEIGHTROUTING, and give the 3 numberArray matrices named constWeightsTG, callCoeffsTG and groupCoeffsGT and a boolean matrix named canServeGT. The suffix "TG" represents a matrix of size K×I (each row represents a call type). And the suffix "GT" defines a matrix of size I×K with each row representing an agent group.
The boolean matrix canServeGT of size I×K is used to define if group i can serve call type k or not. In order to have access to the longest-idle time of the agents, the user must use DetailedAgentGroup (set detailed to true).
Optional: The user can select the delay check method and the check delay time if the user choose a constant check method. In the properties, the user should give an integer parameter with the name checkDelayMethod to choose the method and the value corresponds to the constant number of the method. To choose the check time interval, the user must give a number parameter named checkDelayConstTime. This duration must be expressed using the same unit time as the simulation time unit. If these parameters are omitted, then the router will take the default parameters.
Implementation note : Because of the design of the Router, we separate the score function in two cases : new call arrival and otherwise. The case of a new call arrival is particular because the longest waiting time is 0 (if there are no calls in the waiting queue), yet the score function is not - ∞.
This routing policy normally considers that all calls first enter the waiting queue. However, this is more complicate to do with our simulator.
Modifier and Type | Class and Description |
---|---|
static class |
WeightRoutingThreshold.WeightRouterThreshold |
static class |
WeightRoutingThreshold.WeightRouterThresholdFactory |