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 AgentGroupSchedule

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

    public class AgentGroupSchedule

extends Object

Represents the schedule of agents in a certain group. This object stores an array of `ScheduleShift` elements representing shifts, and provides some methods to work with shifts.

Constructor Summary
`AgentGroupSchedule(CallCenter cc, AgentGroupScheduleParams schedule)` Constructs a new schedule using parameters in `schedule`.
`AgentGroupSchedule(ScheduleShift[] shifts)` Constructs a new agent group schedule using the array of shifts `shifts`.

Method Summary
`static boolean` | `estimateParameters(AgentGroupScheduleParams par)` Estimates the `numAgents` and `probAgents` parameters for this schedule, using the `numAgentsData` matrix and the maximum likelihood method.
`int[]` | `getNumAgents()` Returns a vector giving the number of agents for each shift.
`int` | `getNumAgents(int shift)` Similar to `getNumAgents()`, but returns the number of agents on a given shift `shift`.
`int` | `getNumShifts()` Returns the number of shifts in the schedule.
`ScheduleShift` | `getShift(int i)` Returns the shift with index `i` of this schedule.
`boolean[][]` | `getShiftMatrix(PeriodChangeEvent pce)` Computes and returns the matrix of shifts.
`int[][]` | `getShiftMatrixInt(PeriodChangeEvent pce)` Similar to `getShiftMatrix(PeriodChangeEvent)`, but returns a 2D array of integers rather than booleans.
`ScheduleShift[]` | `getShifts()` Returns an array containing the shifts of this schedule.
`int[]` | `getStaffing(PeriodChangeEvent pce)` Computes and returns the staffing vector.
`void` | `setNumAgents(int[] numAgents)` Sets the vector of number of agents of this schedule to `numAgents`.
`void` | `setNumAgents(int shift, int n)` Sets the number of agents on the shift `shift` to `n`.

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

Constructor Detail

### AgentGroupSchedule

    public AgentGroupSchedule(ScheduleShift[] shifts)

  Constructs a new agent group schedule using the array of shifts `shifts`.

  Parameters:
    `shifts` - the shifts in the schedule.

### AgentGroupSchedule

    public AgentGroupSchedule(CallCenter cc,
                              AgentGroupScheduleParams schedule)
                       throws AgentGroupCreationException

  Constructs a new schedule using parameters in `schedule`. The call center `cc` is used to obtain a default set of shifts, if the given parameters only provides a vector of agents per shift.

  Parameters:
    `cc` - the call center from which default parameters are obtained.
    `schedule` - the parameters of the schedule.
  Throws:
    `AgentGroupCreationException` - if an error occurs during the creation of the schedule shifts.

Method Detail

### getShifts

    public ScheduleShift[] getShifts()

  Returns an array containing the shifts of this schedule.

  Returns:
    the array of shifts.

### 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` of this schedule.

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

### getNumAgents

    public int[] getNumAgents()

  Returns a vector giving the number of agents for each shift. This method is for internal use; it is recommended to use `AgentGroupManagerWithSchedule.getEffectiveNumAgents()`.

  Returns:
    the number of agents per shift.

### getNumAgents

    public int getNumAgents(int shift)

  Similar to `getNumAgents()`, but returns the number of agents on a given shift `shift`.

  Parameters:
    `shift` - the shift index to look at.
  Returns:
    the number of agents on the shift.

### setNumAgents

    public void setNumAgents(int shift,
                             int n)

  Sets the number of agents on the shift `shift` to `n`.

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

### setNumAgents

    public void setNumAgents(int[] numAgents)

  Sets the vector of number of agents of this schedule to `numAgents`.

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

### getShiftMatrix

    public boolean[][] getShiftMatrix(PeriodChangeEvent pce)

  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`.

  Returns:
    the matrix of shifts.

### getShiftMatrixInt

    public int[][] getShiftMatrixInt(PeriodChangeEvent pce)

  Similar to `getShiftMatrix(PeriodChangeEvent)`, but returns a 2D array of integers rather than booleans. 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 1 if agents are scheduled to work on shift `j` during main period `p`, and 0 otherwise.

  Returns:
    the matrix of shifts.

### getStaffing

    public int[] getStaffing(PeriodChangeEvent pce)

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

### estimateParameters

    public static boolean estimateParameters(AgentGroupScheduleParams par)
                                      throws DistributionCreationException

  Estimates the `numAgents` and `probAgents` parameters for this schedule, using the `numAgentsData` matrix and the maximum likelihood method. For each shift, the number of agents is assumed to be a binomial random variable. The method also calls `ScheduleShift.estimateParameters(ScheduleShiftParams)` for every shift described by `par`.

  Parameters:
    `par` - the schedule parameters.
  Returns:
    `true` if and only if some parameters were estimated.
  Throws:
    `DistributionCreationException` - if an error occurs during parameter estimation.

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.