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 ScheduleShift

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

    public class ScheduleShift

extends Object

Represents a shift in a schedule for agents. A shift contains an array of parts as well as an integer giving the number of agents scheduled on that shift.

Constructor Summary
`ScheduleShift(CallCenter cc, ScheduleShiftParams par)` Constructs a new shift from call center `cc`, and parameters `par`.
`ScheduleShift(ShiftPart[] parts, int numAgents, double probAgents)` Constructs a new schedule shift from parts in the array `parts`, and with `numAgents` agents.

Method Summary
`static boolean` | `estimateParameters(ScheduleShiftParams par)` Estimates the `numAgents` and `probAgents` parameters of the shift described by `par` from the `numAgentsData` array of observations, assuming that the number of agents follows a binomial distribution and using the maximum likelihood method.
`double` | `getAgentProbability()` Returns the presence probability of each agent on that shift.
`int` | `getNumAgents()` Returns the number of agents on this shift.
`int` | `getNumParts()` Returns the number of parts for this shift.
`ShiftPart` | `getPart(int i)` Returns the shift part with index `i`.
`ShiftPart[]` | `getParts()` Returns an array containing the shift parts.
`boolean[]` | `getShiftVector(PeriodChangeEvent pce)` Computes and returns the shift vector for this shift, relative to the period-change event `pce`.
`int[]` | `getShiftVectorInt(PeriodChangeEvent pce)` Similar to `getShiftVector(PeriodChangeEvent)`, but returns an array of integers rather than an array of booleans.
`void` | `setAgentProbability(double prob)` Sets the presence probability of agents on this shift to `prob`.
`void` | `setNumAgents(int numAgents)` Sets the number of agents on that shift to `numAgents`.

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

Constructor Detail

### ScheduleShift

    public ScheduleShift(CallCenter cc,
                         ScheduleShiftParams par)

  Constructs a new shift from call center `cc`, and parameters `par`.

  Parameters:
    `cc` - the call center.
    `par` - the parameters.

### ScheduleShift

    public ScheduleShift(ShiftPart[] parts,
                         int numAgents,
                         double probAgents)

  Constructs a new schedule shift from parts in the array `parts`, and with `numAgents` agents.

  Parameters:
    `parts` - the shift parts.
    `numAgents` - the number of agents.

Method Detail

### getNumAgents

    public int getNumAgents()

  Returns the number of agents on this shift.

  Returns:
    the number of agents on this shift.

### setNumAgents

    public void setNumAgents(int numAgents)

  Sets the number of agents on that shift to `numAgents`.

  Parameters:
    `numAgents` - the number of agents.

### getParts

    public ShiftPart[] getParts()

  Returns an array containing the shift parts.

  Returns:
    the array of shift parts.

### getNumParts

    public int getNumParts()

  Returns the number of parts for this shift.

  Returns:
    the number of parts.

### getPart

    public ShiftPart getPart(int i)

  Returns the shift part with index `i`.

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

### getShiftVector

    public boolean[] getShiftVector(PeriodChangeEvent pce)

  Computes and returns the shift vector for this shift, relative to the period-change event `pce`. Element p of this P-dimensional vector, where P is the number of main periods is `true` if and only if agents are scheduled to work during main period p.

  Parameters:
    `pce` - the period-change event.
  Returns:
    the shift vector.

### getShiftVectorInt

    public int[] getShiftVectorInt(PeriodChangeEvent pce)

  Similar to `getShiftVector(PeriodChangeEvent)`, but returns an array of integers rather than an array of booleans. Element p of the returned array contains 1 if agents are scheduled to work in main period p, and 0 otherwise.

  Parameters:
    `pce` - the period-change event.
  Returns:
    the shift vector.

### getAgentProbability

    public double getAgentProbability()

  Returns the presence probability of each agent on that shift.

### setAgentProbability

    public void setAgentProbability(double prob)

  Sets the presence probability of agents on this shift to `prob`.

### estimateParameters

    public static boolean estimateParameters(ScheduleShiftParams par)

  Estimates the `numAgents` and `probAgents` parameters of the shift described by `par` from the `numAgentsData` array of observations, assuming that the number of agents follows a binomial distribution and using the maximum likelihood method.

  Parameters:
    `par` - the parameters of the shift.
  Returns:
    `true` if and only if some parameters were estimated.

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.