|
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.PoissonArrivalProcessWithThinning
public class PoissonArrivalProcessWithThinning
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 ![]() |
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 |
---|
public PoissonArrivalProcessWithThinning(ContactFactory factory, RandomStream stream, RandomStream uStream, MathFunction lambda, double lambdaMax, double maxTime)
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.
NullPointerException
- if any argument is null.
IllegalArgumentException
- if lambdaMax is
negative, infinite, or NaN, or if maxTime is
negative.public PoissonArrivalProcessWithThinning(Simulator sim, ContactFactory factory, RandomStream stream, RandomStream uStream, MathFunction lambda, double lambdaMax, double maxTime)
PoissonArrivalProcessWithThinning(ContactFactory,RandomStream,RandomStream,MathFunction,double,double)
,
using the given simulator sim.
Method Detail |
---|
public MathFunction getLambdaFunction()
public void setLambdaFunction(MathFunction lambda)
lambda
- the new
λ(t) function.
NullPointerException
- if lambda is
null.public double getLambda()
getLambda
in class PoissonArrivalProcess
public void setLambda(double lambda)
setLambda
in class PoissonArrivalProcess
lambda
- the new value of λ.
IllegalArgumentException
- if lambdaMax is
negative, infinite, or NaN.public RandomStream getRejectionStream()
public void setRejectionStream(RandomStream uStream)
uStream
- the new random stream for tests of acceptance.
NullPointerException
- if uStream is null.public double getMaximalTime()
public void setMaximalTime(double maxTime)
maxTime
- the new maximal time T.
IllegalArgumentException
- if maxTime is
negative.public void startStationary()
PoissonArrivalProcess
ContactArrivalProcess.start()
assuming
that the λ arrival rate will not
change during simulation.
Subclasses violating this assumption
should override this method.
startStationary
in class PoissonArrivalProcess
public double nextTime()
ContactArrivalProcess
nextTime
in class PoissonArrivalProcess
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 PoissonArrivalProcess
st
- the starting time s.et
- the ending time e.
public double getArrivalRate(double st, double et)
ContactArrivalProcess
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.
getArrivalRate
in class PoissonArrivalProcess
st
- the starting time s.et
- the ending time e.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |