Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.contactcenters.msk.model
Class ServiceTimesManager

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.msk.model.ServiceTimesManager

    public class ServiceTimesManager

extends Object

Manages the construction of service time generators specific to each agent, to each agent group also as well as a default generator used when no generator is available for a given agent or agent group. 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
`ServiceTimesManager(CallCenter cc, String name, List<ServiceTimeParams> pars, int k, RandomStream sStream, double sgenMultAllGroups, int numGroups)` 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-group-specific service time is available.
`MultiPeriodGen` | `getServiceTimeGen(int i)` Returns the service time generator for agent group `i`.
`MultiPeriodGen[]` | `getServiceTimeGenGroups()` Returns an array containing the service time generators for each agent group.
`double[]` | `getServiceTimesGenGroupsMult()` Returns an array containing the multiplier for each service time generator specific to an agent group.
`double` | `getServiceTimesMult()` Returns the multiplier applied to the default service time generator.
`double` | `getServiceTimesMult(int i)` Returns the service time multiplier specific to agent group `i`.
`double` | `getServiceTimesMultAllGroups()` Returns the service time multiplier applied to the default generator, as well as all generators specific to agent groups.
`void` | `init(double mult)` Initializes this manager by setting the multipliers for the random variate generators.
`void` | `setServiceTimeGen(int i, MultiPeriodGen gen)` Sets the service time generator for agent group `i` to `gen`.
`void` | `setServiceTimeGen(MultiPeriodGen sgen)` Sets the default service time generator to `sgen`.
`void` | `setServiceTimeGenGroups(MultiPeriodGen[] sgenGroups)` Sets the service time generators to `sgenGroups` for agent groups.
`void` | `setServiceTimesGenGroupsMult(double[] sgenMultGroups)` Sets the service time multipliers for the agent groups using the array `sgenMultGroups`.
`void` | `setServiceTimesMult(double sgenMult)` Sets the multiplier for the default service time generator to `sgenMult`.
`void` | `setServiceTimesMult(int i, double mult)` Sets the service time multiplier specific to agent group `i` to `mult`.
`void` | `setServiceTimesMultAllGroups(double sgenMultAllGroups)` Sets the global multiplier applied to each service time generator managed by this object to `sgenMultAllGroups`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ServiceTimesManager

    public ServiceTimesManager(CallCenter cc,
                               String name,
                               List<ServiceTimeParams> pars,
                               int k,
                               RandomStream sStream,
                               double sgenMultAllGroups,
                               int numGroups)
                        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.
    `sgenMultAllGroups` - the multiplier applied to all service time generators.
    `numGroups` - the number of agent groups.
  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-group-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 i)

  Returns the service time generator for agent group `i`. If no such generator is available, this returns the result of `getServiceTimeGen()`.

  Parameters:
    `i` - the tested agent group.
  Returns:
    the associated service time generator.

### getServiceTimeGenGroups

    public MultiPeriodGen[] getServiceTimeGenGroups()

  Returns an array containing the service time generators for each agent group. If no service time generator is associated with an agent group, the element at the corresponding position in the returned array is `null`.

  Returns:
    the array of service time generators.

### setServiceTimeGenGroups

    public void setServiceTimeGenGroups(MultiPeriodGen[] sgenGroups)

  Sets the service time generators to `sgenGroups` for agent groups.

  Parameters:
    `sgenGroups` - the new array of service time generators.

### setServiceTimeGen

    public void setServiceTimeGen(int i,
                                  MultiPeriodGen gen)

  Sets the service time generator for agent group `i` to `gen`.

  Parameters:
    `i` - the index of the agent group.
    `gen` - the new generator.

### getServiceTimesGenGroupsMult

    public double[] getServiceTimesGenGroupsMult()

  Returns an array containing the multiplier for each service time generator specific to an agent group.

  Returns:
    the array of service time multipliers.

### setServiceTimesGenGroupsMult

    public void setServiceTimesGenGroupsMult(double[] sgenMultGroups)

  Sets the service time multipliers for the agent groups using the array `sgenMultGroups`.

  Parameters:
    `sgenMultGroups` - 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 i)

  Returns the service time multiplier specific to agent group `i`. This returns 1 if no generator is associated with specific agent groups.

  Parameters:
    `i` - the tested agent group.
  Returns:
    the multiplier.

### setServiceTimesMult

    public void setServiceTimesMult(int i,
                                    double mult)

  Sets the service time multiplier specific to agent group `i` to `mult`.

  Parameters:
    `i` - the agent group identifier.
    `mult` - the new multiplier.

### getServiceTimesMultAllGroups

    public double getServiceTimesMultAllGroups()

  Returns the service time multiplier applied to the default generator, as well as all generators specific to agent groups.

  Returns:
    the global service time multiplier.

### setServiceTimesMultAllGroups

    public void setServiceTimesMultAllGroups(double sgenMultAllGroups)

  Sets the global multiplier applied to each service time generator managed by this object to `sgenMultAllGroups`.

  Parameters:
    `sgenMultAllGroups` - 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 `getServiceTimesMultAllGroups()`, 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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