|
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.SingleTypeContactFactory
umontreal.iro.lecuyer.contactcenters.msk.model.CallFactory
public class CallFactory
Contact factory used to create the calls for the simulator, and to generate call-specific random variates such as patience times and service times. The call factory also contains any information related to call types, such as name, properties, and the probability distribution for patience and service times.
Constructor Summary | |
---|---|
CallFactory(CallCenter cc,
CallCenterParams ccParams,
CallTypeParams par,
int k)
Constructs a new call factory using the call center cc, the call center parameters ccParams, the call-type parameters par, and call type index k. |
Method Summary | |
---|---|
static void |
checkInbound(int numInCallTypes,
List<ProducedCallTypeParams> types)
For each element in the list types, tests that the type identifier returned by the ProducedCallTypeParams.getType()
method is smaller than the given constant
numInCallTypes. |
static void |
checkOutbound(int numInCallTypes,
int numCallTypes,
List<ProducedCallTypeParams> types)
For each element in the list types, tests that the type identifier returned by the ProducedCallTypeParams.getType()
method is greater than or equal to numInCallTypes
but
smaller than
numCallTypes. |
static CallFactory |
create(CallCenter cc,
CallCenterParams ccParams,
int k)
Constructs a new call factory using call center cc, call center parameters ccParams, and call type index k. |
static RandomTypeCallFactory |
createRandomTypeContactFactory(CallCenter cc,
List<ProducedCallTypeParams> types,
RandomStream stream,
boolean checkAgents)
Constructs and returns a contact factory that can produce calls of randomly selected types. |
CallCenter |
getCallCenter()
Returns the call center object containing this call factory. |
ServiceTimesManager |
getConferenceTimesManager()
Returns an object managing the random variate generators for conference times between primary and secondary agents. |
double |
getExpectedWaitingTimeMult(int mp)
Returns the multiplier for the expected waiting time used to determine the time spent by a caller arriving during main period mp in the virtual queue. |
double |
getExpectedWaitingTimeThresh(int mp)
Returns the threshold on the expected waiting time for determining if a caller arrived during main period mp has the possibility to be called back. |
String |
getName()
Returns the name of the call type associated with this call factory. |
MultiPeriodGen |
getPatienceTimeGen()
Returns the patience time, converted to MultiPeriodGen . |
double |
getPatienceTimesMult()
Returns the current multiplier for patience times for calls generated by this factory. |
double |
getPatienceTimesMultCallBack(int mp)
Returns the multiplier of patience times for calls arriving during main period mp, joining the virtual queue, successuflly called back, and having to wait in regular queue. |
double |
getPatienceTimesMultNoVirtualQueue(int mp)
Returns the multiplier for patience times for callers arrived during main period mp, and deciding not to join the virtual queue. |
ServiceTimesManager |
getPreServiceTimesNoConfManager()
Returns an object managing the random variate generators for pre-service times with secondary agents if no conference with primary agents. |
double |
getProbAbandon(int mp)
Returns the probability of balking for main period mp. |
double |
getProbTransfer(int i,
int mp)
Returns the probability of transfer for a call of the associated type arrived during main period mp, and whose service finishes with a primary agent in group i. |
double |
getProbTransferWait(int i,
int mp)
Returns the probability of a primary agent waiting for transfer to finish, for a call of the associated type arrived during main period mp, and whose service finishes with a primary agent in group i. |
double |
getProbVirtualQueue(int mp)
Returns the probability that a caller arriving during main period mp accepts to enter virtual queue, and be called back later. |
double |
getProbVirtualQueueCallBack(int mp)
Returns the probability that a caller arriving during main period mp is successfully called back after joining the virtual queue. |
Map<String,Object> |
getProperties()
Returns the user-defined properties of the call type associated with this call factory. |
MultiPeriodGen |
getServiceTimeGen()
Returns the random variate generator for the default service times used when no agent group specific service times are available. |
MultiPeriodGen[] |
getServiceTimeGenGroups()
Similar to SingleTypeContactFactory.getContactTimeGenGroups() ,
but returns an array of MultiPeriodGen
instead. |
ServiceTimesManager |
getServiceTimesManager()
Returns an object managing the random variate generators for regular service times. |
double |
getServiceTimesMultCallBack(int i,
int mp)
Returns the multiplier of service times for callers arrived during main period mp, and served by an agent in group i after being called back. |
double |
getServiceTimesMultNoVirtualQueue(int i,
int mp)
Returns the multiplier of service times for callers arrived during main period mp, deciding not to join the virtual queue, and served by an agent in group i. |
double |
getServiceTimesMultTransfer(int i,
int mp)
Returns the multiplier for service times of callers arrived during main period mp, and served by an agent in group i before a transfer to another agent occurs. |
int |
getTargetVQType()
Returns the index of the call type calls entering virtual queue are changed to. |
ContactFactory |
getTransferTargetFactory()
Returns the contact factory used to generate transferred calls from calls of the associated type. |
ServiceTimesManager |
getTransferTimesManager()
Returns an object managing the random variate generators for transfer times. |
double |
getWeight()
Returns the default weight used when no per-period weight is available for the call type associated with this call factory. |
double |
getWeight(int mp)
Returns the weight of the associated call type during main period mp, or the result of getWeight() if no per-period weight was
given. |
void |
init()
Initializes this call factory by setting the multipliers for patience and service times. |
void |
initTransferTargets(CallCenterParams ccParams,
int k)
Constructs a contact factory used to generate calls resulting from transfers after service termination. |
boolean |
isCallTransferSupported()
Determines if call transfer is supported by this call factory. |
boolean |
isDisableCallSource()
Determines if calls of the associated type can be produced using a call source, e.g., an arrival process or a dialer. |
boolean |
isExcludedFromStatTotal()
Determines if calls of the associated type are excluded from the totals in statistical reports. |
boolean |
isVirtualHoldSupported()
Determines if virtual holding (or virtual queueing) is supported for the associated call type. |
void |
multiplyServiceTimesCallBack(Call call)
Similar to multiplyServiceTimesNoVirtualQueue(Call) ,
but using multipliers returned by getServiceTimesMultCallBack(int,int) . |
void |
multiplyServiceTimesNoVirtualQueue(Call call)
Applies the multipliers returned by getServiceTimesMultNoVirtualQueue(int,int)
to the given call call. |
Contact |
newInstance()
Creates a new instance of class Contact , and initializes it by
calling the SingleTypeContactFactory.setRandomVariables(Contact)
method. |
void |
setConferenceTimes(Call call)
Generates conference times for the given call call, and adds these conference times to the regular service times. |
void |
setDisableCallSource(boolean disableCallSource)
Sets the indicator for disabled call source to disableCallSource. |
void |
setExcludedFromStatTotal(boolean excludedFromStatTotal)
Sets the indicator for exclusion in totals to excludedFromStatTotal. |
void |
setPatienceTimeGen(RandomVariateGen gen)
Sets the random variate generator for patience times to pgen. |
void |
setPatienceTimesMult(double pgenMult)
Sets the multiplier for patience times to pgenMult. |
void |
setPreServiceTimesNoConf(Call call)
Similar to setConferenceTimes(Call) , for
pre-service times in the case when no conference
occurs. |
void |
setProbTransfer(int i,
double[] prob)
|
void |
setProbTransferWait(int i,
double[] prob)
|
void |
setRandomVariables(Contact contact)
Generates the random variates related to a contact, and assigns the generated value to the given contact object. |
void |
setTargetVQType(int targetVQType)
Sets the target call type for virtual queueing to targetVQType. |
Methods inherited from class umontreal.iro.lecuyer.contactcenters.contact.SingleTypeContactFactory |
---|
getAfterContactTimeGen, getAfterContactTimeGen, getAfterContactTimeGenGroups, getContactTimeGen, getContactTimeGen, getContactTimeGenGroups, getMeanAfterContactTime, getMeanContactTime, getProbBalkGenerator, getStreamBalk, getTypeId, setAfterContactTimeGen, setAfterContactTimeGenGroups, setContactTimeGen, setContactTimeGenGroups, setProbBalkGenerator, setSimulator, setStreamBalk, setTypeId, simulator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CallFactory(CallCenter cc, CallCenterParams ccParams, CallTypeParams par, int k) throws CallFactoryCreationException
cc
- the call center.ccParams
- the call center parameters.par
- the call-type parameters.k
- the call type index.
CallFactoryCreationException
- if an exception occurs during the creation of the factory.Method Detail |
---|
public void initTransferTargets(CallCenterParams ccParams, int k) throws CallFactoryCreationException
ccParams
- the parameters of the call center.k
- the identifier of the call type.
CallFactoryCreationException
- if an error occurs during the
creation of the call factory.public CallCenter getCallCenter()
public void init()
public double getPatienceTimesMult()
CallCenter.getPatienceTimesMult()
.
The default value of this multiplier is 1.
public void setPatienceTimesMult(double pgenMult)
pgenMult
- the new multiplier for patience times.
IllegalArgumentException
- if pgenMult is negative.public ServiceTimesManager getServiceTimesManager()
public ServiceTimesManager getConferenceTimesManager()
public ServiceTimesManager getPreServiceTimesNoConfManager()
public ServiceTimesManager getTransferTimesManager()
public static CallFactory create(CallCenter cc, CallCenterParams ccParams, int k) throws CallFactoryCreationException
OutboundCallFactory
for outbound types.
This method calls init()
on the constructed factory before returning it.
cc
- the call center model.ccParams
- the call center parameters.k
- the index of the call type.
CallFactoryCreationException
- if an exception occurs during the creation of the factory.public String getName()
public Map<String,Object> getProperties()
public double getWeight()
public double getWeight(int mp)
getWeight()
if no per-period weight was
given.
mp
- the index of the main period.
public double getProbAbandon(int mp)
mp
- the index of the main period.
public double getProbTransfer(int i, int mp)
i
- the index of the agent group.mp
- the index of the main period.
public void setProbTransfer(int i, double[] prob)
public double getProbTransferWait(int i, int mp)
i
- the index of the agent group.mp
- the index of the main period.
public void setProbTransferWait(int i, double[] prob)
public double getServiceTimesMultTransfer(int i, int mp)
i
- the index of the agent group.mp
- the index of the main period.
public boolean isCallTransferSupported()
getProbTransfer(int,int)
returns a non-zero
value for at least one pair (i, p), and
getTransferTargetFactory()
returns a non-null
value.
public boolean isVirtualHoldSupported()
getExpectedWaitingTimeThresh(int)
returns a
finite value for at least one p,
getProbVirtualQueue(int)
returns a non-zero
value for at least one p,
and
getTargetVQType()
returns a non-negative value.
public ContactFactory getTransferTargetFactory()
public double getPatienceTimesMultNoVirtualQueue(int mp)
mp
- the main period of arrival.
public double getPatienceTimesMultCallBack(int mp)
mp
- the main period of arrival.
public double getServiceTimesMultNoVirtualQueue(int i, int mp)
i
- the index of the agent group.mp
- the index of the main period.
public double getServiceTimesMultCallBack(int i, int mp)
i
- the index of the agent group.mp
- the index of the main period.
public void multiplyServiceTimesNoVirtualQueue(Call call)
getServiceTimesMultNoVirtualQueue(int,int)
to the given call call.
This changes
the service times returned by Contact.getContactTimes()
for the given call.
call
- the call whose service times are modified.public void multiplyServiceTimesCallBack(Call call)
multiplyServiceTimesNoVirtualQueue(Call)
,
but using multipliers returned by getServiceTimesMultCallBack(int,int)
.
call
- the call whose service times are modified.public int getTargetVQType()
public void setTargetVQType(int targetVQType)
targetVQType
- the new target type.public double getProbVirtualQueue(int mp)
mp
- the main period of arrival.
public double getProbVirtualQueueCallBack(int mp)
mp
- the main period of arrival.
public double getExpectedWaitingTimeThresh(int mp)
mp
- the main period of arrival.
public double getExpectedWaitingTimeMult(int mp)
mp
- the main period of arrival.
public Contact newInstance()
SingleTypeContactFactory
Contact
, and initializes it by
calling the SingleTypeContactFactory.setRandomVariables(Contact)
method.
newInstance
in interface ContactFactory
newInstance
in class SingleTypeContactFactory
public void setRandomVariables(Contact contact)
SingleTypeContactFactory
setRandomVariables
in class SingleTypeContactFactory
contact
- the contact object to set up.public void setConferenceTimes(Call call)
call
- the call being processed.public void setPreServiceTimesNoConf(Call call)
setConferenceTimes(Call)
, for
pre-service times in the case when no conference
occurs.
call
- the call being processed.public MultiPeriodGen getPatienceTimeGen()
MultiPeriodGen
.
Note that calling MultiPeriodGen.setMult(double)
on the returned instance is not recommended as the
multipliers are reset by init()
.
One should use setPatienceTimesMult(double)
or CallCenter.setPatienceTimesMult(double)
to alter the multipliers of the patience times.
getPatienceTimeGen
in class SingleTypeContactFactory
public void setPatienceTimeGen(RandomVariateGen gen)
SingleTypeContactFactory
setPatienceTimeGen
in class SingleTypeContactFactory
gen
- the new random variate generator for patience times.public MultiPeriodGen getServiceTimeGen()
Note that it is not recommended to use
MultiPeriodGen.setMult(double)
on the returned object.
One should alter the
multipliers provided by getServiceTimesManager()
instead.
public MultiPeriodGen[] getServiceTimeGenGroups()
SingleTypeContactFactory.getContactTimeGenGroups()
,
but returns an array of MultiPeriodGen
instead.
The same note for multipliers as
in method getServiceTimeGen()
applies here.
public boolean isDisableCallSource()
public void setDisableCallSource(boolean disableCallSource)
isDisableCallSource()
public boolean isExcludedFromStatTotal()
public void setExcludedFromStatTotal(boolean excludedFromStatTotal)
isExcludedFromStatTotal()
public static RandomTypeCallFactory createRandomTypeContactFactory(CallCenter cc, List<ProducedCallTypeParams> types, RandomStream stream, boolean checkAgents) throws CallFactoryCreationException
RandomTypeCallFactory
by using the probabilities obtained by parsing the list types.
Each element of this list gives a type identifier with associated probability
of selection.
See RandomTypeCallFactory
for more information
about how the selection is performed.
cc
- the call center model.types
- the list of produced contact types.stream
- the random stream used to select contact type.checkAgents
- determines if the call factory checks that there are agents
capable of serving the call before producing a call of a given
type.
CallFactoryCreationException
- if an error occurs during the creation of the factory.public static void checkInbound(int numInCallTypes, List<ProducedCallTypeParams> types)
ProducedCallTypeParams.getType()
method is smaller than the given constant
numInCallTypes. This condition is necessary for the indices to
represent inbound call types.
numInCallTypes
- the number of inbound call types.types
- the list of call type records to test.
IllegalArgumentException
- if at least one type identifier is invalid.public static void checkOutbound(int numInCallTypes, int numCallTypes, List<ProducedCallTypeParams> types)
ProducedCallTypeParams.getType()
method is greater than or equal to numInCallTypes
but
smaller than
numCallTypes. This condition is necessary for the indices to
represent inbound call types.
numInCallTypes
- the number of inbound call types.numCallTypes
- the number of call types, inbound or outbound.types
- the list of call type records to test.
IllegalArgumentException
- if numInCallTypes is greater than
numCallTypes, or
if at least one type identifier is invalid.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |