|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CallCenterCTMC
Represents a continuous-time Markov chain (CTMC) modeling a call center with possibly multiple call types and agent groups. More specifically, calls are divided into K types, and are served by agents partitionned into I groups. Each agent group i = 0,…, I - 1 has a skillset Si⊆{1,…, K} giving the types of the calls the agents can serve. Callers arriving when no agent is available join a waiting queue, and can abandon if they do not receive service fast enough.
For each k = 0,…, K - 1, we suppose that calls of type k arrive following a Poisson process with rate λk. Service times for calls of type k served by agents in group i are i.i.d. exponential with rate μk, i. A call of type k not served immediately can balk (abandon immediately) with probability ρk. The patience times of callers of type k joining the queue without balking are i.i.d. exponential with rate νk. Moreover, for each i = 0,…, I - 1, agent group i contains Ni agents.
A router is used to assign agents to new calls, and queued calls to
free agents using either static lists, or matrices of priorities.
See AgentGroupSelector
, and WaitingQueueSelector
for
more information.
If no agent group contains free agents, the call joins a waiting
queue specific to its type (and possibly balks).
Abandoning calls are lost.
This interface specifies methods to obtain information about the modelled call center as well as methods to initialize the CTMC, and generate the next state randomly from the current state.
Method Summary | |
---|---|
CallCenterCTMC |
clone()
Returns an independent copy of this call center CTMC. |
boolean |
equalsState(Object o)
Determines if the state of this CTMC is the same as the state of the CTMC o. |
void |
generateAbandonment(int k,
int kpos,
int np,
int nf)
Generates the abandonment of the kposth contact of type k. |
void |
generateArrival(int k,
int np,
int nf)
Generates the arrival of a contact of type k being blocked or balking. |
void |
generateArrivalQueued(int k,
int np,
int nf)
Generates the arrival of a contact of type k, and adds the new contact to the waiting queue. |
void |
generateArrivalServed(int k,
int i,
int np,
int nf)
Generates the arrival of a contact of type k served by an agent in group i. |
void |
generateEndService(int k,
int i,
int np,
int nf)
Generates the end of the service for a contact of type k served by an agent in group i. |
void |
generateEndService(int k,
int i,
int kp,
int np,
int nf)
Generates the end of the service for a contact of type k served by an agent in group i, and assigns the kposth queued contact of type kp to the free agent. |
void |
generateFalseTransition(int np,
int nf)
Generates a false transition. |
double |
getArrivalRate()
Returns the total arrival rate λ = ![]() |
double |
getArrivalRate(int k)
Returns the arrival rate λk for contacts of type k. |
double |
getJumpRate()
Returns the uniformized transition rate used by this CTMC. |
int |
getLastSelectedAgentGroup()
Returns the last agent group selected by the nextState(double) method. |
int |
getLastSelectedContact()
Returns the index of the last selected contact having abandoned. |
int |
getLastSelectedContactType()
Returns the last contact type selected by the nextState(double) method. |
int |
getLastSelectedQueuedContactType()
Returns the type of the last contact removed from a waiting queue for service by the nextState(double) method. |
TransitionType |
getLastTransitionType()
Returns the type of the last transition, or null if no transition occurred since the last call to initEmpty() . |
double |
getMaxArrivalRate()
Returns the total maximal arrival rate ![]() ![]() ![]() |
double |
getMaxArrivalRate(int k)
Returns the maximal arrival rate ![]() |
int |
getMaxNumAgents()
Returns the maximal total number of agents that can be used for the CTMC. |
int |
getMaxNumAgents(int i)
Returns the maximal number of agents in group i. |
int[] |
getMaxNumAgentsArray()
Returns an array of length I containing the maximal number of agents in each agent group. |
double |
getMaxPatienceRate(int k)
Returns the maximal patience rate ![]() |
int |
getMaxQueueCapacity()
Returns the current bound on the queue capacity used to determine the transition rate of the CTMC. |
double |
getMaxServiceRate(int k,
int i)
Returns the maximal service rate ![]() |
TransitionType |
getNextTransition(double u)
Returns the type of the next transition generated using the random number u. |
TransitionType |
getNextTransitionInt(int u)
Similar to getNextTransition(double) ,
using a random integer rather than a uniform
number. |
int |
getNumAgentGroups()
Returns the number of agent groups used in the modelled call center. |
int |
getNumAgents()
Returns the total number of agents available for serving contacts. |
int |
getNumAgents(int i)
Returns the number of agents in group i. |
int[] |
getNumAgentsArray()
Returns an array of length I containing the number of agents in each agent group. |
int |
getNumContactsInQueue()
Returns the total number of contacts currently waiting in queue. |
int |
getNumContactsInQueue(int k)
Returns the number of contacts of type k currently waiting in queue. |
int |
getNumContactsInService()
Returns the total number of contacts currently served by agents. |
int |
getNumContactsInService(int k,
int i)
Returns the number of contacts of type k in service by agents in group i. |
int |
getNumContactsInServiceI(int i)
Returns the number of contacts currently in service by agents in group i. |
int |
getNumContactsInServiceK(int k)
Returns the number of contacts of type k currently in service. |
int |
getNumContactTypes()
Returns the number of contact types used in the modelled call center. |
int |
getNumFollowingFalseTransitions()
Similar to getNumPrecedingFalseTransitions() , but for
the number of false transitions generated after the
main transition. |
int |
getNumPrecedingFalseTransitions()
Returns the number of additionnal false transitions generated by the last call to nextState(double)
before the main transition. |
int |
getNumStateThresh()
Returns the number of thresholds on the state space. |
int |
getNumTransitionsDone()
Returns the number of generated transitions. |
double |
getPatienceRate(int k)
Returns the patience rate νk for contacts of type k. |
double |
getProbBalking(int k)
Returns the probability of balking ρk for contacts of type k. |
int |
getQueueCapacity()
Returns the maximal queue capacity. |
double[][] |
getRanksGT()
Returns the group-to-type matrix of ranks associating a priority to each agent group and contact type when selecting a waiting queue for a free agent. |
double[][] |
getRanksTG()
Returns the type-to-group matrix of ranks associating a priority to each contact type and agent group when selecting an agent group for a new arrival. |
double |
getServiceRate(int k,
int i)
Returns the service rate μk, i for contacts of type k served by agents in group i. |
StateThresh |
getStateThresh()
Returns the thresholds on the state of the CTMC. |
int[][] |
getStateThresholds()
Returns the R×I + 1 matrix of thresholds whose used for state space partitioning. |
int |
getTargetNumTransitions()
Returns the current target number of transitions. |
int |
hashCodeState()
Computes and returns a hash code using the current state of the CTMC. |
void |
init(CallCenterCTMC ctmc)
Initializes the state of this CTMC with the state of the other CTMC ctmc. |
void |
initEmpty()
Initializes the system to an empty call center, and resets the counter giving the number of transitions done to 0. |
TransitionType |
nextState(double u)
Generates the next state of the CTMC randomly from the current state, using the given uniform u, and changes the current state to this new state. |
TransitionType |
nextStateInt(int v)
Similar to nextState(double) , except that
the given random variate v is uniformly distributed
over
[0, 231 - 1]. |
boolean |
selectContact(int i)
Selects a new queued contact for a free agent in group i, and returns a boolean indicator determining if a contact could be selected. |
void |
setArrivalRate(int k,
double rate)
Sets the arrival rate for contacts of type k to rate. |
void |
setArrivalRates(double[] rates)
Sets the arrival rate for each contact type k to rates[k]. |
void |
setMaxArrivalRate(int k,
double rate)
Sets the maximal arrival rate for contacts of type k to rate. |
void |
setMaxArrivalRates(double[] rates)
Sets the maximal arrival rate for each contact type k to rates[k]. |
void |
setMaxNumAgents(int[] numAgents)
For each agent group i = 0,…, I - 1, sets the maximal number of agents in group i to numAgents[i]. |
void |
setMaxNumAgents(int i,
int n)
Sets the maximal number of agents in group i to n. |
void |
setMaxPatienceRate(int k,
double nuk)
Sets the maximal patience rate ![]() |
void |
setMaxQueueCapacity(int q)
Sets the bound on the queue capacity to q. |
void |
setMaxServiceRate(int k,
int i,
double muki)
Sets the maximal service rate for contacts of type k served by agents in group i to muki. |
void |
setNumAgents(int[] numAgents)
For each agent group i = 0,…, I - 1, sets the number of agents in group i to numAgents[i]. |
void |
setNumAgents(int i,
int n)
Sets the number of agents in group i to n. |
void |
setPatienceRate(int k,
double nuk)
Sets the patience rate νk for contacts of type k to nuk. |
void |
setProbBalking(int k,
double rhok)
Sets the balking probability to ρk for contacts of type k to rhok. |
void |
setQueueCapacity(int q)
Sets the capacity of the waiting queue to q. |
void |
setServiceRate(int k,
int i,
double muki)
Sets the service rate μk, i to for contacts of type k served by agents in group i to muki. |
void |
setStateThresholds(int[][] thresholds)
Sets the matrix of thresholds for this CTMC to thresholds. |
void |
setTargetNumTransitions(int tntr)
Sets the target number of transitions to tntr. |
Method Detail |
---|
void initEmpty()
void init(CallCenterCTMC ctmc)
IllegalArgumentException
if the given CTMC is incompatible with this CTMC, e.g.,
the number of contact types or agent groups differ.
ctmc
- the CTMC to initialize the state from.
IllegalArgumentException
- if the given CTMC is
not compatible with this CTMC.int getNumContactTypes()
int getNumAgentGroups()
int getNumContactsInQueue()
int getNumContactsInService()
int getNumContactsInQueue(int k)
k
- the tested contact type.
IllegalArgumentException
- if k is negative or greater than or equal to the
result of getNumContactTypes()
.int getNumContactsInServiceK(int k)
k
- the tested contact type.
IllegalArgumentException
- if k is negative or greater than or equal to the
result of getNumContactTypes()
.int getNumContactsInServiceI(int i)
i
- the tested agent group.
IllegalArgumentException
- if i is negative or greater than or equal to the
result of getNumAgentGroups()
.int getNumContactsInService(int k, int i)
k
- the tested contact type.i
- the tested agent group.
int getQueueCapacity()
void setQueueCapacity(int q)
q
- the new queue capacity.
IllegalArgumentException
- if
the new capacity is smaller than the current
number of contacts in queue, returned
by getNumContactsInQueue()
, or larger
than the maximum returned by getMaxQueueCapacity()
.int getMaxQueueCapacity()
void setMaxQueueCapacity(int q)
setQueueCapacity(int)
instead.
q
- the new maximal queue capacity.
IllegalArgumentException
- if q
is smaller than the queue capacity returned by
getQueueCapacity()
.int getNumStateThresh()
int[][] getStateThresholds()
void setStateThresholds(int[][] thresholds)
thresholds
- the matrix of thresholds.
NullPointerException
- if thresholds is
null.
IllegalArgumentException
- if thresholds
has invalid dimensions.StateThresh getStateThresh()
double getArrivalRate(int k)
k
- the tested contact type.
IllegalArgumentException
- if k is negative or greater than or equal to the
result of getNumContactTypes()
.void setArrivalRate(int k, double rate)
k
- the contact type.rate
- the arrival rate.
IllegalArgumentException
- if rate is
negative, or greater than the bound
returned by getMaxArrivalRate(int)
.void setArrivalRates(double[] rates)
rates
- the arrival rates.
IllegalArgumentException
- if rates does
not have length K, contains at least one negative element,
or if rates[k] is greater than the result of
getMaxArrivalRate
(k)
for at least one k.double getArrivalRate()
double getMaxArrivalRate(int k)
k
- the tested contact type.
IllegalArgumentException
- if k is negative or greater than or equal to the
result of getNumContactTypes()
.void setMaxArrivalRate(int k, double rate)
double)
instead.
k
- the contact type.rate
- the arrival rate.
IllegalArgumentException
- if rate is
smaller than the rate returned by getArrivalRate(int)
.void setMaxArrivalRates(double[] rates)
rates
- the arrival rates.
IllegalArgumentException
- if rates does
not have length K, orif rates[k] is smaller than the result of
getArrivalRate
(k)
for at least one k.double getMaxArrivalRate()
double getProbBalking(int k)
k
- the tested contact type.
IllegalArgumentException
- if k is negative or greater than or equal to the
result of getNumContactTypes()
.void setProbBalking(int k, double rhok)
k
- the affected contact type.rhok
- the new value of ρk.
IllegalArgumentException
- if rhok
is negative or greater than 1.double getPatienceRate(int k)
k
- the tested contact type.
IllegalArgumentException
- if k is negative or greater than or equal to the
result of getNumContactTypes()
.void setPatienceRate(int k, double nuk)
k
- the affected contact type.nuk
- the new value of νk.
IllegalArgumentException
- if k is out of range,
nuk is negative, or
nuk is greater than the maximum
returned by getMaxPatienceRate(int)
.double getMaxPatienceRate(int k)
k
- the tested contact type.
IllegalArgumentException
- if k is negative or greater than or equal to the
result of getNumContactTypes()
.void setMaxPatienceRate(int k, double nuk)
setPatienceRate(int,double)
instead.
k
- the affected contact type.nuk
- the new patience rate.
IllegalArgumentException
- if nuk
is smaller than the result of getPatienceRate(int)
,
or if k is out of range.double getServiceRate(int k, int i)
k
- the tested contact type.i
- the tested agent group.
IllegalArgumentException
- if k or
i are out of range.void setServiceRate(int k, int i, double muki)
k
- the affected contact type.i
- the affected agent group.muki
- the new service rate.
IllegalArgumentException
- if k or
i are out of range, if muki is
negative, or if muki is greater than
the maximum returned by getMaxServiceRate(int,int)
.double getMaxServiceRate(int k, int i)
k
- the tested contact type.i
- the tested agent group.
IllegalArgumentException
- if k or
i are out of range.void setMaxServiceRate(int k, int i, double muki)
setServiceRate(int,int,double)
instead.
k
- the affected contact type.i
- the affected agent group.muki
- the new maximal service rate.
IllegalArgumentException
- if k or
i are out of range, or if muki
is smaller than the service rate returned
by getServiceRate(int,int)
.double getJumpRate()
int getNumAgents()
int getMaxNumAgents()
int getNumAgents(int i)
i
- the tested agent group.
IllegalArgumentException
- if i is negative or greater than or equal to the
result of getNumAgentGroups()
.int[] getNumAgentsArray()
int getMaxNumAgents(int i)
i
- the tested agent group.
int[] getMaxNumAgentsArray()
void setNumAgents(int i, int n)
i
- the tested agent group.n
- the new number of agents in the group.
IllegalArgumentException
- if i is negative or greater than or equal to the
result of getNumAgentGroups()
, or if n is
negative.void setNumAgents(int[] numAgents)
numAgents
- the array containing the number of agents.
IllegalArgumentException
- if numAgents has
a length different from I, or if it contains at least one
negative value.void setMaxNumAgents(int i, int n)
getJumpRate()
to increase so it should never be called
during the simulation of the CTMC.
i
- the tested agent group.n
- the new maximal number of agents in the group.
IllegalArgumentException
- if i is negative or greater than or equal to the
result of getNumAgentGroups()
, or if n is
negative.void setMaxNumAgents(int[] numAgents)
numAgents
- the array containing the number of agents.
IllegalArgumentException
- if numAgents has
a length different from I, or if it contains at least one
negative value.double[][] getRanksTG()
double[][] getRanksGT()
TransitionType getLastTransitionType()
initEmpty()
.
int getLastSelectedContactType()
nextState(double)
method.
int getLastSelectedContact()
getLastSelectedContactType()
, and
Qk is the number of contacts of type k in queue.
int getLastSelectedAgentGroup()
nextState(double)
method.
int getLastSelectedQueuedContactType()
nextState(double)
method.
TransitionType nextState(double u)
getLastSelectedContactType()
,
getLastSelectedQueuedContactType()
, or
getLastSelectedAgentGroup()
.
u
- the uniform used to generate the new state.
TransitionType nextStateInt(int v)
nextState(double)
, except that
the given random variate v is uniformly distributed
over
[0, 231 - 1].
v
- the uniform random integer.
TransitionType getNextTransition(double u)
nextState(double)
,
except that it does not alter the state of the CTMC.
u
- the random number for the state generation.
TransitionType getNextTransitionInt(int u)
getNextTransition(double)
,
using a random integer rather than a uniform
number.
u
- the random number used for generating the transition.
void generateArrivalServed(int k, int i, int np, int nf)
IllegalStateException
.
k
- the contact type.i
- the agent group.np
- the number of false transitions preceding the main
transition.nf
- the number of false transitions following the main
transition.
IllegalStateException
- if all agents in group i
are busy.void generateArrivalQueued(int k, int np, int nf)
IllegalStateException
if
the queue is full before the arrival.
k
- the type of the new contact.np
- the number of false transitions preceding the main
transition.nf
- the number of false transitions following the main
transition.
IllegalStateException
- if the queue capacity is
exceeded.void generateArrival(int k, int np, int nf)
k
- the type of the arrival.np
- the number of false transitions preceding the main
transition.nf
- the number of false transitions following the main
transition.void generateEndService(int k, int i, int np, int nf)
IllegalStateException
.
k
- the type of the contact.i
- the group of the agent.np
- the number of false transitions preceding the main
transition.nf
- the number of false transitions following the main
transition.
IllegalStateException
- if no contact of type k is
in service by agents in group i.void generateEndService(int k, int i, int kp, int np, int nf)
IllegalStateException
.
k
- the type of the contact ending service.i
- the group of the agent ending service.kp
- the type of the dequeued contact.np
- the number of false transitions preceding the main
transition.nf
- the number of false transitions following the main
transition.void generateAbandonment(int k, int kpos, int np, int nf)
IllegalStateException
if kpos is negative or greater than or equal
to the number of queued contacts of type k.
k
- the contact type.kpos
- the position of the contact in queue.np
- the number of false transitions preceding the main
transition.nf
- the number of false transitions following the main
transition.boolean selectContact(int i)
getLastSelectedAgentGroup()
returns the value of i while
getLastSelectedQueuedContactType()
returns the type of the contact assigned
to the free agent.
This method can be used, e.g., when agents
are added in some groups during a simulation.
i
- the agent group index.
void generateFalseTransition(int np, int nf)
np
- the number of false transitions preceding the main
transition.nf
- the number of false transitions following the main
transition.int getNumPrecedingFalseTransitions()
nextState(double)
before the main transition.
Some implementation of this interface might
generate several false transitions using a single
random number. In this case, the call to
nextState(double)
will return a transition type while
this method should be used to obtain the number of
additional false transitions that were generated
before the main transition.
nextState(double)
before the main transition.int getNumFollowingFalseTransitions()
getNumPrecedingFalseTransitions()
, but for
the number of false transitions generated after the
main transition.
nextState(double)
after the main transition.int getNumTransitionsDone()
nextState(double)
method was called
since the last call to initEmpty()
.
CallCenterCTMC clone()
nextState(double)
on the returned CTMC should not affect the state of any other
CTMC.
int hashCodeState()
boolean equalsState(Object o)
o
- the object to test.
int getTargetNumTransitions()
nextState(double)
or nextStateInt(int)
generate several false transitions with
a single random number.
When the number of transitions done is
near the target number of transitions,
the final number of transitions may then
exceed the target.
When a target number of transition is
specified, no more state change occur
after the target is reach.
Moreover,
when the return value of
getNumTransitionsDone()
is greater than or equal to the
value returned by this method,
nextState(double)
, and
nextStateInt(int)
throw an IllegalStateException
.
The default target number of
transitions is Integer.MAX_VALUE
.
void setTargetNumTransitions(int tntr)
tntr
- the new target number of transitions.
IllegalArgumentException
- if tntr
is negative.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |