ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.msk.model
Class AgentGroupManagerWithStaffing

java.lang.Object
  extended by umontreal.iro.lecuyer.xmlbind.NamedInfo
      extended by umontreal.iro.lecuyer.contactcenters.msk.model.AgentGroupManager
          extended by umontreal.iro.lecuyer.contactcenters.msk.model.AgentGroupManagerWithStaffing

public class AgentGroupManagerWithStaffing
extends AgentGroupManager

Manages an agent group with a staffing vector giving the number of agents for each period. This manager stores the staffing vector and registers a period-change to update the staffing at the beginning of main periods.


Constructor Summary
AgentGroupManagerWithStaffing(CallCenter cc, AgentGroupParams par, int i)
          Calls the superclass' constructor, and extracts the staffing from par.
AgentGroupManagerWithStaffing(CallCenter cc, AgentGroupParams par, int i, int[] staffing)
          Similar to the first constructor AgentGroupManagerWithStaffing(CallCenter,AgentGroupParams,int), but uses the given staffing vector instead of the one extracted from par.
 
Method Summary
 double[] getAgentProbability()
          Returns the per-period probabilities of presence for each agent in the group.
 double getAgentProbability(int mp)
          Similar to getAgentProbability(), for a given main period mp.
 int[] getCurNumAgents()
          Returns the number of agents in the managed group for the current simulation replication.
 int getCurNumAgents(int mp)
          Similar to getCurNumAgents(), for a given main period mp.
 int[] getStaffing()
          Returns the raw staffing of the managed agent group.
 int getStaffing(int mp)
          Returns element mp of the array that would be returned by AgentGroupManager.getStaffing().
 void init()
          Calls init on the managed agent group.
 void setAgentProbability(double[] prob)
          Sets the per-period presence probabilities of agents to prob.
 void setAgentProbability(int mp, double prob)
          Sets the presence probability of agents to prob for main period mp.
 void setEffectiveStaffing(int[] staffing)
          Sets the effective staffing for the managed agent group to staffing.
 void setEffectiveStaffing(int mp, int ns)
          Similar to setEffectiveStaffing(int[]), for a single main period.
 void setStaffing(int[] staffing)
          Sets the staffing vector to staffing.
 void setStaffing(int mp, int staffing)
          Sets the staffing for main period mp to staffing.
 
Methods inherited from class umontreal.iro.lecuyer.contactcenters.msk.model.AgentGroupManager
connectToRouter, create, createAgentGroup, estimateParameters, getAgentGroup, getAgentsMult, getBusyCost, getBusyCost, getCallCenter, getDisconnectTimeGen, getEffectiveStaffing, getEffectiveStaffing, getIdleCost, getIdleCost, getMaxAgents, getMaxAgents, getMinAgents, getMinAgents, getPerUseCost, getPerUseCost, getProbDisconnect, getProbDisconnect, getProbDisconnectStream, getSchedule, getSkillCount, getWeight, getWeight, setAgentsMult, setProbDisconnectStream, setSchedule
 
Methods inherited from class umontreal.iro.lecuyer.xmlbind.NamedInfo
getName, getProperties, getStringProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentGroupManagerWithStaffing

public AgentGroupManagerWithStaffing(CallCenter cc,
                                     AgentGroupParams par,
                                     int i)
                              throws AgentGroupCreationException
Calls the superclass' constructor, and extracts the staffing from par.

Throws:
AgentGroupCreationException

AgentGroupManagerWithStaffing

public AgentGroupManagerWithStaffing(CallCenter cc,
                                     AgentGroupParams par,
                                     int i,
                                     int[] staffing)
                              throws AgentGroupCreationException
Similar to the first constructor AgentGroupManagerWithStaffing(CallCenter,AgentGroupParams,int), but uses the given staffing vector instead of the one extracted from par.

Throws:
AgentGroupCreationException
Method Detail

getStaffing

public int[] getStaffing()
Description copied from class: AgentGroupManager
Returns the raw staffing of the managed agent group. The returned array gives the number of agents in the managed group during each main period in the model, before any multiplier is applied.

This method is mainly for internal use; the AgentGroupManager.getEffectiveStaffing() method should be used instead to take multipliers into account.

The default behavior of this method is to return an array of 0's.

Overrides:
getStaffing in class AgentGroupManager
Returns:
the raw staffing for the managed agent group.

getStaffing

public int getStaffing(int mp)
Description copied from class: AgentGroupManager
Returns element mp of the array that would be returned by AgentGroupManager.getStaffing().

As with AgentGroupManager.getStaffing(), this method is for internal use. The method AgentGroupManager.getEffectiveStaffing(int) should be used instead.

Overrides:
getStaffing in class AgentGroupManager
Parameters:
mp - the index of the tested main period.
Returns:
the raw staffing.

setStaffing

public void setStaffing(int[] staffing)
Sets the staffing vector to staffing.

Parameters:
staffing - the new staffing vector.

setStaffing

public void setStaffing(int mp,
                        int staffing)
Sets the staffing for main period mp to staffing.

Parameters:
mp - the index of the affected main period.
staffing - the new staffing.

setEffectiveStaffing

public void setEffectiveStaffing(int[] staffing)
Sets the effective staffing for the managed agent group to staffing. This method sets the staffing to staffing using setStaffing(int[]), but it also resets the value of the multiplier m*mi to 1. This makes sure that AgentGroupManager.getEffectiveStaffing() will return the same value as the staffing passed to this method.

Parameters:
staffing - the new effective staffing.

setEffectiveStaffing

public void setEffectiveStaffing(int mp,
                                 int ns)
Similar to setEffectiveStaffing(int[]), for a single main period.

Parameters:
mp - the index of the affected main period.
ns - the new number of agents.

getCurNumAgents

public int[] getCurNumAgents()
Returns the number of agents in the managed group for the current simulation replication. If the number of agents is deterministic, this method returns the result of AgentGroupManager.getEffectiveStaffing(). Otherwise, it returns the current (random) number of agents for each main period.

Returns:
the number of agents in the current replication.

getCurNumAgents

public int getCurNumAgents(int mp)
Similar to getCurNumAgents(), for a given main period mp.

Parameters:
mp - the index of the main period.
Returns:
the number of agents.

getAgentProbability

public double[] getAgentProbability()
Returns the per-period probabilities of presence for each agent in the group. If no such probabilities wre given by the user, this returns an array of 1's.

Returns:
the presence probability, for each main period.

getAgentProbability

public double getAgentProbability(int mp)
Similar to getAgentProbability(), for a given main period mp.

Parameters:
mp - the index of the main period.
Returns:
the presence probability.

setAgentProbability

public void setAgentProbability(double[] prob)
Sets the per-period presence probabilities of agents to prob.

Parameters:
prob - the per-period presence probabilities.

setAgentProbability

public void setAgentProbability(int mp,
                                double prob)
Sets the presence probability of agents to prob for main period mp.


init

public void init()
Description copied from class: AgentGroupManager
Calls init on the managed agent group.

Overrides:
init in class AgentGroupManager

ContactCenters
V. 0.9.9.

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