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.router
Class WaitingQueueSelectors

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.router.WaitingQueueSelectors

    public final class WaitingQueueSelectors

extends Object

Provides some convenience methods for selecting a waiting queue from a list of indices. Each static method of this class returns a reference to the selected waiting queue or `null` if no waiting queue can be chosen. They must be given a list of indices used to reference waiting queues in the given router. One can also specify an optional array of booleans indicating which indices will be taken into account. The list of indices is traversed the same way as with `AgentGroupSelectors` except that `Router.getWaitingQueue(int)` is used instead of `Router.getAgentGroup(int)`.

Method Summary
`static WaitingQueue` | `selectFirstNonEmpty(Router router, int[] ind)` Equivalent to `selectFirstNonEmpty` `(router, ind, null)`.
`static WaitingQueue` | `selectFirstNonEmpty(Router router, int[] ind, boolean[] subset)` Selects, from the given list of indices, the first waiting queue containing at least one contact.
`static WaitingQueue` | `selectLastNonEmpty(Router router, int[] ind)` Equivalent to `selectLastNonEmpty` `(router, ind, null)`.
`static WaitingQueue` | `selectLastNonEmpty(Router router, int[] ind, boolean[] subset)` Selects, from the given list of indices, the last waiting queue containing at least one contact.
`static WaitingQueue` | `selectLongest(Router router, int[] ind)` Equivalent to `selectLongest` `(router, ind, null)`.
`static WaitingQueue` | `selectLongest(Router router, int[] ind, boolean[] subset)` Returns a reference to the longest waiting queue in the given list.
`static WaitingQueue` | `selectLongestWeightedWaitingTime(Router router, int[] ind, double[] weights)` Equivalent to `selectLongestWeightedWaitingTime` `(router, ind, weights, null)`.
`static WaitingQueue` | `selectLongestWeightedWaitingTime(Router router, int[] ind, double[] weights, boolean[] subset)` Selects the waiting queue containing the contact with the longest weighted waiting time, assuming that waiting queues attached to the router use FIFO discipline.
`static WaitingQueue` | `selectSmallestFirstEnqueueTime(Router router, int[] ind)` Equivalent to `selectSmallestFirstEnqueueTime` `(router, ind, null)`.
`static WaitingQueue` | `selectSmallestFirstEnqueueTime(Router router, int[] ind, boolean[] subset)` Selects the waiting queue containing the contact with the smallest enqueue time, assuming that waiting queues attached to the router use FIFO discipline.

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

Method Detail

### selectFirstNonEmpty

    public static WaitingQueue selectFirstNonEmpty(Router router,
                                                   int[] ind,
                                                   boolean[] subset)

  Selects, from the given list of indices, the first waiting queue containing at least one contact.

  Parameters:
    `router` - the router used to map indices in the given list to `WaitingQueue` references.
    `ind` - the list of waiting queue indices.
    `subset` - the subset of indices to take into account when traversing the given list.
  Returns:
    the selected waiting queue.

### selectFirstNonEmpty

    public static WaitingQueue selectFirstNonEmpty(Router router,
                                                   int[] ind)

  Equivalent to `selectFirstNonEmpty` `(router, ind, null)`.

### selectLastNonEmpty

    public static WaitingQueue selectLastNonEmpty(Router router,
                                                  int[] ind,
                                                  boolean[] subset)

  Selects, from the given list of indices, the last waiting queue containing at least one contact.

  Parameters:
    `router` - the router used to map indices in the given list to `WaitingQueue` references.
    `ind` - the list of waiting queue indices.
    `subset` - the subset of indices to take into account when traversing the given list.
  Returns:
    the selected waiting queue.

### selectLastNonEmpty

    public static WaitingQueue selectLastNonEmpty(Router router,
                                                  int[] ind)

  Equivalent to `selectLastNonEmpty` `(router, ind, null)`.

### selectLongest

    public static WaitingQueue selectLongest(Router router,
                                             int[] ind,
                                             boolean[] subset)

  Returns a reference to the longest waiting queue in the given list.

  Parameters:
    `router` - the router used to map indices in the given list to `WaitingQueue` references.
    `ind` - the list of waiting queue indices.
    `subset` - the subset of indices to take into account when traversing the given list.
  Returns:
    the selected waiting queue.

### selectLongest

    public static WaitingQueue selectLongest(Router router,
                                             int[] ind)

  Equivalent to `selectLongest` `(router, ind, null)`.

### selectSmallestFirstEnqueueTime

    public static WaitingQueue selectSmallestFirstEnqueueTime(Router router,
                                                              int[] ind,
                                                              boolean[] subset)

  Selects the waiting queue containing the contact with the smallest enqueue time, assuming that waiting queues attached to the router use FIFO discipline. This allows the router to consider a set of waiting queues as a single queue when dequeueing contacts.

  Parameters:
    `router` - the router used to map indices in the given list with `WaitingQueue` references.
    `ind` - the list of waiting queue indices.
    `subset` - the subset of indices to take into account when traversing the given list.
  Returns:
    the selected waiting queue.

### selectSmallestFirstEnqueueTime

    public static WaitingQueue selectSmallestFirstEnqueueTime(Router router,
                                                              int[] ind)

  Equivalent to `selectSmallestFirstEnqueueTime` `(router, ind, null)`.

### selectLongestWeightedWaitingTime

    public static WaitingQueue selectLongestWeightedWaitingTime(Router router,
                                                                int[] ind,
                                                                double[] weights,
                                                                boolean[] subset)

  Selects the waiting queue containing the contact with the longest weighted waiting time, assuming that waiting queues attached to the router use FIFO discipline. The given array `weights` assigned a weight wq to each of the Q waiting queues attached to the router. This method considers each queues referred to by the array of indices, and selects the non-empty queue for which wqWq is maximal, where Wq is the waiting time of the first contact in queue q.

  Parameters:
    `router` - the router used to map indices in the given list with `WaitingQueue` references.
    `ind` - the list of waiting queue indices.
    `weights` - the array of weights assigned to waiting queues.
    `subset` - the subset of indices to take into account when traversing the given list.
  Returns:
    the selected waiting queue.

### selectLongestWeightedWaitingTime

    public static WaitingQueue selectLongestWeightedWaitingTime(Router router,
                                                                int[] ind,
                                                                double[] weights)

  Equivalent to `selectLongestWeightedWaitingTime` `(router, ind, weights, null)`.

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.