|
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.RandomTypeCallFactory
public class RandomTypeCallFactory
This class is similar to RandomTypeContactFactory
,
but it allows the probability of generating each contact type to
change from periods to periods, and possibly depends on the
presence of agents in groups.
More specifically, the factory contains
a K×P 2D array giving a weight
pk, p to each call type k
and main period p.
Each time a call is requested, the current main period is determined,
and a weight is assigned to each call type.
If the selection takes account of the presence of agents,
weights corresponding to call types for which no agent is available
are reset to 0.
The weights are then summed up, and normalized to give
probabilities which are used to select a call type.
Constructor Summary | |
---|---|
RandomTypeCallFactory(CallCenter cc,
double[][] probMainPeriod,
RandomStream stream,
boolean checkAgents)
Constructs a new random-type call factory using period-change event associated with cc to obtain the current main period, and random stream stream to generate random numbers. |
Method Summary | |
---|---|
double[][] |
getProbPeriod()
Returns a copy of the K×P 2D array giving the values of pk, p. |
double |
getProbPeriod(int k,
int p)
Returns the value of pk, p. |
RandomStream |
getStream()
Returns the random stream used by this factory. |
Contact |
newInstance()
Constructs and returns a new Contact object. |
int |
nextIndex()
Generates and returns a new type identifier. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomTypeCallFactory(CallCenter cc, double[][] probMainPeriod, RandomStream stream, boolean checkAgents)
cc
- the call center object.probMainPeriod
- the main period and call factory specific probabilities.stream
- the random stream used to generate random numbers.checkAgents
- determines if the call factory
checks that there are agents capable of serving the
call before producing a call of a given type.
NullPointerException
- if any argument is null.
IllegalArgumentException
- if the lengths of
factories and probMainPeriod are different.Method Detail |
---|
public int nextIndex()
public Contact newInstance()
ContactFactory
Contact
object.
If a contact cannot be instantiated, a
ContactInstantiationException
is thrown.
newInstance
in interface ContactFactory
public double[][] getProbPeriod()
public double getProbPeriod(int k, int p)
public RandomStream getStream()
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |