|
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.ctmc.CallCenterCTMCKI
public class CallCenterCTMCKI
CTMC model of a call center with multiple call types and agent groups.
Constructor Summary | |
---|---|
CallCenterCTMCKI(double[] lambda,
double[] lambdaBound,
double[][] mu,
double[][] muBound,
int[] numAgents,
int[] maxNumAgents,
double[] rho,
double[] nu,
double[] nuBound,
int queueCapacity,
int maxQueueCapacity,
AgentGroupSelector[] ags,
WaitingQueueSelector[] wqs,
boolean needsInServiceContactMix,
int[][] thresholds)
|
Method Summary | |
---|---|
CallCenterCTMCKI |
clone()
Returns an independent copy of this call center CTMC. |
protected CCEvent |
createEvent(double minU,
double maxU,
int size,
int maxBits,
int lqidx)
|
protected static CCEvent |
createEventF(StateThresh stateThresh,
double minU,
double maxU,
int size,
int maxBits,
int lqidx,
CCEvent lookupEvent)
|
boolean |
equalsState(Object obj)
Determines if the state of this CTMC is the same as the state of the CTMC o. |
void |
generateAbandonment(int k,
int kpos,
int np1,
int nf1)
Generates the abandonment of the kposth contact of type k. |
void |
generateArrival(int k,
int np1,
int nf1)
Generates the arrival of a contact of type k being blocked or balking. |
void |
generateArrivalQueued(int k,
int np1,
int nf1)
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 np1,
int nf1)
Generates the arrival of a contact of type k served by an agent in group i. |
void |
generateEndService(int k,
int i,
int np1,
int nf1)
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 np1,
int nf1)
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 np1,
int nf1)
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 CallCenterCTMC.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 CallCenterCTMC.nextState(double) method. |
int |
getLastSelectedQueuedContactType()
Returns the type of the last contact removed from a waiting queue for service by the CallCenterCTMC.nextState(double) method. |
TransitionType |
getLastTransitionType()
Returns the type of the last transition, or null if no transition occurred since the last call to CallCenterCTMC.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 rv)
Similar to CallCenterCTMC.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 CallCenterCTMC.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 CallCenterCTMC.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 rv)
Similar to CallCenterCTMC.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[] maxNumAgents)
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. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CallCenterCTMCKI(double[] lambda, double[] lambdaBound, double[][] mu, double[][] muBound, int[] numAgents, int[] maxNumAgents, double[] rho, double[] nu, double[] nuBound, int queueCapacity, int maxQueueCapacity, AgentGroupSelector[] ags, WaitingQueueSelector[] wqs, boolean needsInServiceContactMix, int[][] thresholds)
Method Detail |
---|
protected static CCEvent createEventF(StateThresh stateThresh, double minU, double maxU, int size, int maxBits, int lqidx, CCEvent lookupEvent)
protected CCEvent createEvent(double minU, double maxU, int size, int maxBits, int lqidx)
public int getNumAgentGroups()
CallCenterCTMC
getNumAgentGroups
in interface CallCenterCTMC
public int getNumContactsInQueue()
CallCenterCTMC
getNumContactsInQueue
in interface CallCenterCTMC
public int getNumContactsInQueue(int k)
CallCenterCTMC
getNumContactsInQueue
in interface CallCenterCTMC
k
- the tested contact type.
public int getNumContactTypes()
CallCenterCTMC
getNumContactTypes
in interface CallCenterCTMC
public double getJumpRate()
CallCenterCTMC
getJumpRate
in interface CallCenterCTMC
public int getQueueCapacity()
CallCenterCTMC
getQueueCapacity
in interface CallCenterCTMC
public void setQueueCapacity(int q)
CallCenterCTMC
setQueueCapacity
in interface CallCenterCTMC
q
- the new queue capacity.public int getMaxQueueCapacity()
CallCenterCTMC
getMaxQueueCapacity
in interface CallCenterCTMC
public void setMaxQueueCapacity(int q)
CallCenterCTMC
CallCenterCTMC.setQueueCapacity(int)
instead.
setMaxQueueCapacity
in interface CallCenterCTMC
q
- the new maximal queue capacity.public double getArrivalRate(int k)
CallCenterCTMC
getArrivalRate
in interface CallCenterCTMC
k
- the tested contact type.
public void setArrivalRate(int k, double rate)
CallCenterCTMC
setArrivalRate
in interface CallCenterCTMC
k
- the contact type.rate
- the arrival rate.public void setArrivalRates(double[] rates)
CallCenterCTMC
setArrivalRates
in interface CallCenterCTMC
rates
- the arrival rates.public double getArrivalRate()
CallCenterCTMC
getArrivalRate
in interface CallCenterCTMC
public double getMaxArrivalRate(int k)
CallCenterCTMC
getMaxArrivalRate
in interface CallCenterCTMC
k
- the tested contact type.
public void setMaxArrivalRate(int k, double rate)
CallCenterCTMC
double)
instead.
setMaxArrivalRate
in interface CallCenterCTMC
k
- the contact type.rate
- the arrival rate.public void setMaxArrivalRates(double[] rates)
CallCenterCTMC
setMaxArrivalRates
in interface CallCenterCTMC
rates
- the arrival rates.public double getMaxArrivalRate()
CallCenterCTMC
getMaxArrivalRate
in interface CallCenterCTMC
public TransitionType getLastTransitionType()
CallCenterCTMC
CallCenterCTMC.initEmpty()
.
getLastTransitionType
in interface CallCenterCTMC
public int getLastSelectedAgentGroup()
CallCenterCTMC
CallCenterCTMC.nextState(double)
method.
getLastSelectedAgentGroup
in interface CallCenterCTMC
public int getLastSelectedContactType()
CallCenterCTMC
CallCenterCTMC.nextState(double)
method.
getLastSelectedContactType
in interface CallCenterCTMC
public int getLastSelectedContact()
CallCenterCTMC
CallCenterCTMC.getLastSelectedContactType()
, and
Qk is the number of contacts of type k in queue.
getLastSelectedContact
in interface CallCenterCTMC
public int getLastSelectedQueuedContactType()
CallCenterCTMC
CallCenterCTMC.nextState(double)
method.
getLastSelectedQueuedContactType
in interface CallCenterCTMC
public int getNumAgents()
CallCenterCTMC
getNumAgents
in interface CallCenterCTMC
public int getNumAgents(int i)
CallCenterCTMC
getNumAgents
in interface CallCenterCTMC
i
- the tested agent group.
public int getMaxNumAgents()
CallCenterCTMC
getMaxNumAgents
in interface CallCenterCTMC
public int getMaxNumAgents(int i)
CallCenterCTMC
getMaxNumAgents
in interface CallCenterCTMC
i
- the tested agent group.
public void setNumAgents(int i, int n)
CallCenterCTMC
setNumAgents
in interface CallCenterCTMC
i
- the tested agent group.n
- the new number of agents in the group.public int[] getMaxNumAgentsArray()
CallCenterCTMC
getMaxNumAgentsArray
in interface CallCenterCTMC
public int[] getNumAgentsArray()
CallCenterCTMC
getNumAgentsArray
in interface CallCenterCTMC
public void setMaxNumAgents(int i, int n)
CallCenterCTMC
CallCenterCTMC.getJumpRate()
to increase so it should never be called
during the simulation of the CTMC.
setMaxNumAgents
in interface CallCenterCTMC
i
- the tested agent group.n
- the new maximal number of agents in the group.public void setMaxNumAgents(int[] maxNumAgents)
CallCenterCTMC
setMaxNumAgents
in interface CallCenterCTMC
maxNumAgents
- the array containing the number of agents.public void setNumAgents(int[] numAgents)
CallCenterCTMC
setNumAgents
in interface CallCenterCTMC
numAgents
- the array containing the number of agents.public int getNumStateThresh()
CallCenterCTMC
getNumStateThresh
in interface CallCenterCTMC
public StateThresh getStateThresh()
CallCenterCTMC
getStateThresh
in interface CallCenterCTMC
public int[][] getStateThresholds()
CallCenterCTMC
getStateThresholds
in interface CallCenterCTMC
public void setStateThresholds(int[][] thresholds)
CallCenterCTMC
setStateThresholds
in interface CallCenterCTMC
thresholds
- the matrix of thresholds.public double[][] getRanksTG()
CallCenterCTMC
getRanksTG
in interface CallCenterCTMC
public double[][] getRanksGT()
CallCenterCTMC
getRanksGT
in interface CallCenterCTMC
public double getPatienceRate(int k)
CallCenterCTMC
getPatienceRate
in interface CallCenterCTMC
k
- the tested contact type.
public void setPatienceRate(int k, double nuk)
CallCenterCTMC
setPatienceRate
in interface CallCenterCTMC
k
- the affected contact type.nuk
- the new value of νk.public double getMaxPatienceRate(int k)
CallCenterCTMC
getMaxPatienceRate
in interface CallCenterCTMC
k
- the tested contact type.
public void setMaxPatienceRate(int k, double nuk)
CallCenterCTMC
CallCenterCTMC.setPatienceRate(int,double)
instead.
setMaxPatienceRate
in interface CallCenterCTMC
k
- the affected contact type.nuk
- the new patience rate.public double getProbBalking(int k)
CallCenterCTMC
getProbBalking
in interface CallCenterCTMC
k
- the tested contact type.
public void setProbBalking(int k, double rhok)
CallCenterCTMC
setProbBalking
in interface CallCenterCTMC
k
- the affected contact type.rhok
- the new value of ρk.public int getNumTransitionsDone()
CallCenterCTMC
CallCenterCTMC.nextState(double)
method was called
since the last call to CallCenterCTMC.initEmpty()
.
getNumTransitionsDone
in interface CallCenterCTMC
public int getNumPrecedingFalseTransitions()
CallCenterCTMC
CallCenterCTMC.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
CallCenterCTMC.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.
getNumPrecedingFalseTransitions
in interface CallCenterCTMC
CallCenterCTMC.nextState(double)
before the main transition.public int getNumFollowingFalseTransitions()
CallCenterCTMC
CallCenterCTMC.getNumPrecedingFalseTransitions()
, but for
the number of false transitions generated after the
main transition.
getNumFollowingFalseTransitions
in interface CallCenterCTMC
CallCenterCTMC.nextState(double)
after the main transition.public int getNumContactsInService()
CallCenterCTMC
getNumContactsInService
in interface CallCenterCTMC
public int getNumContactsInService(int k, int i)
CallCenterCTMC
getNumContactsInService
in interface CallCenterCTMC
k
- the tested contact type.i
- the tested agent group.
public int getNumContactsInServiceI(int i)
CallCenterCTMC
getNumContactsInServiceI
in interface CallCenterCTMC
i
- the tested agent group.
public int getNumContactsInServiceK(int k)
CallCenterCTMC
getNumContactsInServiceK
in interface CallCenterCTMC
k
- the tested contact type.
public double getServiceRate(int k, int i)
CallCenterCTMC
getServiceRate
in interface CallCenterCTMC
k
- the tested contact type.i
- the tested agent group.
public void setServiceRate(int k, int i, double muki)
CallCenterCTMC
setServiceRate
in interface CallCenterCTMC
k
- the affected contact type.i
- the affected agent group.muki
- the new service rate.public double getMaxServiceRate(int k, int i)
CallCenterCTMC
getMaxServiceRate
in interface CallCenterCTMC
k
- the tested contact type.i
- the tested agent group.
public void setMaxServiceRate(int k, int i, double muki)
CallCenterCTMC
CallCenterCTMC.setServiceRate(int,int,double)
instead.
setMaxServiceRate
in interface CallCenterCTMC
k
- the affected contact type.i
- the affected agent group.muki
- the new maximal service rate.public void initEmpty()
CallCenterCTMC
initEmpty
in interface CallCenterCTMC
public void init(CallCenterCTMC ctmc)
CallCenterCTMC
IllegalArgumentException
if the given CTMC is incompatible with this CTMC, e.g.,
the number of contact types or agent groups differ.
init
in interface CallCenterCTMC
ctmc
- the CTMC to initialize the state from.public boolean selectContact(int i)
CallCenterCTMC
CallCenterCTMC.getLastSelectedAgentGroup()
returns the value of i while
CallCenterCTMC.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.
selectContact
in interface CallCenterCTMC
i
- the agent group index.
public TransitionType nextState(double u)
CallCenterCTMC
CallCenterCTMC.getLastSelectedContactType()
,
CallCenterCTMC.getLastSelectedQueuedContactType()
, or
CallCenterCTMC.getLastSelectedAgentGroup()
.
nextState
in interface CallCenterCTMC
u
- the uniform used to generate the new state.
public TransitionType nextStateInt(int rv)
CallCenterCTMC
CallCenterCTMC.nextState(double)
, except that
the given random variate v is uniformly distributed
over
[0, 231 - 1].
nextStateInt
in interface CallCenterCTMC
rv
- the uniform random integer.
public TransitionType getNextTransition(double u)
CallCenterCTMC
CallCenterCTMC.nextState(double)
,
except that it does not alter the state of the CTMC.
getNextTransition
in interface CallCenterCTMC
u
- the random number for the state generation.
public TransitionType getNextTransitionInt(int rv)
CallCenterCTMC
CallCenterCTMC.getNextTransition(double)
,
using a random integer rather than a uniform
number.
getNextTransitionInt
in interface CallCenterCTMC
rv
- the random number used for generating the transition.
public void generateArrivalQueued(int k, int np1, int nf1)
CallCenterCTMC
IllegalStateException
if
the queue is full before the arrival.
generateArrivalQueued
in interface CallCenterCTMC
k
- the type of the new contact.np1
- the number of false transitions preceding the main
transition.nf1
- the number of false transitions following the main
transition.public void generateArrivalServed(int k, int i, int np1, int nf1)
CallCenterCTMC
IllegalStateException
.
generateArrivalServed
in interface CallCenterCTMC
k
- the contact type.i
- the agent group.np1
- the number of false transitions preceding the main
transition.nf1
- the number of false transitions following the main
transition.public void generateEndService(int k, int i, int kp, int np1, int nf1)
CallCenterCTMC
IllegalStateException
.
generateEndService
in interface CallCenterCTMC
k
- the type of the contact ending service.i
- the group of the agent ending service.kp
- the type of the dequeued contact.np1
- the number of false transitions preceding the main
transition.nf1
- the number of false transitions following the main
transition.public void generateEndService(int k, int i, int np1, int nf1)
CallCenterCTMC
IllegalStateException
.
generateEndService
in interface CallCenterCTMC
k
- the type of the contact.i
- the group of the agent.np1
- the number of false transitions preceding the main
transition.nf1
- the number of false transitions following the main
transition.public void generateFalseTransition(int np1, int nf1)
CallCenterCTMC
generateFalseTransition
in interface CallCenterCTMC
np1
- the number of false transitions preceding the main
transition.nf1
- the number of false transitions following the main
transition.public void generateAbandonment(int k, int kpos, int np1, int nf1)
CallCenterCTMC
IllegalStateException
if kpos is negative or greater than or equal
to the number of queued contacts of type k.
generateAbandonment
in interface CallCenterCTMC
k
- the contact type.kpos
- the position of the contact in queue.np1
- the number of false transitions preceding the main
transition.nf1
- the number of false transitions following the main
transition.public void generateArrival(int k, int np1, int nf1)
CallCenterCTMC
generateArrival
in interface CallCenterCTMC
k
- the type of the arrival.np1
- the number of false transitions preceding the main
transition.nf1
- the number of false transitions following the main
transition.public CallCenterCTMCKI clone()
CallCenterCTMC
CallCenterCTMC.nextState(double)
on the returned CTMC should not affect the state of any other
CTMC.
clone
in interface CallCenterCTMC
clone
in class Object
public boolean equalsState(Object obj)
CallCenterCTMC
equalsState
in interface CallCenterCTMC
obj
- the object to test.
public int hashCodeState()
CallCenterCTMC
hashCodeState
in interface CallCenterCTMC
public String toString()
toString
in class Object
public int getTargetNumTransitions()
CallCenterCTMC
CallCenterCTMC.nextState(double)
or CallCenterCTMC.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
CallCenterCTMC.getNumTransitionsDone()
is greater than or equal to the
value returned by this method,
CallCenterCTMC.nextState(double)
, and
CallCenterCTMC.nextStateInt(int)
throw an IllegalStateException
.
The default target number of
transitions is Integer.MAX_VALUE
.
getTargetNumTransitions
in interface CallCenterCTMC
public void setTargetNumTransitions(int tntr)
CallCenterCTMC
setTargetNumTransitions
in interface CallCenterCTMC
tntr
- the new target number of transitions.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |