|
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.ctmc.LookupEvent
public class LookupEvent
Represents a call center event using random bits to select
the index of a subinterval corresponding to an event.
The executed selected event might perform some action or
a new indexed search.
A lookup event can be constructed from any array of call center events.
Alternatively, a method
createIndex(double[],CCEventFactory[],int,int)
is provided to construct a search index.
Constructor Summary | |
---|---|
LookupEvent(CCEvent[] events)
Creates a new lookup event selecting events from the given array events. |
Method Summary | |
---|---|
TransitionType |
actions(CallCenterCTMCKI ctmc,
int tr,
int rv,
int usedBits,
boolean changeState)
Performs the necessary actions for the transition, and returns the appropriate transition type. |
static LookupEvent |
createIndex(double[] prob,
CCEventFactory[] factories,
int numIntervals,
int maxBits)
Creates a search index by partitioning the [0, 1] in numIntervals subintervals, and using a maximum of maxBits randm bits for the indexed search. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LookupEvent(CCEvent[] events)
events
- the array of events.Method Detail |
---|
public TransitionType actions(CallCenterCTMCKI ctmc, int tr, int rv, int usedBits, boolean changeState)
CCEvent
CallCenterCTMCKI.nextStateInt(int)
in order to generate a transition.
Random bits can be obtained as needed by
using the given integer rv,
but the numUsedBits least significant
bits of rv are already used before
the method is called, i.e., to select the index
of an event in a lookup table.
actions
in interface CCEvent
ctmc
- the CTMC representing the call center.tr
- the number of transitions already done.rv
- the random integer used to simulate the transition.usedBits
- the number of bits already used in rv.changeState
- determines if the event can change the
state of the CTMC.
public static LookupEvent createIndex(double[] prob, CCEventFactory[] factories, int numIntervals, int maxBits)
prob
- the probabilities of occurrence of the events.factories
- the event factories.numIntervals
- the number of subintervals.maxBits
- the maximal number of bits.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |