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.contact
Class PoissonArrivalProcessWithRandomRates

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.contact.ContactArrivalProcess
          umontreal.iro.lecuyer.contactcenters.contact.PoissonArrivalProcess
              umontreal.iro.lecuyer.contactcenters.contact.PiecewiseConstantPoissonArrivalProcess
                  umontreal.iro.lecuyer.contactcenters.contact.PoissonArrivalProcessWithRandomRates

All Implemented Interfaces:
  ContactSource, Initializable, Named, PeriodChangeListener, ToggleElement

    public class PoissonArrivalProcessWithRandomRates

extends PiecewiseConstantPoissonArrivalProcess

Represents a poisson arrival process with piecewise-constant randomized arrival rates following a user-defined distribution. When constructing an arrival process of this type, one gives a specific random variate generator for each period. The arrival rates are generated independently for each period, each time the process is initialized.

Field Summary

Fields inherited from class umontreal.iro.lecuyer.contactcenters.contact.PiecewiseConstantPoissonArrivalProcess
`busyGen, s_bgammaParam, s_numMC, varianceEpsilon`

Fields inherited from class umontreal.iro.lecuyer.contactcenters.contact.ContactArrivalProcess
`contactEvent`

Constructor Summary
`PoissonArrivalProcessWithRandomRates(PeriodChangeEvent pce, ContactFactory factory, RandomVariateGen[] genLambdas, RandomStream stream)` Constructs a new Poisson-gamma arrival process using `factory` to instantiate contacts.

Method Summary
`double` | `getExpectedArrivalRate(double st, double et)` Determines the expected mean arrival rate in time interval [s, e] for this arrival process assuming that the expected value of the busyness factor is 1.
`double` | `getExpectedArrivalRate(int p)` Determines the expected arrival rate in period `p` for this arrival process assuming that the expected value of the busyness factor is 1.
`RandomVariateGen[]` | `getRateGenerators()` Returns the random variate generators for the arrival rates..
`void` | `init()` Initializes the new arrival process.
`void` | `setRateGenerators(RandomVariateGen[] genLambdas)` Sets the random variate generators for the arrival rates to `genLambdas`.

Methods inherited from class umontreal.iro.lecuyer.contactcenters.contact.PiecewiseConstantPoissonArrivalProcess
`changePeriod, getArrivalRate, getArrivalRate, getInstanceFromMLE, getLambdas, getMLE, getMLENegMulti, getNumMC, getPeriodChangeEvent, getVarianceEpsilon, isNormalizing, setLambdas, setNormalizing, setNumMC, setVarianceEpsilon, startStationary, stop, toString`

Methods inherited from class umontreal.iro.lecuyer.contactcenters.contact.PoissonArrivalProcess
`clearCache, getGenWithCache, getInstanceFromMLE, getLambda, getStream, initCache, isCaching, nextTime, setCaching, setLambda, setStream`

Methods inherited from class umontreal.iro.lecuyer.contactcenters.contact.ContactArrivalProcess
`addNewContactListener, clearNewContactListeners, getArrivalRates, getBusynessFactor, getContactFactory, getExpectedArrivalRateB, getExpectedArrivalRateB, getExpectedArrivalRates, getExpectedArrivalRatesB, getExpectedBusynessFactor, getName, getNewContactListeners, getNextArrivalTime, init, isStarted, notifyNewContact, removeNewContactListener, setBusynessFactor, setContactFactory, setExpectedBusynessFactor, setName, setSimulator, simulator, start, start, stop`

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

Constructor Detail

### PoissonArrivalProcessWithRandomRates

    public PoissonArrivalProcessWithRandomRates(PeriodChangeEvent pce,
                                                ContactFactory factory,
                                                RandomVariateGen[] genLambdas,
                                                RandomStream stream)

  Constructs a new Poisson-gamma arrival process using `factory` to instantiate contacts. For each period `p`, the parameters of the random rate are given in `genLambdas[p]`. The random stream `stream` is used to generate the uniforms for the exponential times.

  Parameters:
    `pce` - the period-change event associated with this object.
    `factory` - the factory creating contacts for this generator.
    `genLambdas` - the random variate generators, for each period.
    `stream` - random number stream for the exponential variates.
  Throws:
    `IllegalArgumentException` - if there is not one generator for each period.
    `NullPointerException` - if any argument is `null`.

Method Detail

### getRateGenerators

    public RandomVariateGen[] getRateGenerators()

  Returns the random variate generators for the arrival rates..

  Returns:
    the random variate generators for the arrival rates.

### setRateGenerators

    public void setRateGenerators(RandomVariateGen[] genLambdas)

  Sets the random variate generators for the arrival rates to `genLambdas`.

  Parameters:
    `genLambdas` - the random variate generators, for each period.
  Throws:
    `NullPointerException` - if `genLambdas` is `null`.
    `IllegalArgumentException` - if the length of the given array does not correspond to at least the number of periods.

### getExpectedArrivalRate

    public double getExpectedArrivalRate(int p)

  Description copied from class: `ContactArrivalProcess`
  Determines the expected arrival rate in period `p` for this arrival process assuming that the expected value of the busyness factor is 1. The arrival rate corresponds to the expected number of arrivals per simulation time unit during the specified period; one must multiply the rate by the period duration to get the expected number of arrivals during the period. If arrival rates are deterministic, this returns the same value as `ContactArrivalProcess.getArrivalRate(int)`.

  If [B]≠1, one should use `ContactArrivalProcess.getExpectedArrivalRateB(int)` which takes the expectation of the busyness factor into account.

  If the expected arrival rate is not available, throws an `UnsupportedOperationException`. This is the default behavior of this method if not overridden by a subclass.

  Overrides:
    `getExpectedArrivalRate` in class `PiecewiseConstantPoissonArrivalProcess`
  Parameters:
    `p` - the queried period index.
  Returns:
    the expected arrival rate in that period.

### getExpectedArrivalRate

    public double getExpectedArrivalRate(double st,
                                         double et)

  Description copied from class: `ContactArrivalProcess`
  Determines the expected mean arrival rate in time interval [s, e] for this arrival process assuming that the expected value of the busyness factor is 1. The arrival rate corresponds to the expected number of arrivals per simulation time unit during the specified interval; one must multiply the rate by the interval length to get the expected number of arrivals during the interval. If arrival rates are deterministic, this returns the same value as `ContactArrivalProcess.getArrivalRate(double,double)`. If λ(t) is the arrival rate at time t, this method returns

  [λ(t)]dt/(e - s).

  If [B]≠1, one should use `ContactArrivalProcess.getExpectedArrivalRateB(double,double)` which takes the expectation of the busyness factor into account.

  This method returns 0 if e≤s.

  If the expected arrival rate is not available, throws an `UnsupportedOperationException`. This is the default behavior of this method if not overridden by a subclass.

  Overrides:
    `getExpectedArrivalRate` in class `PiecewiseConstantPoissonArrivalProcess`
  Parameters:
    `st` - the starting time s.
    `et` - the ending time e.
  Returns:
    the expected arrival rate in the given time interval.

### init

    public void init()

  Description copied from class: `ContactArrivalProcess`
  Initializes the new arrival process. If this method is overridden by a subclass, it is important to call `super.init()` in order to ensure that everything is initialized correctly.

  Specified by:
    `init` in interface `ContactSource`
  Specified by:
    `init` in interface `Initializable`
  Overrides:
    `init` in class `PiecewiseConstantPoissonArrivalProcess`

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.