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.dialer
Class ConstantDialerPolicy

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.dialer.ConstantDialerPolicy

All Implemented Interfaces:
  DialerPolicy

    public class ConstantDialerPolicy

extends Object
implements DialerPolicy

Represents a dialer's policy which always tries to make the same number of calls on each trial.

Constructor Summary
`ConstantDialerPolicy(DialerList list, int n)` Constructs a new dialer's policy with dialer list `list`, and `n` calls to make on each trial.

Method Summary
`void` | `dialerStarted(Dialer dialer)` This method is called when the dialer using this policy is started.
`void` | `dialerStopped(Dialer dialer)` This method is called when the dialer using this policy is stopped.
`DialerList` | `getDialerList(Dialer dialer)` Returns the dialer list from which contacts have to be removed from, at the current simulation time.
`int` | `getNumDials(Dialer dialer)` Returns the number of calls the dialer should try to make simultaneously at the current simulation time.
`void` | `init(Dialer dialer)` Initializes this dialer's policy for a new simulation replication.
`void` | `setDialerList(DialerList list)` Sets the dialer list to `list`.
`void` | `setNumDials(int n)` Sets the number of dialed contacts to `n`.
`String` | `toString()`

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

Constructor Detail

### ConstantDialerPolicy

    public ConstantDialerPolicy(DialerList list,
                                int n)

  Constructs a new dialer's policy with dialer list `list`, and `n` calls to make on each trial.

  Parameters:
    `list` - the dialer list to extract calls from.
    `n` - the number of calls to make on each occasion.
  Throws:
    `NullPointerException` - if `list` is `null`.
    `IllegalArgumentException` - if `n` is negative.

Method Detail

### init

    public void init(Dialer dialer)

  Description copied from interface: `DialerPolicy`
  Initializes this dialer's policy for a new simulation replication. This method can be used, for example, to clear data structures containing information about a preceding simulation. This method should also clear the associated dialer list when appropriate.

  Specified by:
    `init` in interface `DialerPolicy`
  Parameters:
    `dialer` - the dialer which initialized this policy.

### getDialerList

    public DialerList getDialerList(Dialer dialer)

  Description copied from interface: `DialerPolicy`
  Returns the dialer list from which contacts have to be removed from, at the current simulation time. This list should not be stored into another object since it could be constructed dynamically when `DialerPolicy.getNumDials(Dialer)` is called.

  Specified by:
    `getDialerList` in interface `DialerPolicy`
  Parameters:
    `dialer` - the dialer for which the dialer list is required.
  Returns:
    the associated dialer list.

### setDialerList

    public void setDialerList(DialerList list)

  Sets the dialer list to `list`.

  Parameters:
    `list` - the new dialer list.
  Throws:
    `NullPointerException` - if `list` is `null`.

### getNumDials

    public int getNumDials(Dialer dialer)

  Description copied from interface: `DialerPolicy`
  Returns the number of calls the dialer should try to make simultaneously at the current simulation time.

  If `Dialer.isUsingNumActionsEvents()` returns `true`, this method must take into account the current number of action events while determining the additional number of calls to dial. In the simplest and most common cases, the method subtracts the result of `Dialer.getNumActionEvents()` to the number of calls to dial. However, in some cases, it might be necessary to use `Dialer.getNumActionEvents(int)` to get the number of action events for each contact type individually.

  Specified by:
    `getNumDials` in interface `DialerPolicy`
  Parameters:
    `dialer` - the triggered dialer.
  Returns:
    the number of calls the dialer should try to make.

### dialerStarted

    public void dialerStarted(Dialer dialer)

  Description copied from interface: `DialerPolicy`
  This method is called when the dialer using this policy is started.

  Specified by:
    `dialerStarted` in interface `DialerPolicy`
  Parameters:
    `dialer` - the started dialer.

### dialerStopped

    public void dialerStopped(Dialer dialer)

  Description copied from interface: `DialerPolicy`
  This method is called when the dialer using this policy is stopped.

  Specified by:
    `dialerStopped` in interface `DialerPolicy`
  Parameters:
    `dialer` - the stopped dialer.

### setNumDials

    public void setNumDials(int n)

  Sets the number of dialed contacts to `n`.

  Parameters:
    `n` - the number of calls to make upon each trial.
  Throws:
    `IllegalArgumentException` - if `n` is negative.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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.