|
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.PoissonArrivalProcess
umontreal.iro.lecuyer.contactcenters.contact.PiecewiseConstantPoissonArrivalProcess
umontreal.iro.lecuyer.contactcenters.contact.DirichletCompoundArrivalProcess
public class DirichletCompoundArrivalProcess
Represents a generalization of the non-homogeneous Poisson process where the arrival rates are generated from a Dirichlet compound negative multinomial distribution [19]. As proven in [3], if the arrival rate of a Poisson process is a piecewise-constant function of the simulation time given by λ(t) = Bλp(t), B being a gamma-distributed busyness factor with shape parameter γ, the distribution of the vector (A1,…, AP) giving the number of arrivals in each main period is the negative multinomial with parameters (γ, ρ1,…, ρP+1) [12, page 292], where
for p = 1,…, P, and ρP+1 = 1 -This arrival process generalizes the previous process by modeling A = (A1,…, AP) with a Dirichlet compound negative multinomial distribution [19] instead of a negative multinomial. In this model, the user specifies γ as well as α1,…, αP+1. At the beginning of each replication, when base arrival rates are needed, the vector (ρ1,…, ρP+1) is generated from the Dirichlet distribution with parameters (α1,…, αP+1), and the base arrival rates λ1,…, λP are determined by solving (1). This results in λp = ρp/ρP+1. During preliminary and wrap-up periods, the base arrival rate is set to 0.
The inter-arrival times are generated using the rates Bλp, where B is a busyness given by the user. Note that this variability factor should be gamma-distributed with shape parameter γ and scale parameter 1 to remain consistent with the Dirichlet compound model.
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 | |
---|---|
DirichletCompoundArrivalProcess(PeriodChangeEvent pce,
ContactFactory factory,
double[] alphas,
RandomStream stream,
RandomStream streamRates)
Constructs a new Dirichlet compound Poisson arrival process. |
Method Summary | |
---|---|
double |
getAlpha(int p)
Returns the value of the αp parameter for the Dirichlet distribution. |
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. |
static DirichletCompoundArrivalProcess |
getInstanceFromMLE(PeriodChangeEvent pce,
ContactFactory factory,
RandomStream stream,
RandomStream streamRates,
int[][] arrivals,
int numObs,
int numPeriods)
Constructs a new arrival process with parameters estimated by the maximum likelihood method based on the numObs observations in array arrivals. |
static double[] |
getMLE(int[][] arrivals,
int numObs,
int numPeriods)
Estimates the parameters of a Dirichlet compound negative multinomial arrival process with a busyness factor following the gamma (γ, 1) distribution from the number of arrivals in the array arrivals. |
RandomStream |
getRateStream()
Returns the random stream used to generate the rates for the Poisson arrival process. |
void |
init()
Initializes the new arrival process. |
void |
setAlphas(double[] alphas)
Sets the Dirichlet parameters αp for this object. |
void |
setRateStream(RandomStream streamRates)
Changes the random stream used to generate the rates for the Poisson arrival process to streamRates. |
String |
toString()
|
Methods inherited from class umontreal.iro.lecuyer.contactcenters.contact.PiecewiseConstantPoissonArrivalProcess |
---|
changePeriod, getArrivalRate, getArrivalRate, getExpectedArrivalRate, getInstanceFromMLE, getLambdas, getMLENegMulti, getNumMC, getPeriodChangeEvent, getVarianceEpsilon, isNormalizing, setLambdas, setNormalizing, setNumMC, setVarianceEpsilon, startStationary, stop |
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 |
---|
public DirichletCompoundArrivalProcess(PeriodChangeEvent pce, ContactFactory factory, double[] alphas, RandomStream stream, RandomStream streamRates)
pce
- the period-change event associated with this object.factory
- the factory creating contacts for this generator.alphas
- the values of the αp parameters.stream
- the random number stream for the exponential variates.streamRates
- the random number stream for the Dirichlet compound
arrival rates.
IllegalArgumentException
- if the number of main
periods is not alphas.length - 1, or if one αp value
is negative or 0.
NullPointerException
- if any argument is null.Method Detail |
---|
public double getAlpha(int p)
p
- the index of the parameter.
public void setAlphas(double[] alphas)
alphas
- a new vector of parameters.
IllegalArgumentException
- if the length of alphas
is smaller than P + 1, where P is the
number of main periods, or if one or more αp values
are negative or 0.public RandomStream getRateStream()
public void setRateStream(RandomStream streamRates)
streamRates
- the random number generator for the λp values.
NullPointerException
- if the parameter is null.public void init()
ContactArrivalProcess
init
in interface ContactSource
init
in interface Initializable
init
in class PiecewiseConstantPoissonArrivalProcess
public String toString()
toString
in class PiecewiseConstantPoissonArrivalProcess
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 PiecewiseConstantPoissonArrivalProcess
p
- the queried period index.
public static double[] getMLE(int[][] arrivals, int numObs, int numPeriods)
PiecewiseConstantPoissonArrivalProcess.s_bgammaParam
.
arrivals
- the number of arrivals during each day and period.numObs
- the number of days.numPeriods
- the number of periods.
public static DirichletCompoundArrivalProcess getInstanceFromMLE(PeriodChangeEvent pce, ContactFactory factory, RandomStream stream, RandomStream streamRates, int[][] arrivals, int numObs, int numPeriods)
PiecewiseConstantPoissonArrivalProcess.s_bgammaParam
.
pce
- the period-change event marking the end of periods.factory
- the contact factory used to create contacts.stream
- the random stream to generate arrival times.streamRates
- the random stream to generate Dirichlet vectors from.arrivals
- the number of arrivals.numObs
- the number of days.numPeriods
- the number of periods.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |