|
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.PoissonArrivalProcessWithTimeIntervals
public class PoissonArrivalProcessWithTimeIntervals
Represents a Poisson arrival process with piecewise-constant
arrival rates that can change at arbitrary moments during the simulation.
This process is similar to PiecewiseConstantPoissonArrivalProcess
,
except the times arrival rates change do not need to correspond to
main periods.
More specifically, let
t0 < ... < tL be an increasing
sequence of simulation times, and let
Bλj, for
j = 0,…, L - 1, be the arrival rate
during time interval
[tj, tj+1).
The arrival rate is 0 for t < t0 and t≥tL.
Field Summary |
---|
Fields inherited from class umontreal.iro.lecuyer.contactcenters.contact.ContactArrivalProcess |
---|
contactEvent |
Constructor Summary | |
---|---|
PoissonArrivalProcessWithTimeIntervals(ContactFactory factory,
double[] times,
double[] lambdas,
RandomStream stream)
Calls PoissonArrivalProcessWithTimeIntervals
(Simulator.getDefaultSimulator(), factory, times, lambdas, stream). |
|
PoissonArrivalProcessWithTimeIntervals(Simulator sim,
ContactFactory factory,
double[] times,
double[] lambdas,
RandomStream stream)
Constructs a new arrival process using the simulator sim, the contact factory factory for creating contacts, times t0,…, tL in array times, and arrival rates in array lambdas. |
Method Summary | |
---|---|
double |
getArrivalRate(double st,
double et)
Determines the mean arrival rate in time interval [s, e]. |
double[] |
getArrivalRatesInt()
Similar to ContactArrivalProcess.getArrivalRates(double[]) ,
for the arrival rates per interval. |
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[] |
getExpectedArrivalRatesBInt()
Similar to ContactArrivalProcess.getExpectedArrivalRatesB(double[]) ,
for the arrival rates per interval. |
double[] |
getExpectedArrivalRatesInt()
Similar to ContactArrivalProcess.getExpectedArrivalRates(double[]) ,
for the arrival rates per interval. |
double[] |
getTimes()
Returns the array of times containing t0,…, tL. |
void |
init()
Initializes the new arrival process. |
boolean |
isNormalizing()
Determines if the base arrival rates are normalized with length of intervals. |
void |
setNormalizing(boolean b)
Sets the arrival rates normalization indicator to b. |
void |
start()
Enables the element represented by this object. |
void |
startStationary()
This method calls ContactArrivalProcess.start() assuming
that the λ arrival rate will not
change during simulation. |
void |
stop()
Disables the element represented by this object. |
Methods inherited from class umontreal.iro.lecuyer.contactcenters.contact.PoissonArrivalProcess |
---|
clearCache, getArrivalRate, getExpectedArrivalRate, getGenWithCache, getInstanceFromMLE, getLambda, getMLE, getStream, initCache, isCaching, nextTime, setCaching, setLambda, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PoissonArrivalProcessWithTimeIntervals(ContactFactory factory, double[] times, double[] lambdas, RandomStream stream)
PoissonArrivalProcessWithTimeIntervals
(Simulator.getDefaultSimulator(), factory, times, lambdas, stream).
public PoissonArrivalProcessWithTimeIntervals(Simulator sim, ContactFactory factory, double[] times, double[] lambdas, RandomStream stream)
sim
- the simulator used to schedule events.factory
- the factory creating contacts for this arrival process.times
- the sequence of times at which arrival rate changes.lambdas
- the arrival rates.stream
- the random stream for inter-arrival times.
NullPointerException
- if any argument is null.
IllegalArgumentException
- if lambdas.length
is smaller than 1, or if times.length does not correspond
to lambdas.length plus 1, or
if times is not an increasing sequence of numbers.Method Detail |
---|
public boolean isNormalizing()
public void setNormalizing(boolean b)
b
- the new arrival rate normalization indicator.isNormalizing()
public double[] getTimes()
public double[] getArrivalRatesInt()
ContactArrivalProcess.getArrivalRates(double[])
,
for the arrival rates per interval.
public double[] getExpectedArrivalRatesInt()
ContactArrivalProcess.getExpectedArrivalRates(double[])
,
for the arrival rates per interval.
public double[] getExpectedArrivalRatesBInt()
ContactArrivalProcess.getExpectedArrivalRatesB(double[])
,
for the arrival rates per interval.
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.
public void init()
ContactArrivalProcess
init
in interface ContactSource
init
in interface Initializable
init
in class PoissonArrivalProcess
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 void start()
ToggleElement
IllegalStateException
if the element is already enabled.
start
in interface ToggleElement
start
in class ContactArrivalProcess
public void stop()
ToggleElement
IllegalStateException
if the element is already disabled.
stop
in interface ToggleElement
stop
in class ContactArrivalProcess
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |