ContactCenters
V. 0.9.9.

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

java.lang.Object
  extended by umontreal.iro.lecuyer.contactcenters.msk.model.ServiceTimesAgentManager

public class ServiceTimesAgentManager
extends Object

Manages the construction of service time generators specific to each agent, as well as a default generator used when no generator is available for a given agent. This class associates a multiplier to each such service time which can be used to alter the mean service time. One object of this class can be constructed for each part of the service time, e.g., the talk time, the transfer time, etc.


Constructor Summary
ServiceTimesAgentManager(CallCenter cc, String name, List<ServiceTimeParams> pars, int k, RandomStream sStream, double sgenMultAllAgents, int numAgents)
          Constructs a new service times manager using call center parameters cc.
 
Method Summary
 void generate(ServiceTimes st)
          Uses the random variate generators attached with this service times manager to generate service times, and store the times in st.
 MultiPeriodGen getServiceTimeGen()
          Returns the default service time generator used when no agent-agent-specific service time is available.
 MultiPeriodGen getServiceTimeGen(int j)
          Returns the service time generator for agent agent i.
 MultiPeriodGen[] getServiceTimeGenAgents()
          Returns an array containing the service time generators for each agent.
 double[] getServiceTimesGenAgentsMult()
          Returns an array containing the multiplier for each service time generator specific to an agent.
 double getServiceTimesMult()
          Returns the multiplier applied to the default service time generator.
 double getServiceTimesMult(int j)
          Returns the service time multiplier specific to agent i.
 double getServiceTimesMultAllAgents()
          Returns the service time multiplier applied to the default generator, as well as all generators specific to agents.
 void init(double mult)
          Initializes this manager by setting the multipliers for the random variate generators.
 void setServiceTimeGen(int j, MultiPeriodGen gen)
          Sets the service time generator for agent i to gen.
 void setServiceTimeGen(MultiPeriodGen sgen)
          Sets the default service time generator to sgen.
 void setServiceTimeGenAgents(MultiPeriodGen[] sgenAgents)
          Sets the service time generators to sgenAgents for agents.
 void setServiceTimesGenAgentsMult(double[] sgenMultAgents)
          Sets the service time multipliers for the agents using the array sgenMultAgents.
 void setServiceTimesMult(double sgenMult)
          Sets the multiplier for the default service time generator to sgenMult.
 void setServiceTimesMult(int j, double mult)
          Sets the service time multiplier specific to agent i to mult.
 void setServiceTimesMultAllAgents(double sgenMultAllAgents)
          Sets the global multiplier applied to each service time generator managed by this object to sgenMultAllAgents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceTimesAgentManager

public ServiceTimesAgentManager(CallCenter cc,
                                String name,
                                List<ServiceTimeParams> pars,
                                int k,
                                RandomStream sStream,
                                double sgenMultAllAgents,
                                int numAgents)
                         throws CallFactoryCreationException
Constructs a new service times manager using call center parameters cc. This method uses the given list of service time parameters pars, and the stream sStream to construct service time generators.

Parameters:
cc - the call center model.
name - the name of the part of the service time this object concerns, used in error messages.
pars - the service time parameters.
k - the concerned call type.
sStream - the random stream used to generate the service times.
sgenMultAllAgents - the multiplier applied to all service time generators.
numAgents - the number of agents.
Throws:
CallFactoryCreationException - if an error occurs during the construction of the service time manager.
Method Detail

getServiceTimeGen

public MultiPeriodGen getServiceTimeGen()
Returns the default service time generator used when no agent-agent-specific service time is available.

Returns:
the default service time generator.

setServiceTimeGen

public void setServiceTimeGen(MultiPeriodGen sgen)
Sets the default service time generator to sgen.

Parameters:
sgen - the new default service time generator.

getServiceTimeGen

public MultiPeriodGen getServiceTimeGen(int j)
Returns the service time generator for agent agent i. If no such generator is available, this returns the result of getServiceTimeGen().

Parameters:
j - the tested agent.
Returns:
the associated service time generator.

getServiceTimeGenAgents

public MultiPeriodGen[] getServiceTimeGenAgents()
Returns an array containing the service time generators for each agent. If no service time generator is associated with an agent, the element at the corresponding position in the returned array is null.

Returns:
the array of service time generators.

setServiceTimeGenAgents

public void setServiceTimeGenAgents(MultiPeriodGen[] sgenAgents)
Sets the service time generators to sgenAgents for agents.

Parameters:
sgenAgents - the new array of service time generators.

setServiceTimeGen

public void setServiceTimeGen(int j,
                              MultiPeriodGen gen)
Sets the service time generator for agent i to gen.

Parameters:
j - the index of the agent.
gen - the new generator.

getServiceTimesGenAgentsMult

public double[] getServiceTimesGenAgentsMult()
Returns an array containing the multiplier for each service time generator specific to an agent.

Returns:
the array of service time multipliers.

setServiceTimesGenAgentsMult

public void setServiceTimesGenAgentsMult(double[] sgenMultAgents)
Sets the service time multipliers for the agents using the array sgenMultAgents.

Parameters:
sgenMultAgents - the array giving the multipliers.

getServiceTimesMult

public double getServiceTimesMult()
Returns the multiplier applied to the default service time generator.

Returns:
the multiplier for the default service time generator.

setServiceTimesMult

public void setServiceTimesMult(double sgenMult)
Sets the multiplier for the default service time generator to sgenMult.

Parameters:
sgenMult - the multiplier for the default service time multiplier.

getServiceTimesMult

public double getServiceTimesMult(int j)
Returns the service time multiplier specific to agent i. This returns 1 if no generator is associated with specific agents.

Parameters:
j - the tested agent.
Returns:
the multiplier.

setServiceTimesMult

public void setServiceTimesMult(int j,
                                double mult)
Sets the service time multiplier specific to agent i to mult.

Parameters:
j - the agent identifier.
mult - the new multiplier.

getServiceTimesMultAllAgents

public double getServiceTimesMultAllAgents()
Returns the service time multiplier applied to the default generator, as well as all generators specific to agents.

Returns:
the global service time multiplier.

setServiceTimesMultAllAgents

public void setServiceTimesMultAllAgents(double sgenMultAllAgents)
Sets the global multiplier applied to each service time generator managed by this object to sgenMultAllAgents.

Parameters:
sgenMultAllAgents - the new multiplier.

init

public void init(double mult)
Initializes this manager by setting the multipliers for the random variate generators. The used multiplier is the product of mult, the result of getServiceTimesMultAllAgents(), and the generator-specific multiplier. The value of mult corresponds to the global service time multiplier applying to all call types.

Parameters:
mult - the global multiplier.

generate

public void generate(ServiceTimes st)
Uses the random variate generators attached with this service times manager to generate service times, and store the times in st.

Parameters:
st - the object holding service times.

ContactCenters
V. 0.9.9.

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