|
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.StationaryContactArrivalProcess
public class StationaryContactArrivalProcess
Defines a contact arrival process with inter-arrival times following a stationary distribution. When an inter-arrival time is required, a random variate generator is used to get a random value.
Field Summary |
---|
Fields inherited from class umontreal.iro.lecuyer.contactcenters.contact.ContactArrivalProcess |
---|
contactEvent |
Constructor Summary | |
---|---|
StationaryContactArrivalProcess(ContactFactory factory,
RandomVariateGen timesGen)
Constructs a new contact arrival process creating contacts using the given factory and using timesGen to generate the inter-arrival times. |
|
StationaryContactArrivalProcess(Simulator sim,
ContactFactory factory,
RandomVariateGen timesGen)
Equivalent to StationaryContactArrivalProcess(ContactFactory,RandomVariateGen) ,
using the given simulator sim. |
Method Summary | |
---|---|
double |
getArrivalRate(double st,
double et)
Determines the mean arrival rate in time interval [s, e]. |
double |
getArrivalRate(int p)
Determines the arrival rate in period p 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. |
RandomVariateGen |
getTimesGen()
Returns the random variate generator used to generate the times between each arrival. |
double |
nextTime()
Computes and returns the time before the next contact arrival is simulated by this object. |
void |
setTimesGen(RandomVariateGen timesGen)
Sets the random variate generator for inter-arrival times to timesGen. |
String |
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, 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 StationaryContactArrivalProcess(ContactFactory factory, RandomVariateGen timesGen)
factory
- the factory creating contacts for this arrival process.timesGen
- the random variate generator used to generate
times between arrivals.public StationaryContactArrivalProcess(Simulator sim, ContactFactory factory, RandomVariateGen timesGen)
StationaryContactArrivalProcess(ContactFactory,RandomVariateGen)
,
using the given simulator sim.
Method Detail |
---|
public RandomVariateGen getTimesGen()
public void setTimesGen(RandomVariateGen timesGen)
timesGen
- the new random variate generator.
NullPointerException
- if timesGen is null.public double getArrivalRate(int p)
ContactArrivalProcess
If arrival rate is random, this returns the arrival rate
for the current replication.
One should use ContactArrivalProcess.getExpectedArrivalRate(int)
or ContactArrivalProcess.getExpectedArrivalRateB(int)
to get the
expected arrival rate.
If the arrival rate is not available,
throws an UnsupportedOperationException
.
getArrivalRate
in class ContactArrivalProcess
p
- the queried period index.
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 ContactArrivalProcess
st
- the starting time s.et
- the ending time e.
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 ContactArrivalProcess
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 ContactArrivalProcess
st
- the starting time s.et
- the ending time e.
public double nextTime()
ContactArrivalProcess
nextTime
in class ContactArrivalProcess
public String toString()
toString
in class ContactArrivalProcess
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |