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 PoissonArrivalProcessWithThinning

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.contact.ContactArrivalProcess
          umontreal.iro.lecuyer.contactcenters.contact.PoissonArrivalProcess
              umontreal.iro.lecuyer.contactcenters.contact.PoissonArrivalProcessWithThinning

All Implemented Interfaces:
  ContactSource, Initializable, Named, ToggleElement

    public class PoissonArrivalProcessWithThinning

extends PoissonArrivalProcess

Defines a Poisson arrival process with arrival rate Bλ(t)≤B for time t, and generated using the thinning method. This arrival process generates pseudo-arrivals as a homogeneous Poisson process with rate B. A pseudo-arrival at time t is accepted, i.e., becomes an arrival, with probability λ(t)/, and rejected with probability 1 - λ(t)/.

Field Summary

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

Constructor Summary
`PoissonArrivalProcessWithThinning(ContactFactory factory, RandomStream stream, RandomStream uStream, MathFunction lambda, double lambdaMax, double maxTime)` Constructs a new thinned Poisson arrival process using `factory` to generate contacts, `stream` to generate pseudo-arrivals, `uStream` to test for acceptance or rejection, `lambda` for λ(t), and `lambdaMax` for .
`PoissonArrivalProcessWithThinning(Simulator sim, ContactFactory factory, RandomStream stream, RandomStream uStream, MathFunction lambda, double lambdaMax, double maxTime)` Equivalent to `PoissonArrivalProcessWithThinning(ContactFactory,RandomStream,RandomStream,MathFunction,double,double)`, using the given simulator `sim`.

Method Summary
`double` | `getArrivalRate(double st, double et)` Determines the mean arrival rate in time interval [s, e].
`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` | `getLambda()` Returns the value of .
`MathFunction` | `getLambdaFunction()` Returns the λ(t) function.
`double` | `getMaximalTime()` Returns the smallest time T for which λ(t) = 0 for all t≥T.
`RandomStream` | `getRejectionStream()` Returns the random stream for tests of acceptance.
`double` | `nextTime()` Computes and returns the time before the next contact arrival is simulated by this object.
`void` | `setLambda(double lambda)` Sets the value of to `lambda`.
`void` | `setLambdaFunction(MathFunction lambda)` Sets the λ(t) function to `lambda`.
`void` | `setMaximalTime(double maxTime)` Sets the maximal time T to `maxTime`.
`void` | `setRejectionStream(RandomStream uStream)` Sets the random stream for tests of acceptance to `uStream`.
`void` | `startStationary()` This method calls `ContactArrivalProcess.start()` assuming that the λ arrival rate will not change during simulation.

Methods inherited from class umontreal.iro.lecuyer.contactcenters.contact.PoissonArrivalProcess
`clearCache, getArrivalRate, getExpectedArrivalRate, getGenWithCache, getInstanceFromMLE, getMLE, getStream, init, initCache, isCaching, setCaching, setStream, toString`

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

### PoissonArrivalProcessWithThinning

    public PoissonArrivalProcessWithThinning(ContactFactory factory,
                                             RandomStream stream,
                                             RandomStream uStream,
                                             MathFunction lambda,
                                             double lambdaMax,
                                             double maxTime)

  Constructs a new thinned Poisson arrival process using `factory` to generate contacts, `stream` to generate pseudo-arrivals, `uStream` to test for acceptance or rejection, `lambda` for λ(t), and `lambdaMax` for .

  Parameters:
    `factory` - the contact factory used to construct contacts.
    `stream` - the random stream for pseudo-arrivals.
    `uStream` - the random stream for tests of acceptance.
    `lambda` - the function λ(t).
    `lambdaMax` - the value of .
    `maxTime` - the smallest time T for which λ(t) = 0 for any t≥T.
  Throws:
    `NullPointerException` - if any argument is `null`.
    `IllegalArgumentException` - if `lambdaMax` is negative, infinite, or NaN, or if `maxTime` is negative.

### PoissonArrivalProcessWithThinning

    public PoissonArrivalProcessWithThinning(Simulator sim,
                                             ContactFactory factory,
                                             RandomStream stream,
                                             RandomStream uStream,
                                             MathFunction lambda,
                                             double lambdaMax,
                                             double maxTime)

  Equivalent to `PoissonArrivalProcessWithThinning(ContactFactory,RandomStream,RandomStream,MathFunction,double,double)`, using the given simulator `sim`.

Method Detail

### getLambdaFunction

    public MathFunction getLambdaFunction()

  Returns the λ(t) function.

  Returns:
    the λ(t) function.

### setLambdaFunction

    public void setLambdaFunction(MathFunction lambda)

  Sets the λ(t) function to `lambda`.

  Parameters:
    `lambda` - the new λ(t) function.
  Throws:
    `NullPointerException` - if `lambda` is `null`.

### getLambda

    public double getLambda()

  Returns the value of .

  Overrides:
    `getLambda` in class `PoissonArrivalProcess`
  Returns:
    the current value of λ.

### setLambda

    public void setLambda(double lambda)

  Sets the value of to `lambda`.

  Overrides:
    `setLambda` in class `PoissonArrivalProcess`
  Parameters:
    `lambda` - the new value of λ.
  Throws:
    `IllegalArgumentException` - if `lambdaMax` is negative, infinite, or NaN.

### getRejectionStream

    public RandomStream getRejectionStream()

  Returns the random stream for tests of acceptance.

  Returns:
    the random stream for tests of acceptance.

### setRejectionStream

    public void setRejectionStream(RandomStream uStream)

  Sets the random stream for tests of acceptance to `uStream`.

  Parameters:
    `uStream` - the new random stream for tests of acceptance.
  Throws:
    `NullPointerException` - if `uStream` is `null`.

### getMaximalTime

    public double getMaximalTime()

  Returns the smallest time T for which λ(t) = 0 for all t≥T. This corresponds to the maximal time an arrival can occur.

  Returns:
    the maximal time.

### setMaximalTime

    public void setMaximalTime(double maxTime)

  Sets the maximal time T to `maxTime`.

  Parameters:
    `maxTime` - the new maximal time T.
  Throws:
    `IllegalArgumentException` - if `maxTime` is negative.

### startStationary

    public void startStationary()

  Description copied from class: `PoissonArrivalProcess`
  This method calls `ContactArrivalProcess.start()` assuming that the λ arrival rate will not change during simulation. Subclasses violating this assumption should override this method.

  Overrides:
    `startStationary` in class `PoissonArrivalProcess`

### nextTime

    public double nextTime()

  Description copied from class: `ContactArrivalProcess`
  Computes and returns the time before the next contact arrival is simulated by this object. If this method returns `Double.POSITIVE_INFINITY`, no more arrival events will be scheduled until the arrival process is reinitialized.

  Overrides:
    `nextTime` in class `PoissonArrivalProcess`
  Returns:
    the time before the next arrival.

### 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 `PoissonArrivalProcess`
  Parameters:
    `st` - the starting time s.
    `et` - the ending time e.
  Returns:
    the expected arrival rate in the given time interval.

### getArrivalRate

    public double getArrivalRate(double st,
                                 double et)

  Description copied from class: `ContactArrivalProcess`
  Determines the mean arrival rate in time interval [s, e]. 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 λ(t) is the arrival rate at time t, this method returns the result of

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

  If arrival rate is random, this returns the arrival rate for the current replication. One should use `ContactArrivalProcess.getExpectedArrivalRate(double,double)` or `ContactArrivalProcess.getExpectedArrivalRateB(double,double)` to get the expected arrival rate.

  This method returns 0 if e≤s.

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

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

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.