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.stat
Class BusyAgentsChecker

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.msk.stat.BusyAgentsChecker

All Implemented Interfaces:
  AgentGroupListener, MeasureMatrix

    public final class BusyAgentsChecker

extends Object
implements AgentGroupListener, MeasureMatrix

Computes the maximal number of busy agents for every agent group and statistical period, during the simulation. An object of this class registers as a listener for every agent group. Each time a contact enters service, the object then checks that the number of busy agents is not greater than the current maximum, and updates the maximum if necessary. When the model is simulated over multiple periods, such maxima are computed for each period. A busy-agents checker is also a period-change listener, because at the beginning of periods, it needs to set the per-period initial maxima to the current number of busy agents.

Constructor Summary
`BusyAgentsChecker(CallCenter cc, StatPeriod statP)` Constructs a new busy-agents checker using call center `cc`, and object `statP` to obtain statistical periods.

Method Summary
`void` | `agentGroupChange(AgentGroup group)` This method is called when the number of available or free agents in the agent group `group` is changed.
`void` | `beginService(EndServiceEvent ev)` This method is called after the service of a contact by an agent was started.
`void` | `endContact(EndServiceEvent ev)` This method is called after the communication of a contact with an agent was terminated, with `ev` containing all the information.
`void` | `endService(EndServiceEvent ev)` This method is called after the service of a contact by an agent was terminated.
`double` | `getMeasure(int i, int p)` Returns the measure corresponding to the index `i` and period `p`.
`int` | `getNumMeasures()` Returns the number of measures calculated by the implementation of this interface.
`int` | `getNumPeriods()` Returns the number of periods stored into this matrix of measures.
`void` | `init()` Initializes the counters to 0.
`void` | `init(AgentGroup group)` This method is called after the `AgentGroup.init()` method is called for the agent group `group`.
`void` | `initForCurrentPeriod()`
`void` | `register()` Registers this busy-agents checker with the associated call center model.
`void` | `regroupPeriods(int x)` Increases the length of stored periods by regrouping them.
`void` | `setNumMeasures(int nm)` Sets the number of measures to `nm`.
`void` | `setNumPeriods(int np)` Sets the number of periods of this matrix to `np`.
`void` | `unregister()` Unregisters this busy-agents checker with the associated model.

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

Constructor Detail

### BusyAgentsChecker

    public BusyAgentsChecker(CallCenter cc,
                             StatPeriod statP)

  Constructs a new busy-agents checker using call center `cc`, and object `statP` to obtain statistical periods.

Method Detail

### init

    public void init()

  Initializes the counters to 0.

  Specified by:
    `init` in interface `MeasureMatrix`

### initForCurrentPeriod

    public void initForCurrentPeriod()

### register

    public void register()

  Registers this busy-agents checker with the associated call center model. The method adds this object to the list of observers for all agent groups of the model, and registers itself as a period-change listener.

### unregister

    public void unregister()

  Unregisters this busy-agents checker with the associated model. This method performs the reverse task of `register()`.

### agentGroupChange

    public void agentGroupChange(AgentGroup group)

  Description copied from interface: `AgentGroupListener`
  This method is called when the number of available or free agents in the agent group `group` is changed. This happens when the `AgentGroup.setNumAgents(int)` method is called, or when the efficiency is changed. This is also called when `DetailedAgentGroup.addAgent(umontreal.iro.lecuyer.contactcenters.server.Agent)` or `DetailedAgentGroup.removeAgent(umontreal.iro.lecuyer.contactcenters.server.Agent)` are used.

  Specified by:
    `agentGroupChange` in interface `AgentGroupListener`
  Parameters:
    `group` - the agent group being modified.

### beginService

    public void beginService(EndServiceEvent ev)

  Description copied from interface: `AgentGroupListener`
  This method is called after the service of a contact by an agent was started. The end-service event `ev` holds all the available information about the service.

  Specified by:
    `beginService` in interface `AgentGroupListener`
  Parameters:
    `ev` - the end-service event associated with the contact being served.

### endContact

    public void endContact(EndServiceEvent ev)

  Description copied from interface: `AgentGroupListener`
  This method is called after the communication of a contact with an agent was terminated, with `ev` containing all the information.

  Specified by:
    `endContact` in interface `AgentGroupListener`
  Parameters:
    `ev` - the end-service event associated with the served contact.

### endService

    public void endService(EndServiceEvent ev)

  Description copied from interface: `AgentGroupListener`
  This method is called after the service of a contact by an agent was terminated. The service includes the communication as well as the after-contact work.

  Specified by:
    `endService` in interface `AgentGroupListener`
  Parameters:
    `ev` - the end-service event associated with the served contact.

### init

    public void init(AgentGroup group)

  Description copied from interface: `AgentGroupListener`
  This method is called after the `AgentGroup.init()` method is called for the agent group `group`.

  Specified by:
    `init` in interface `AgentGroupListener`
  Parameters:
    `group` - the agent group being initialized.

### getMeasure

    public double getMeasure(int i,
                             int p)

  Description copied from interface: `MeasureMatrix`
  Returns the measure corresponding to the index `i` and period `p`.

  Specified by:
    `getMeasure` in interface `MeasureMatrix`
  Parameters:
    `i` - the index of the measure.
    `p` - the period of the measure.
  Returns:
    the corresponding value.

### getNumMeasures

    public int getNumMeasures()

  Description copied from interface: `MeasureMatrix`
  Returns the number of measures calculated by the implementation of this interface.

  Specified by:
    `getNumMeasures` in interface `MeasureMatrix`
  Returns:
    the number of computed values.

### getNumPeriods

    public int getNumPeriods()

  Description copied from interface: `MeasureMatrix`
  Returns the number of periods stored into this matrix of measures.

  Specified by:
    `getNumPeriods` in interface `MeasureMatrix`
  Returns:
    the number of stored periods.

### regroupPeriods

    public void regroupPeriods(int x)

  Description copied from interface: `MeasureMatrix`
  Increases the length of stored periods by regrouping them. If this method is supported, for `p = 0`, ..., `MeasureMatrix.getNumPeriods()``/x - 1`, it sums the values for periods `xp`, ...,`xp+x-1`, and stores the results in period `p` whose length will be `x` times the length of original periods. If the number of periods is not a multiple of `x`, an additional period is used to contain the remaining sums of values. The unused periods are zeroed for future use. This method can be useful for memory management when using batch means to estimate steady-state performance measures.

  Specified by:
    `regroupPeriods` in interface `MeasureMatrix`
  Parameters:
    `x` - the number of periods per group.

### setNumMeasures

    public void setNumMeasures(int nm)

  Description copied from interface: `MeasureMatrix`
  Sets the number of measures to `nm`. If this method is supported, it can limit the maximal or minimal accepted number of measures.

  Specified by:
    `setNumMeasures` in interface `MeasureMatrix`
  Parameters:
    `nm` - the new number of measures.

### setNumPeriods

    public void setNumPeriods(int np)

  Description copied from interface: `MeasureMatrix`
  Sets the number of periods of this matrix to `np`. If this method is supported, it can limit the maximal or minimal accepted number of periods.

  Specified by:
    `setNumPeriods` in interface `MeasureMatrix`
  Parameters:
    `np` - the new number of periods.

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.