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 AgentGroupManagerWithSchedule

    java.lang.Object
      umontreal.iro.lecuyer.xmlbind.NamedInfo
          umontreal.iro.lecuyer.contactcenters.msk.model.AgentGroupManager
              umontreal.iro.lecuyer.contactcenters.msk.model.AgentGroupManagerWithSchedule

    public class AgentGroupManagerWithSchedule

extends AgentGroupManager

Manages an agent group whose member follow a given schedule. A schedule is composed of shifts that can start and end at arbitrary times during the simulation horizon. This agent group manager encapsulates a simulation event for each shift. This event is used to add or remove agents to the managed group during simulation.

Constructor Summary
`AgentGroupManagerWithSchedule(CallCenter cc, AgentGroupParams par, int i)` Constructs the new schedule-based agent group manager.

Method Summary
`protected AgentGroup` | `createAgentGroup(AgentGroupParams par, int i)` Constructs and returns a detailed agent group, which is needed to add and remove agents.
`DetailedAgentGroup` | `getAgentGroup()` Returns a reference to the managed agent group.
`int[]` | `getEffectiveNumAgents()` Returns the effective number of agents during each shift.
`int` | `getEffectiveNumAgents(int shift)` Similar to `getEffectiveNumAgents()`, for a specific shift `shift`.
`int[]` | `getNumAgents()` Returns a vector giving the raw number of agents for each shift.
`int` | `getNumAgents(int shift)` Returns the raw number of agents in shift `shift`.
`int` | `getNumShifts()` Returns the number of shifts in the schedule.
`ScheduleShift` | `getShift(int i)` Returns the shift with index `i`.
`boolean[][]` | `getShiftMatrix()` Computes and returns the matrix of shifts.
`int[][]` | `getShiftMatrixInt()` Similar to `getShiftMatrix()`, but returns a matrix of integers, with 0 meaning `false`, and 1 meaning `true`.
`ScheduleShift[]` | `getShifts()` Returns the shifts composing the schedule of the agents.
`int[]` | `getStaffing()` Computes and returns the staffing vector.
`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` | `setEffectiveNumAgents(int[] numAgents)` Sets the effective number of agents for each shift of the managed agent group to `numAgents`.
`void` | `setEffectiveNumAgents(int shift, int n)` Similar to `setEffectiveNumAgents(int[])`, but only sets the number of agents in shift `shift` to `n` instead of the number of agents in all shifts.
`void` | `setNumAgents(int[] numAgents)` Sets the vector of raw numbers of agents to `numAgents`.
`void` | `setNumAgents(int shift, int n)` Sets the raw number of agents in shift `shift` to `n`.

Methods inherited from class umontreal.iro.lecuyer.contactcenters.msk.model.AgentGroupManager
`connectToRouter, create, estimateParameters, 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

### AgentGroupManagerWithSchedule

    public AgentGroupManagerWithSchedule(CallCenter cc,
                                         AgentGroupParams par,
                                         int i)
                                  throws AgentGroupCreationException

  Constructs the new schedule-based agent group manager.

  Parameters:
    `cc` - the call center model.
    `par` - the agent group parameters.
    `i` - the index of the agent group.
  Throws:
    `AgentGroupCreationException` - if an exception occurs when creating the agent group.

Method Detail

### createAgentGroup

    protected AgentGroup createAgentGroup(AgentGroupParams par,
                                          int i)
                                   throws AgentGroupCreationException

  Constructs and returns a detailed agent group, which is needed to add and remove agents.

  Overrides:
    `createAgentGroup` in class `AgentGroupManager`
    `i` - the agent group index.
  Returns:
    the constructed agent group.
  Throws:
    `AgentGroupCreationException`

### getShifts

    public ScheduleShift[] getShifts()

  Returns the shifts composing the schedule of the agents.

  Returns:
    the shifts composing the schedule.

### getNumShifts

    public int getNumShifts()

  Returns the number of shifts in the schedule.

  Returns:
    the number of shifts in the schedule.

### getShift

    public ScheduleShift getShift(int i)

  Returns the shift with index `i`.

  Parameters:
    `i` - the index of the shift.
  Returns:
    the corresponding shift.

### getNumAgents

    public int[] getNumAgents()

  Returns a vector giving the raw number of agents for each shift. This method is for internal use; the method `getEffectiveNumAgents()` is recommended to take account of agents multipliers into account.

  Returns:
    the raw number of agents per shift.

### getNumAgents

    public int getNumAgents(int shift)

  Returns the raw number of agents in shift `shift`. The method `getEffectiveNumAgents(int)` can be used to take agents multipliers into account.

  Parameters:
    `shift` - the index of the shift.
  Returns:
    the raw number of agents on the shift.

### getEffectiveNumAgents

    public int[] getEffectiveNumAgents()

  Returns the effective number of agents during each shift. This method calls `getNumAgents()`, and multiplies each element of the returned array by m*mi, where m is determined by `CallCenter.getAgentsMult()` and mi is given by `AgentGroupManager.getAgentsMult()`. The resulting numbers are rounded to the nearest integers, and stored in the array being returned.

  Returns:
    the effective number of agents during each shift.

### getEffectiveNumAgents

    public int getEffectiveNumAgents(int shift)

  Similar to `getEffectiveNumAgents()`, for a specific shift `shift`.

  Parameters:
    `shift` - the index of the tested shift.
  Returns:
    the effective number of agents on the shift.

### setNumAgents

    public void setNumAgents(int[] numAgents)

  Sets the vector of raw numbers of agents to `numAgents`.

  Parameters:
    `numAgents` - the new vector of agents.

### setNumAgents

    public void setNumAgents(int shift,
                             int n)

  Sets the raw number of agents in shift `shift` to `n`.

  Parameters:
    `shift` - the index of the affected shift.
    `n` - the new number of agents.

### setEffectiveNumAgents

    public void setEffectiveNumAgents(int[] numAgents)

  Sets the effective number of agents for each shift of the managed agent group to `numAgents`. This method sets the number of agents to `numAgents` using `setNumAgents(int[])`, but it also resets the value of the multiplier m*mk to 1. This makes sure that `getEffectiveNumAgents()` will return the same value as the vector passed to this method.

  Parameters:
    `numAgents` - the new vector of agents.

### setEffectiveNumAgents

    public void setEffectiveNumAgents(int shift,
                                      int n)

  Similar to `setEffectiveNumAgents(int[])`, but only sets the number of agents in shift `shift` to `n` instead of the number of agents in all shifts.

  Parameters:
    `shift` - the index of the affected shift.
    `n` - the new number of agents.

### getShiftMatrix

    public boolean[][] getShiftMatrix()

  Computes and returns the matrix of shifts. Element (j, p) of this J×P matrix, where J corresponds to the number of shifts and P, to the number of main periods, is `true` if and only if agents are scheduled to work on shift `j` during main period `p`.

### getShiftMatrixInt

    public int[][] getShiftMatrixInt()

  Similar to `getShiftMatrix()`, but returns a matrix of integers, with 0 meaning `false`, and 1 meaning `true`.

### getStaffing

    public int[] getStaffing()

  Computes and returns the staffing vector. This corresponds to the column vector returned by `getNumAgents()` multiplied by the matrix returned by `getShiftMatrix()`.

  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.

### getAgentGroup

    public DetailedAgentGroup getAgentGroup()

  Description copied from class: `AgentGroupManager`
  Returns a reference to the managed agent group.

  Overrides:
    `getAgentGroup` in class `AgentGroupManager`

### init

    public void init()

  Description copied from class: `AgentGroupManager`
  Calls `init` on the managed agent group.

  Overrides:
    `init` in class `AgentGroupManager`

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.