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.expdelay
Class ExpectedDelayPredictor

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.expdelay.ExpectedDelayPredictor

All Implemented Interfaces:
  WaitingTimePredictor

Direct Known Subclasses:
  ExpectedDelayWithAbandonPredictor

    public class ExpectedDelayPredictor

extends Object
implements WaitingTimePredictor

Approximates the expected waiting time conditional on a given queue assuming that service times are i.i.d. exponential, and a queue is associated with each agent group. More specifically, let Qi(t) be the size of waiting queue i at time t, and Ni(t) be the total number of agents in group i. We suppose that agents in group i cannot pick up contacts in other queues than queue i. Assuming that service times at agent group i are i.i.d. exponential with mean 1/μi, the expected waiting time for a contact waiting at queue i is (Qi(t) + 1)/(μiNi(t)). The rates μi are initialized to 1, and should be changed using `setMu(int,double)`. Moreover, if K = I, the rates can be initialized automatically using `setMuWithContactTypes()`.

Constructor Summary
`ExpectedDelayPredictor()`

Method Summary
`double[]` | `getMu()` Returns an array containing a copy of the values of μi.
`double` | `getMu(int i)` Returns the currently used value of μi.
`Router` | `getRouter()` Returns a reference to the router associated with this predictor.
`double` | `getWaitingTime(Contact contact)` Returns a prediction of the waiting time of contact `contact` waiting in any queue.
`double` | `getWaitingTime(Contact contact, WaitingQueue queue)` Returns a prediction of the waiting time for the given contact `contact` conditional on the contact joining the waiting queue `queue`.
`void` | `init()` Resets any internal variable of this predictor.
`void` | `setMu(double[] mu)` Sets the values of μi to `mu`.
`void` | `setMu(int i, double m)` Sets the value of μi to `m`.
`void` | `setMuWithContactTypes()` Initializes the values of μi using the mean service time for contact types.
`void` | `setRouter(Router router)` Sets the router associated with this predictor to `router`.

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

Constructor Detail

### ExpectedDelayPredictor

    public ExpectedDelayPredictor()

Method Detail

### getRouter

    public Router getRouter()

  Description copied from interface: `WaitingTimePredictor`
  Returns a reference to the router associated with this predictor. By default, this returns `null` since no router is bound to a newly-constructed predictor. A router is associated with a predictor using the `WaitingTimePredictor.setRouter(Router)` method.

  Specified by:
    `getRouter` in interface `WaitingTimePredictor`
  Returns:
    a reference to the currently associated router.

### getWaitingTime

    public double getWaitingTime(Contact contact)

  Description copied from interface: `WaitingTimePredictor`
  Returns a prediction of the waiting time of contact `contact` waiting in any queue. This method returns `Double.NaN` if it cannot make a prediction for the given contact.

  Specified by:
    `getWaitingTime` in interface `WaitingTimePredictor`
  Parameters:
    `contact` - the contact for which we need a prediction.
  Returns:
    the global waiting time.

### getWaitingTime

    public double getWaitingTime(Contact contact,
                                 WaitingQueue queue)

  Description copied from interface: `WaitingTimePredictor`
  Returns a prediction of the waiting time for the given contact `contact` conditional on the contact joining the waiting queue `queue`. This method returns `Double.NaN` if it cannot make a prediction for the given contact, or the given waiting queue.

  Specified by:
    `getWaitingTime` in interface `WaitingTimePredictor`
  Parameters:
    `contact` - the contact for which a delay is predicted.
    `queue` - the target waiting queue.
  Returns:
    the predicted delay.

### init

    public void init()

  Description copied from interface: `WaitingTimePredictor`
  Resets any internal variable of this predictor.

  Specified by:
    `init` in interface `WaitingTimePredictor`

### setRouter

    public void setRouter(Router router)

  Description copied from interface: `WaitingTimePredictor`
  Sets the router associated with this predictor to `router`. When `router` is non-`null`, this method can also register any listener required to make the predictions. If the router associated with a predictor is changed, the predictor should unregister any listener associated with the previous router.

  Specified by:
    `setRouter` in interface `WaitingTimePredictor`
  Parameters:
    `router` - the new router.

### getMu

    public double getMu(int i)

  Returns the currently used value of μi.

  Parameters:
    `i` - the waiting queue index.
  Returns:
    the value of μi.

### getMu

    public double[] getMu()

  Returns an array containing a copy of the values of μi.

  Returns:
    an array containing the values of μi.

### setMu

    public void setMu(int i,
                      double m)

  Sets the value of μi to `m`.

  Parameters:
    `i` - the index of the affected waiting queue.
    `m` - the new value of μi.

### setMu

    public void setMu(double[] mu)

  Sets the values of μi to `mu`.

  Parameters:
    `mu` - the array containing the new values of μi.

### setMuWithContactTypes

    public void setMuWithContactTypes()

  Initializes the values of μi using the mean service time for contact types. This method assumes that K = I, i.e., there is a waiting queue for each contact type. In that setting, the service rate μi is initialized using the mean service time for contact type i.

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.