|
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.PoissonGammaArrivalProcess
public class PoissonGammaArrivalProcess
Represents a doubly-stochastic Poisson process with piecewise-constant
randomized arrival rates [13].
The base arrival rates λp are constant during each period,
but they are not deterministic:
for period p, the base rate of the Poisson
process is defined as λp times a gamma random variable with
shape and scale parameters
αG, p, and mean 1.
However, if
αG, p or
λp
are 0, the resulting arrival rate during period p is always set to 0.
As with the Poisson process with deterministic arrival rates,
the generated base arrival rates are multiplied by a global busyness
factor B for the day, and also by a busyness factor Bp specific to
each period of the day in order to get the arrival rates.
Because the values of
λ(t) are generated once for a replication,
in the init()
method, not calling this method
before the simulation starts could lead to unpredictable
arrival rates.
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 | |
---|---|
PoissonGammaArrivalProcess(PeriodChangeEvent pce,
ContactFactory factory,
double[] galphas,
double[] glambdas,
RandomStream stream,
RandomStream streamBusyness)
Constructs a new Poisson-gamma arrival process using factory to instantiate contacts. |
|
PoissonGammaArrivalProcess(PeriodChangeEvent pce,
ContactFactory factory,
double[] galphas,
double[] glambdas,
RandomStream stream,
RandomStream streamBusyness,
RandomVariateGen bgen)
|
Method Summary | |
---|---|
RandomStream |
getBusynessStream()
Returns the random stream used to generate the busyness factors for this arrival process. |
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. |
double[] |
getGammaAlphas()
Returns the parameters αG, p of the gamma distribution for busyness. |
double[] |
getGammaLambdas()
Returns the λp parameters for the rates. |
static PoissonGammaArrivalProcess |
getInstanceFromMLE(PeriodChangeEvent pce,
ContactFactory factory,
RandomStream stream,
RandomStream streamBusyness,
int[][] arrivals,
int numObs,
int numPeriods)
Constructs a new arrival process with gamma arrival rates 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 Poisson-gamma arrival process from the number of arrivals in the array arrivals. |
static double[] |
getMLEBB(int[][] arrivals,
int numObs,
int numPeriods,
int numMC,
ArrivalProcessParams arrPar)
Estimates the parameters of a Poisson-gamma arrival process for the case of a global busyness factor for the day, and specific busyness factors for each period of the day, from the number of arrivals in the array arrivals. |
void |
init()
Initializes the new arrival process. |
void |
setBusynessStream(RandomStream streamBusyness)
Changes the random stream used to generate the busyness factors for this arrival process. |
void |
setGammaParams(double[] galphas,
double[] glambdas)
Sets the αG, p and λp parameters for the busyness and the arrival rates to galphas and glambdas, respectively. |
String |
toString()
|
Methods inherited from class umontreal.iro.lecuyer.contactcenters.contact.PiecewiseConstantPoissonArrivalProcess |
---|
changePeriod, getArrivalRate, getArrivalRate, 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 PoissonGammaArrivalProcess(PeriodChangeEvent pce, ContactFactory factory, double[] galphas, double[] glambdas, RandomStream stream, RandomStream streamBusyness)
pce
- the period-change event associated with this object.factory
- the factory creating contacts for this generator.galphas
- the
αG, p parameters for the gamma variates for busyness.glambdas
- the
λp arrival rates.stream
- random number stream for the exponential variates.streamBusyness
- random number stream for the gamma rate values.
IllegalArgumentException
- if there is not one rate
for each period.
NullPointerException
- if any argument is null.public PoissonGammaArrivalProcess(PeriodChangeEvent pce, ContactFactory factory, double[] galphas, double[] glambdas, RandomStream stream, RandomStream streamBusyness, RandomVariateGen bgen)
Method Detail |
---|
public double[] getGammaAlphas()
public double[] getGammaLambdas()
public void setGammaParams(double[] galphas, double[] glambdas)
galphas
- the new
αG, p parameters.glambdas
- the new
λp rates.
NullPointerException
- if the given arrays are null.
IllegalArgumentException
- if the length of the given
arrays does not correspond to at least the number of periods.public RandomStream getBusynessStream()
public void setBusynessStream(RandomStream streamBusyness)
streamBusyness
- random number stream for the busyness factors.
NullPointerException
- if the parameter is null.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 double getExpectedArrivalRate(double st, double et)
ContactArrivalProcess
ContactArrivalProcess.getArrivalRate(double,double)
.
If
λ(t) is the arrival rate at time t, this
method returns
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.
getExpectedArrivalRate
in class PiecewiseConstantPoissonArrivalProcess
st
- the starting time s.et
- the ending time e.
public void init()
ContactArrivalProcess
init
in interface ContactSource
init
in interface Initializable
init
in class PiecewiseConstantPoissonArrivalProcess
public String toString()
toString
in class PiecewiseConstantPoissonArrivalProcess
public static double[] getMLE(int[][] arrivals, int numObs, int numPeriods)
arrivals
- the number of arrivals during each day and period.numObs
- the number of days.numPeriods
- the number of periods.
public static PoissonGammaArrivalProcess getInstanceFromMLE(PeriodChangeEvent pce, ContactFactory factory, RandomStream stream, RandomStream streamBusyness, int[][] arrivals, int numObs, int numPeriods)
getMLE(int[][],int,int)
.
For the preliminary period, the parameters of the first main
period are used. For the wrap-up periods,
both parameters are set to 0; as a result,
the arrival rate is always 0 during the wrap-up period.
pce
- the period-change event marking the end of periods.factory
- the contact factory used to create contacts.stream
- random stream to generate arrival times.streamBusyness
- random stream to generate busyness factors.arrivals
- the number of arrivals.numObs
- the number of days.numPeriods
- the number of periods.
public static double[] getMLEBB(int[][] arrivals, int numObs, int numPeriods, int numMC, ArrivalProcessParams arrPar)
arrivals
- the number of arrivals during each day and period.numObs
- the number of days.numPeriods
- the number of periods.numMC
- the number of MonteCarlo samples used in the estimation.arrPar
- other parameters of the arrival process.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |