|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.contactcenters.contact.ContactArrivalProcess
umontreal.iro.lecuyer.contactcenters.contact.PoissonUniformArrivalProcess
umontreal.iro.lecuyer.contactcenters.contact.NORTADrivenArrivalProcess
public class NORTADrivenArrivalProcess
Represents an arrival process in which the numbers of arrivals
per-period are correlated negative binomial
random variables, generated using the NORTA method.
To generate the number of arrivals, the process first obtains a vector
= (X1,…, XP)
from the multivariate normal distribution with
mean vector
0 and covariance matrix
. Assuming that
is a correlation matrix, i.e., each element
is in [- 1, 1] and 1's are on its diagonal,
the vector of uniforms
U = (Φ(X1),…, Φ(XP)) is obtained, where
Φ(x) is the distribution function of a standard normal variable.
For main period p, the marginal probability distribution
for Ap
is assumed to be negative binomial with parameters
γp and ρp,
γp being a positive number and
0 < ρp < 1.
A0 and AP+1, the number of arrivals during the
preliminary and the wrap-up periods, respectively, are always 0
for this process.
Since the numbers of arrivals per-period are generated directly, this process does not arise as a Poisson arrival process. However, inter-arrival times are generated as if Ap* = round(BAp) was a Poisson variate. As a result, for each main period, the arrival process generates Ap* uniforms ranging from the beginning to the end of the period, and the uniforms are sorted to get inter-arrival times.
Field Summary |
---|
Fields inherited from class umontreal.iro.lecuyer.contactcenters.contact.PoissonUniformArrivalProcess |
---|
times |
Fields inherited from class umontreal.iro.lecuyer.contactcenters.contact.ContactArrivalProcess |
---|
contactEvent |
Constructor Summary | |
---|---|
NORTADrivenArrivalProcess(PeriodChangeEvent pce,
ContactFactory factory,
DoubleMatrix2D sigma,
double[] gammas,
double[] probs,
RandomStream stream)
Constructs a new NORTA-driven arrival process with period-change event pce, contact factory factory, correlation matrix sigma, negative binomial parameters (gammas[p], probs[p]), and random number stream stream. |
Method Summary | |
---|---|
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. |
double |
getNegBinGamma(int p)
Returns the value of γp, the negative binomial double-precision parameter associated with main period p. |
double |
getNegBinP(int p)
Returns the value of ρp, the negative binomial double-precision parameter associated with main period p. |
DoubleMatrix2D |
getSigma()
Returns the correlation matrix associated with this arrival process. |
void |
init()
Initializes the new arrival process. |
void |
setNegBinParams(int p,
double gammap,
double rhop)
Sets the parameters for the negative binomial of period p to γp and ρp. |
void |
setSigma(DoubleMatrix2D sigma)
Sets the associated correlation matrix to sigma. |
Methods inherited from class umontreal.iro.lecuyer.contactcenters.contact.PoissonUniformArrivalProcess |
---|
computeArrivalTimes, getArrivalRate, getArrivalRate, getArrivals, getExpectedArrivalRate, getPeriodChangeEvent, getStream, nextTime, setArrivals, 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, startStationary, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NORTADrivenArrivalProcess(PeriodChangeEvent pce, ContactFactory factory, DoubleMatrix2D sigma, double[] gammas, double[] probs, RandomStream stream)
pce
- the period-change event defining the periods.factory
- the contact factory instantiating contacts.sigma
- the correlation matrix.gammas
- the γ parameters for negative binomials.probs
- the ρ parameters for negative binomials.stream
- the random number stream for correlated
negative binomial vectors and uniform arrival times.
NullPointerException
- if one argument is null.
IllegalArgumentException
- if the dimensions of the
correlation matrix does not correspond to P×P,
or the length of ns or probs do not
correspond to number of main periods P.Method Detail |
---|
public DoubleMatrix2D getSigma()
public void setSigma(DoubleMatrix2D sigma)
sigma
- the new correlation matrix.
NullPointerException
- if sigma is null.
IllegalArgumentException
- if sigma is not a P×P
symmetric and positive-definite matrix.public double getNegBinGamma(int p)
p
- the main period index.
ArrayIndexOutOfBoundsException
- if p
is negative or greater than or equal to P.public double getNegBinP(int p)
p
- the main period index.
ArrayIndexOutOfBoundsException
- if p
is negative or greater than or equal to P.public void setNegBinParams(int p, double gammap, double rhop)
p
- the index of the main period.gammap
- the new value of γp.rhop
- the new value of ρp.
ArrayIndexOutOfBoundsException
- if p
is negative or greater than or equal to P.
IllegalArgumentException
- if the negative binomial parameters
are invalid.public void init()
ContactArrivalProcess
init
in interface ContactSource
init
in interface Initializable
init
in class PoissonUniformArrivalProcess
public double getExpectedArrivalRate(int p)
ContactArrivalProcess
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.
getExpectedArrivalRate
in class PoissonUniformArrivalProcess
p
- the queried period index.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |