|
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.msk.model.RandomStreams
public class RandomStreams
Encapsulates the random streams used by the blend/multi-skill call center simulator. The model uses one random stream for each type of random variate for better synchronization when using common random numbers. This class creates, stores, and manages all these random streams.
Often, this class is not used directly since
the CallCenter
class provides a constructor
which implicitly creates the random streams.
However, it can be useful to get the RandomStreams
object of a model, using
the CallCenter.getRandomStreams()
method, in order to retrieve the reference to
a particular random stream, or to pass the random
streams to a new model.
Creating several models with the same
random streams can improve
synchronization when comparing systems with
common random numbers.
However, if several instances of CallCenter
are used in parallel,
each instance should have its own random streams.
The clone()
method can be used if seeds must be shared between
two instances of this class.
Field Summary | |
---|---|
static int |
NUMAGENTGROUPSTREAMS
Number of streams for agent groups. |
static int |
NUMAPSTREAMS
Number of random streams for arrival processes. |
static int |
NUMDIALERSTREAMS
Number of streams for dialers. |
static int |
NUMFACTORYSTREAMS
Number of random streams for a contact factory. |
static int |
NUMFACTORYSTREAMS2
Number of random streams for a contact factory. |
Constructor Summary | |
---|---|
RandomStreams(RandomStreamFactory rsf,
CallCenterParams ccParams)
Creates a new set of random streams using the random stream factory rsf, and the call center parameters ccParams. |
Method Summary | |
---|---|
RandomStreams |
clone()
Creates a clone of this object and all the contained random streams. |
void |
createStreams(CallCenterParams ccParams)
Creates the necessary random streams for supporting K = ![]() ![]() |
RandomStream |
getAgentGroupStream(int i,
AgentGroupStreamType s)
Returns the random stream of type s used by the agent group i. |
RandomStream |
getArrivalProcessPStream(int ki)
Returns the random stream used to select generated call type for the ki-th arrival process generating calls of multiple types. |
RandomStream |
getArrivalProcessStream(int ki,
ArrivalProcessStreamType s)
Returns the random stream of type s used by the arrival process with index ki. |
RandomStream |
getCallFactoryStream(int k,
CallFactoryStreamType s)
Returns the random stream of type s used by the contact factory with index k. |
RandomStream |
getCallFactoryStream2(int k,
CallFactoryStreamType2 s)
Similar to getCallFactoryStream(int,CallFactoryStreamType) ,
for a complementary set of
random streams. |
RandomStream |
getDialerPStream(int ko)
Returns the random stream used to select generated call type for the ko-th dialer generating calls of multiple types. |
RandomStream |
getDialerStream(int ko,
DialerStreamType s)
Returns the random stream of type s used by the dialer with index ko. |
RandomStreamFactory |
getRandomStreamFactory()
Returns the random stream factory used by the createStreams(CallCenterParams) method of
this object to create random
streams. |
Set<RandomStream> |
getRandomStreamsInit()
Returns the set regrouping random streams used during the initialization of replications only. |
Set<RandomStream> |
getRandomStreamsSim()
Returns the set of random streams regrouping random streams used during the whole simulation. |
RandomStream |
getStreamAgentSelection()
Returns the random stream used for agent selection during routing, if agent selection is randomized. |
RandomStream |
getStreamB()
Returns the random stream used for the global busyness factor. |
RandomStream |
getStreamContactSelection()
Returns the random stream used for contact selection during routing, if contact selection is randomized. |
RandomStream |
getStreamCT()
Returns the random stream used for generating contact type indices while the system is initialized non-empty, for a simulation on an infinite horizon using batch means. |
void |
moveToInit()
|
void |
setRandomStreamFactory(RandomStreamFactory rsf)
Sets the associated random stream factory to rsf. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NUMFACTORYSTREAMS
public static final int NUMFACTORYSTREAMS2
public static final int NUMAPSTREAMS
public static final int NUMDIALERSTREAMS
public static final int NUMAGENTGROUPSTREAMS
Constructor Detail |
---|
public RandomStreams(RandomStreamFactory rsf, CallCenterParams ccParams)
This method sets the random stream factory returned by
getRandomStreamFactory()
, and
calls createStreams(CallCenterParams)
.
rsf
- the random stream factory used to
create each RandomStream
instance.ccParams
- the parameters of the call center
for which random streams are created.
NullPointerException
- if rsf
or ccParams are null.Method Detail |
---|
public void createStreams(CallCenterParams ccParams)
ccParams
- the parameters of the call center.
NullPointerException
- if ccParams
is null.public void moveToInit()
public RandomStreamFactory getRandomStreamFactory()
createStreams(CallCenterParams)
method of
this object to create random
streams.
public void setRandomStreamFactory(RandomStreamFactory rsf)
createStreams(CallCenterParams)
,
not already created streams.
rsf
- the new random stream factory.
NullPointerException
- if rsf is null.public Set<RandomStream> getRandomStreamsInit()
public Set<RandomStream> getRandomStreamsSim()
public RandomStream getStreamCT()
public RandomStream getStreamB()
public RandomStream getCallFactoryStream(int k, CallFactoryStreamType s)
k
- the index of the call factory.s
- the type of the stream.
public RandomStream getCallFactoryStream2(int k, CallFactoryStreamType2 s)
getCallFactoryStream(int,CallFactoryStreamType)
,
for a complementary set of
random streams.
These streams, used for call transfer and virtual
queueing, were added at a later time, so
a second set was used to avoid
changing the seeds of other streams.
k
- the index of the call factory.s
- the type of the complementary stream.
public RandomStream getArrivalProcessStream(int ki, ArrivalProcessStreamType s)
ki
- the index of the arrival process.s
- the type of the stream.
public RandomStream getArrivalProcessPStream(int ki)
ki
- the index of the arrival process.
public RandomStream getDialerStream(int ko, DialerStreamType s)
ko
- the index of the dialer.s
- the type of the stream.
public RandomStream getDialerPStream(int ko)
ko
- the index of the dialer.
public RandomStream getAgentGroupStream(int i, AgentGroupStreamType s)
i
- the index of the agent group.s
- the type of the stream.
public RandomStream getStreamAgentSelection()
public RandomStream getStreamContactSelection()
public RandomStreams clone()
CloneableRandomStream
and calling clone()
.
Each generator in the cloned object has
the same properties and seeds as the
corresponding generator in the original object.
clone
in class Object
ClassCastException
- if at least one encapsulated random stream does not
implement the CloneableRandomStream
interface.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |