ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.ctmc
Class StateThresh

java.lang.Object
  extended by umontreal.iro.lecuyer.contactcenters.ctmc.StateThresh
All Implemented Interfaces:
Cloneable

public class StateThresh
extends Object
implements Cloneable

Represents thresholds on the queue size, and the number of agents in each group. The transition rate, and the distribution for the number of successive self jumps preceding any transition are also computed and stored.


Constructor Summary
StateThresh(CallCenterCTMC ctmc, int[][] thresholds)
          Constructs a new state thresholds object using the given thresholds on the queue size and agent groups.
 
Method Summary
 StateThresh clone()
           
 double getJumpRate(int r)
          Returns the transition rate corresponding to vector of thresholds with index r.
 GeometricDist getNumFalseTrDist(int r)
          Returns the geometric distribution for the successive number of self jumps before any transition, while the queue size and number of agents are smaller than or equal to to thresholds with index r.
 int getNumVectorsOfThresholds()
          Returns the number of vectors of thresholds stored by this object.
 int getOperatingMode()
          Returns the current operating mode.
 int[][] getThreshNumAgents()
          Returns a 2D array containing the thresholds on the number of agents.
 int getThreshNumAgents(int r, int i)
          Returns the threshold on the number of agents in group i corresponding to vector with index r.
 int[] getThreshQueueSize()
          Returns the array of thresholds on the queue size.
 int getThreshQueueSize(int r)
          Returns the threshold on the queue size corresponding to vector with index r.
 void initOperatingMode(CallCenterCTMC ctmc)
          Determines the current operating mode r depending on the state of the given CTMC ctmc.
 boolean updateOperatingMode(CallCenterCTMC ctmc, TransitionType type)
          Updates the current vector of thresholds after a transition of type type of the CTMC model ctmc.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateThresh

public StateThresh(CallCenterCTMC ctmc,
                   int[][] thresholds)
Constructs a new state thresholds object using the given thresholds on the queue size and agent groups. This constructor accepts a CTMC ctmc, a matrix of thresholds thresholds on the number of agents, and the queue size. Elements thresholds[r][i], for i = 0,…, I - 1, give the rth threshold on the number of agents in group i, while element thresholds[r][I], the threshold on queue size. If thresholds is null, a single vector of thresholds ($ \tilde{N}_{0}^{}$,…,$ \tilde{N}_{{I-1}}^{}$, H) is used. This vector of thresholds is also added if thresholds is not null, and the vector is not present in the 2D array thresholds.

Parameters:
ctmc - the call center CTMC.
thresholds - the thresholds on the number of agents, and queue size.
Throws:
IllegalArgumentException - if thresholds has invalid dimensions, or contains a negative value.
Method Detail

getNumVectorsOfThresholds

public int getNumVectorsOfThresholds()
Returns the number of vectors of thresholds stored by this object.

Returns:
the number of vectors of thresholds.

getJumpRate

public double getJumpRate(int r)
Returns the transition rate corresponding to vector of thresholds with index r.

Parameters:
r - the index of the vector of thresholds.
Returns:
the corresponding transition rate.

getNumFalseTrDist

public GeometricDist getNumFalseTrDist(int r)
Returns the geometric distribution for the successive number of self jumps before any transition, while the queue size and number of agents are smaller than or equal to to thresholds with index r.

Parameters:
r - the index of the vector of thresholds.
Returns:
the distribution of the successive number of self jumps before any transition.

getThreshNumAgents

public int getThreshNumAgents(int r,
                              int i)
Returns the threshold on the number of agents in group i corresponding to vector with index r.

Parameters:
r - the index of the vector of thresholds.
i - the index of the agent group.
Returns:
the value of the threshold.

getThreshNumAgents

public int[][] getThreshNumAgents()
Returns a 2D array containing the thresholds on the number of agents. Element [r][i] of the array gives the threshold with index r for agent group i.

Returns:
the array of thresholds.

getThreshQueueSize

public int getThreshQueueSize(int r)
Returns the threshold on the queue size corresponding to vector with index r.

Parameters:
r - the index of the vector of thresholds.
Returns:
the threshold on the queue size.

getThreshQueueSize

public int[] getThreshQueueSize()
Returns the array of thresholds on the queue size. Element r of the returned array gives the threshold for index r.

Returns:
the array of thresholds on the queue size.

initOperatingMode

public void initOperatingMode(CallCenterCTMC ctmc)
Determines the current operating mode r depending on the state of the given CTMC ctmc. This method is called after the CTMC is initialized. The more efficient updateOperatingMode(CallCenterCTMC,TransitionType) can be used to update r at each transition. The value of r can be obtained using getOperatingMode().

Parameters:
ctmc - the call center CTMC.

getOperatingMode

public int getOperatingMode()
Returns the current operating mode. The operating mode corresponds to the vector of thresholds r offering the smallest jump rate, and thresholds greater than or equal to the current number of agents and queue size.

Returns:
the current operating mode.

updateOperatingMode

public boolean updateOperatingMode(CallCenterCTMC ctmc,
                                   TransitionType type)
Updates the current vector of thresholds after a transition of type type of the CTMC model ctmc. This returns true if the operating mode changed, and needs to be queried using getOperatingMode().

Parameters:
ctmc - the call center CTMC.
type - the transition type.
Returns:
true if the operating mode changed.

clone

public StateThresh clone()
Overrides:
clone in class Object

ContactCenters
V. 0.9.9.

To submit a bug or ask questions, send an e-mail to Richard Simard.