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 ArrivalProcessManager

    java.lang.Object
      umontreal.iro.lecuyer.xmlbind.NamedInfo
          umontreal.iro.lecuyer.contactcenters.msk.model.CallSourceManager
              umontreal.iro.lecuyer.contactcenters.msk.model.ArrivalProcessManager

    public class ArrivalProcessManager

extends CallSourceManager

Encapsulates the parameters of an arrival process, constructs the corresponding `ContactArrivalProcess` object, and updates its state during simulation.

Field Summary
`static RandomVariateGenParams` | `s_bgenParams` This field is initialized by `estimateParameters(CallCenterParams,ArrivalProcessParams,int,double)` when the distribution of a busyness factor is estimated in addition to parameters of arrival process.

Constructor Summary
`ArrivalProcessManager(CallCenter cc, ArrivalProcessParams par, int k)` Constructs a new arrival process manager for the call center model `cc`, the parameters `par`, and with index `k`.

Method Summary
`static void` | `addArrivalProcessFactory(ArrivalProcessFactory apf)` Registers the arrival process factory `apf` for arrival process managers.
`protected ContactArrivalProcess` | `createArrivalProcess(ArrivalProcessParams par, int k, ContactFactory factory)` Constructs and returns the arrival process to be managed.
`static boolean` | `estimateParameters(CallCenterParams ccParams, ArrivalProcessParams par, int numPeriods, double periodDuration)` Estimates the parameters of the arrival process described by `par`, for a call center with `numPeriods` main periods with duration `periodDuration`.
`ContactArrivalProcess` | `getArrivalProcess()` Returns the associated arrival process.
`double` | `getArrivalsMult()` Returns the value of the multiplier for the arrival rates.
`void` | `init(double b)` Initializes the managed arrival process by calling `ContactArrivalProcess.init(double)`.
`void` | `setArrivalsMult(double arrivalsMult)` Sets the multiplier for arrival rates to `arrivalsMult`.

Methods inherited from class umontreal.iro.lecuyer.contactcenters.msk.model.CallSourceManager
`getSourceToggleTimes, isSourceEnabled, setSourceToggleTimes`

Methods inherited from class umontreal.iro.lecuyer.xmlbind.NamedInfo
`getName, getProperties, getStringProperties`

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

Field Detail

### s_bgenParams

    public static RandomVariateGenParams s_bgenParams

  This field is initialized by `estimateParameters(CallCenterParams,ArrivalProcessParams,int,double)` when the distribution of a busyness factor is estimated in addition to parameters of arrival process. In such a case, the field is initialized with the parameters of a random variate generator for the busyness factor. Otherwise, this field is `null`.

Constructor Detail

### ArrivalProcessManager

    public ArrivalProcessManager(CallCenter cc,
                                 ArrivalProcessParams par,
                                 int k)
                          throws ArrivalProcessCreationException

  Constructs a new arrival process manager for the call center model `cc`, the parameters `par`, and with index `k`. If `k` is smaller than the number of inbound call types defined by the model, this creates an arrival process producing calls of the single type `k`. Otherwise, the arrival process can produce calls of multiple types.

  Parameters:
    `cc` - the call center model.
    `par` - the parameters of the arrival process.
    `k` - the index of the arrival process.
  Throws:
    `ArrivalProcessCreationException` - if an error occurs during the creation of the arrival process.

Method Detail

### getArrivalsMult

    public double getArrivalsMult()

  Returns the value of the multiplier for the arrival rates.

  Returns:
    the multiplier for the arrival rates.

### setArrivalsMult

    public void setArrivalsMult(double arrivalsMult)

  Sets the multiplier for arrival rates to `arrivalsMult`.

  Parameters:
    `arrivalsMult` - the new multiplier.
  Throws:
    `IllegalArgumentException` - if `arrivalsMult` is negative.

### getArrivalProcess

    public ContactArrivalProcess getArrivalProcess()

  Returns the associated arrival process.

  Returns:
    the associated arrival process.

### createArrivalProcess

    protected ContactArrivalProcess createArrivalProcess(ArrivalProcessParams par,
                                                         int k,
                                                         ContactFactory factory)
                                                  throws ArrivalProcessCreationException

  Constructs and returns the arrival process to be managed. This method uses `ArrivalProcessParams.getType()` to get a type identifier for the arrival process. It then retrieves parameters and initializes an arrival process specific to the given type. If the name of the arrival process corresponds to a constant in `ArrivalProcessType`, the method handles its construction directly. Otherwise, it queries every factory registered using `addArrivalProcessFactory(ArrivalProcessFactory)` until it finds one capable of creating the arrival process. If no such factory can create the process, it uses the `ServiceLoader` class to find an arrival process factory. If that last step fails, an arrival-process creation exception is thrown.

  Parameters:
    `par` - the parameters of the arrival process.
    `k` - the call type identifier.
    `factory` - the call factory that will be attached to the new process.
  Returns:
    the constructed arrival process.
  Throws:
    `ArrivalProcessCreationException` - if an error occurs during the construction of the arrival process.

### addArrivalProcessFactory

    public static void addArrivalProcessFactory(ArrivalProcessFactory apf)

  Registers the arrival process factory `apf` for arrival process managers. If the user-specified type of arrival process does not correspond to a predefined process, the registered factories are queried to find one capable of creating an arrival process. This method must be called before the call-center simulator is initialized.

  Parameters:
    `apf` - the new arrival process factory to register.

### estimateParameters

    public static boolean estimateParameters(CallCenterParams ccParams,
                                             ArrivalProcessParams par,
                                             int numPeriods,
                                             double periodDuration)

  Estimates the parameters of the arrival process described by `par`, for a call center with `numPeriods` main periods with duration `periodDuration`. The method replaces the data stored in `par` with estimated parameters using an algorithm depending on the type of arrival process. If returns `true` if parameters were estimated, and `false` if there were no parameters to estimate. If parameter estimation is needed but fails, an illegal-argument exception is thrown.

  More specifically, the method returns `false` if no data is stored in the given parameter object. If the type of arrival process corresponds to a constant in `ArrivalProcessType`, parameter estimation is handled directly by this method. Otherwise, the method queries every arrival process factory registered using `addArrivalProcessFactory(ArrivalProcessFactory)` until it finds a factory capable of performing the estimation. If no such factory exists, it uses the `ServiceLoader` class to find a factory dynamically. If this last step fails, the method throws an illegal-argument exception.

  Parameters:
    `par` - the parameters of the arrival process.
    `numPeriods` - the number of main periods.
    `periodDuration` - the duration of main periods.
  Returns:
    a boolean indicating if parameter estimation was performed.

### init

    public void init(double b)

  Initializes the managed arrival process by calling `ContactArrivalProcess.init(double)`. The busyness factor given to the arrival process is the argument `b` multiplied by the product of the multiplier returned by `getArrivalsMult()`, and the global multiplier returned by `CallCenter.getArrivalsMult()`. The expectation [B] is also set to these product of multipliers, multiplied by the mean value of B that can be generated using the generator returned by `CallCenter.getBusynessGen()`.

  Parameters:
    `b` - the generated base busyness factor.

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.