|
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.EventWithTest
umontreal.iro.lecuyer.contactcenters.ctmc.EventWithSelection
public abstract class EventWithSelection
Represents an event that can select the
integers
k = 0,…, K - 1 and
p = 0,…, nk - 1 such that
0≤u - Wjnj - pWk < wk.
Here
0≤u1 < u2≤WN where
wk≤Wk≤W for
k = 0,…, K - 1,
and
nk≤N.
This can be interpreted as selecting an event
p = 0,…, nk - 1 of
type k, with each event of type k having weight wk.
This class can be used, e.g., to determine
if a uniform u generates a false transition, or
an abandonment of type k.
In this case, nk gives the number of queued
contacts of type k, wk = νk is the
abandonment rate for contacts of type k,
Wk = is the maximal possible abandonment rate
for contacts of type k,
and
N is the total queue capacity.
The integer p then corresponds to the position
of the contact in queue having abandoned.
To use this class, one must extend it to
provide implementations for getNumValues(CallCenterCTMCKI)
,
and getNumValues(CallCenterCTMCKI,int)
.
In the CCEvent.actions(CallCenterCTMCKI,int,int,int,boolean)
method,
one then calls selectType(CallCenterCTMCKI,int,int,int)
to select the event type.
Constructor Summary | |
---|---|
EventWithSelection(double minU,
double maxU,
int numBits,
int numTypes,
double maxWeight)
Constructs a new event with selection. |
Method Summary | |
---|---|
int |
getLastSelectedEvent()
Returns the index p of the last selected event among events of type k. |
abstract double |
getMaxWeight(CallCenterCTMCKI ctmc,
int k)
Returns the weight Wk corresponding to events of type k. |
int |
getNumTypes()
Returns the number K of event types. |
abstract int |
getNumValues(CallCenterCTMCKI ctmc)
Returns the sum ![]() |
abstract int |
getNumValues(CallCenterCTMCKI ctmc,
int k)
Returns the current value of nk. |
abstract double |
getWeight(CallCenterCTMCKI ctmc,
int k)
Returns the weight wk corresponding to events of type k. |
int |
selectType(CallCenterCTMCKI ctmc,
int tr,
int rv,
int usedBits)
Selects and returns an event type k. |
Methods inherited from class umontreal.iro.lecuyer.contactcenters.ctmc.EventWithTest |
---|
getMaxU, getMinU, getPosition, getU, isUSmallerThan |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface umontreal.iro.lecuyer.contactcenters.ctmc.CCEvent |
---|
actions |
Constructor Detail |
---|
public EventWithSelection(double minU, double maxU, int numBits, int numTypes, double maxWeight)
minU
- the value of u1.maxU
- the value of u2.numBits
- the number b of bits used to generate u when the test
cannot be completed only with u1, and u2.numTypes
- the number K of event types.maxWeight
- the maximal weight W.Method Detail |
---|
public int getNumTypes()
public int getLastSelectedEvent()
public abstract double getWeight(CallCenterCTMCKI ctmc, int k)
ctmc
- the tested CTMC.k
- the tested type.
public abstract double getMaxWeight(CallCenterCTMCKI ctmc, int k)
ctmc
- the tested CTMC.k
- the tested type.
public abstract int getNumValues(CallCenterCTMCKI ctmc, int k)
ctmc
- the tested CTMC.k
- the tested type.
public abstract int getNumValues(CallCenterCTMCKI ctmc)
ctmc
- the tested CTMC.
public int selectType(CallCenterCTMCKI ctmc, int tr, int rv, int usedBits)
getLastSelectedEvent()
can be used to obtain p.
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.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |