|
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.app.AbstractContactCenterInfo
umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterEval
umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterSim
umontreal.iro.lecuyer.contactcenters.ctmc.AbstractCallCenterCTMCSim
public abstract class AbstractCallCenterCTMCSim
Base class for simulators of call centers using a
continuous-time Markov chain.
Any instance of this class encapsulates a CTMC,
statistical counters concerning replications,
and statistical probes for collecting observations
for the replications.
The simulator is constructed from
an instance of CallCenterParams
which is usually obtained
from a XML parameter file.
Field Summary | |
---|---|
protected double[] |
awt
|
protected CallCenter |
cc
|
protected CallCenterStat |
ccStat
|
protected CallCenterCounters |
counters
|
protected CallCenterCTMC |
ctmc
|
protected int |
mp
|
protected RateChangeTransitions |
rateChange
|
protected CTMCRepSimParams |
simParams
|
protected ContactTrace |
trace
|
Fields inherited from class umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterSim |
---|
autoResetStartStream, seqSampEachEval |
Constructor Summary | |
---|---|
AbstractCallCenterCTMCSim(CallCenter cc,
CTMCRepSimParams simParams,
int mp)
|
|
AbstractCallCenterCTMCSim(CallCenterParams ccParams,
CTMCRepSimParams simParams,
int mp)
Constructs a new simulator using call center parameters ccParams, experiment parameters simParams, and concentrating on main period mp of the model. |
|
AbstractCallCenterCTMCSim(CallCenterParams ccParams,
CTMCRepSimParams simParams,
RandomStreams streams,
int mp)
|
Method Summary | |
---|---|
protected void |
addObs()
|
void |
addTransitionListener(TransitionListener listener)
|
void |
clearTransitionListeners()
|
void |
eval()
Performs a simulation to evaluate the performance measures. |
static String |
formatInfo(CallCenterCTMC ctmc)
|
void |
formatReport()
|
String |
getAgentGroupName(int i)
Returns the name associated with the agent group identifier i. |
Map<String,String> |
getAgentGroupProperties(int i)
This method is similar to ContactCenterInfo.getContactTypeProperties(int) ,
for agent groups instead of contact types. |
static double[] |
getAWT(CallCenter cc,
int mp)
|
int |
getCompletedSteps()
Returns the number of completed steps for the simulation. |
double |
getConfidenceLevel()
Returns the confidence level of the intervals output by ContactCenterEval.formatStatistics() . |
String |
getContactTypeName(int k)
Returns the name associated with the contact type k, where k is a number greater than or equal to 0 and smaller than ContactCenterInfo.getNumContactTypes() . |
Map<String,String> |
getContactTypeProperties(int k)
Returns the properties associated with contact type k. |
CallCenterCTMC |
getCTMC()
|
static CallCenterCTMC |
getCTMC(CallCenter cc,
int mp,
boolean keepQueues,
int[] maxNumAgents,
boolean needsCallMix,
int[][] thresholds,
boolean alwaysUseSearchIndex)
|
int |
getCurrentPeriod()
|
TimeUnit |
getDefaultUnit()
Returns the time unit in which output performance measures representing times are expressed. |
Object |
getEvalOption(EvalOptionType option)
Returns the current value of the evaluation option option. |
EvalOptionType[] |
getEvalOptions()
Returns the array of the evaluation option types supported by the implementing object. |
String |
getMatrixOfAWTName(int m)
Returns the name associated with the matrix of AWTs with index m. |
MatrixOfStatProbes<?> |
getMatrixOfStatProbes(PerformanceMeasureType m)
Returns the matrix of statistical probes used to manage observations for estimating the performance measures in group m. |
int[] |
getMaxNumAgents()
|
CallCenter |
getModel()
|
int |
getNumAgentGroups()
Returns the total number of agent groups supported by this contact center. |
int |
getNumContactTypes()
Returns the total number of contact types supported by this contact center. |
abstract double |
getNumExpectedTransitions()
|
double |
getNumFalseTransitions()
|
int |
getNumInContactTypes()
Returns the total number of inbound contact types for this contact center. |
int |
getNumMainPeriods()
Returns the number of main periods used for evaluation, as defined in PeriodChangeEvent . |
int |
getNumMatricesOfAWT()
Returns the number of matrices containing acceptable waiting times, for estimating service levels. |
int |
getNumOutContactTypes()
Returns the total number of outbound contact types for this contact center. |
int |
getNumWaitingQueues()
Returns the total number of waiting queues capable of storing contacts. |
double[] |
getObs(PerformanceMeasureType pm,
int row,
int column)
Returns an array containing the observations for a performance measure of type pm, identified by row row and column column. |
PerformanceMeasureType[] |
getPerformanceMeasures()
Returns an array containing all the groups of performance measures this object can estimate. |
int |
getQueueCapacity()
|
ReportParams |
getReportParams()
Returns the parameters for reports formatted by ContactCenterEval.formatStatistics() , or
ContactCenterEval.formatStatisticsExcel(WritableWorkbook) . |
int |
getRequiredNewSteps()
|
int[] |
getStaffing()
|
int[][] |
getStaffingMatrix()
|
CallCenterStat |
getStat()
|
Tally |
getStatNumFalseTransitions()
|
double |
getTimeHorizon()
|
List<TransitionListener> |
getTransitionListeners()
|
String |
getWaitingQueueName(int q)
Returns the name of the waiting queue with index q used by the evaluation. |
Map<String,String> |
getWaitingQueueProperties(int q)
This method is similar to ContactCenterInfo.getContactTypeProperties(int) ,
for waiting queues instead of contact types. |
boolean |
hasEvalOption(EvalOptionType option)
Determines if the evaluation option option is supported by the implemented system. |
protected void |
initReplication(RandomStream stream,
double timeHorizon,
int ntr)
|
protected void |
initStat()
|
void |
initTimer()
|
void |
newSeeds()
Changes the seeds of the random number generators used during the simulation. |
void |
notifyInit(int r,
int mp,
CallCenterCTMC ctmc)
|
void |
notifyTransition(int r,
int mp1,
CallCenterCTMC ctmc1,
TransitionType type)
|
int |
numberObs(PerformanceMeasureType pm,
int row,
int column)
Returns the number of observations available for a performance measure of type pm, identified by row row and column column. |
void |
removeTransitionListener(TransitionListener listener)
|
void |
reset()
Resets this contact center evaluation system for new parameters. |
void |
resetNextSubstream()
Calls RandomStream.resetNextSubstream()
for all random streams used by the simulator. |
void |
resetStartStream()
Calls RandomStream.resetStartStream()
for all random streams used by the simulator. |
void |
resetStartSubstream()
Calls RandomStream.resetStartSubstream()
for all random streams used by the simulator. |
boolean |
seemsUnstable()
Determines if the system seems to be unstable. |
void |
setConfidenceLevel(double level)
Sets the level of confidence for the intervals output by ContactCenterEval.formatStatistics()
to level. |
void |
setCurrentPeriod(int mp)
|
void |
setEvalOption(EvalOptionType option,
Object value)
Sets the evaluation option option to value. |
void |
setMaxNumAgents(int[] maxNumAgents)
|
void |
setQueueCapacity(int q)
|
void |
setStaffing(int[] staffing)
|
void |
setStaffingMatrix(int[][] staffingMatrix)
|
void |
setStat(CallCenterStat ccStat)
|
void |
setTimeHorizon(double timeHorizon)
|
abstract void |
simulate(RandomStream stream1,
double timeHorizon,
int n)
|
static void |
traceStep(CallCenterCTMC ctmc,
TransitionType type,
ContactTrace trace,
int step,
int period)
|
Methods inherited from class umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterSim |
---|
formatStatistics, formatStatisticsExcel, formatStatisticsLaTeX, getAutoResetStartStream, getConfidenceInterval, getConfidenceInterval, getMatrixOfFunctionOfMultipleMeansTallies, getMatrixOfTallies, getMax, getMin, getOneSimDone, getPerformanceMeasure, getSeqSampEachEval, getVariance, hasPerformanceMeasure, setAutoResetStartStream, setOneSimDone, setSeqSampEachEval |
Methods inherited from class umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterEval |
---|
getEvalInfo, isVerbose, setReportParams, setVerbose |
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.app.ContactCenterSim |
---|
getAutoResetStartStream, getConfidenceInterval, getMatrixOfFunctionOfMultipleMeansTallies, getMatrixOfTallies, getMax, getMin, getSeqSampEachEval, getVariance, setAutoResetStartStream, setSeqSampEachEval |
Methods inherited from interface umontreal.iro.lecuyer.contactcenters.app.ContactCenterEval |
---|
formatStatistics, formatStatisticsExcel, formatStatisticsLaTeX, getEvalInfo, getPerformanceMeasure, hasPerformanceMeasure, isVerbose, setReportParams, setVerbose |
Field Detail |
---|
protected CallCenter cc
protected int mp
protected CallCenterCTMC ctmc
protected CallCenterCounters counters
protected CallCenterStat ccStat
protected ContactTrace trace
protected double[] awt
protected RateChangeTransitions rateChange
protected CTMCRepSimParams simParams
Constructor Detail |
---|
public AbstractCallCenterCTMCSim(CallCenterParams ccParams, CTMCRepSimParams simParams, int mp) throws CallCenterCreationException, CTMCCreationException
ccParams
- the parameters of the call center.simParams
- the parameters of the experiment.mp
- the index of the simulated main period.
CallCenterCreationException
- if an error
occurs during the creation of the call center.
CTMCCreationException
- if an exception occurs
during the creation of the CTMC.public AbstractCallCenterCTMCSim(CallCenterParams ccParams, CTMCRepSimParams simParams, RandomStreams streams, int mp) throws CallCenterCreationException, CTMCCreationException
CallCenterCreationException
CTMCCreationException
public AbstractCallCenterCTMCSim(CallCenter cc, CTMCRepSimParams simParams, int mp) throws CTMCCreationException
CTMCCreationException
Method Detail |
---|
public int getCurrentPeriod()
public void setCurrentPeriod(int mp)
public int[] getStaffing()
public int[][] getStaffingMatrix()
public void setStaffing(int[] staffing)
public void setStaffingMatrix(int[][] staffingMatrix)
public CallCenterCTMC getCTMC()
public int[] getMaxNumAgents()
public void setMaxNumAgents(int[] maxNumAgents)
public int getQueueCapacity()
public void setQueueCapacity(int q)
public double getTimeHorizon()
public void setTimeHorizon(double timeHorizon)
protected void initStat()
protected void initReplication(RandomStream stream, double timeHorizon, int ntr)
protected void addObs()
public void formatReport()
public abstract void simulate(RandomStream stream1, double timeHorizon, int n)
public abstract double getNumExpectedTransitions()
public double getNumFalseTransitions()
public Tally getStatNumFalseTransitions()
public static CallCenterCTMC getCTMC(CallCenter cc, int mp, boolean keepQueues, int[] maxNumAgents, boolean needsCallMix, int[][] thresholds, boolean alwaysUseSearchIndex) throws CTMCCreationException
CTMCCreationException
public static double[] getAWT(CallCenter cc, int mp)
public static void traceStep(CallCenterCTMC ctmc, TransitionType type, ContactTrace trace, int step, int period)
public void initTimer()
public int getRequiredNewSteps()
public void eval()
ContactCenterSim
ContactCenterSim.getAutoResetStartStream()
returns false, if ContactCenterSim.eval()
is called
multiple times without changing system
parameters, ContactCenterEval.getPerformanceMeasure(PerformanceMeasureType)
should return the same matrices of estimates
after each call.
This requires that random streams used for simulation
be reset after each evaluation.
Thus,
before returning,
this method should use RandomStream.resetStartSubstream()
on all random streams in order
to reset the seeds.
It is also recommended to always use
RandomStream.resetNextSubstream()
for all random streams
after any replication to improve synchronization
of random streams.
eval
in interface ContactCenterEval
eval
in interface ContactCenterSim
public int getCompletedSteps()
ContactCenterSim
getCompletedSteps
in interface ContactCenterSim
public ReportParams getReportParams()
ContactCenterEval
ContactCenterEval.formatStatistics()
, or
ContactCenterEval.formatStatisticsExcel(WritableWorkbook)
.
If no object containing report parameters
is available, this method
should create a new one using
the default constructor of
ReportParams
.
getReportParams
in interface ContactCenterEval
getReportParams
in class AbstractContactCenterEval
public double getConfidenceLevel()
ContactCenterSim
ContactCenterEval.formatStatistics()
.
The initial confidence level is
implementation-specific, and
usually set by a
constructor.
getConfidenceLevel
in interface ContactCenterSim
public MatrixOfStatProbes<?> getMatrixOfStatProbes(PerformanceMeasureType m)
ContactCenterSim
MatrixOfTallies
object.
For functions of multiple averages, e.g., ratios of averages,
this must return a MatrixOfFunctionOfMultipleMeansTallies
.
getMatrixOfStatProbes
in interface ContactCenterSim
m
- the group of performance measures of interest.
public void newSeeds()
ContactCenterSim
ContactCenterSim.eval()
multiple times to perform
a simulation, the results should be identical for the same
values of parameters. If one requires the simulation to
be performed with new random seeds, the random streams
need to be reset.
This can be done by calling RandomStream.resetNextSubstream()
method on each RandomStream
object associated with the simulator,
or by creating new random streams.
newSeeds
in interface ContactCenterSim
public void resetNextSubstream()
ContactCenterSim
RandomStream.resetNextSubstream()
for all random streams used by the simulator.
resetNextSubstream
in interface ContactCenterSim
public void resetStartStream()
ContactCenterSim
RandomStream.resetStartStream()
for all random streams used by the simulator.
resetStartStream
in interface ContactCenterSim
public void resetStartSubstream()
ContactCenterSim
RandomStream.resetStartSubstream()
for all random streams used by the simulator.
resetStartSubstream
in interface ContactCenterSim
public void setConfidenceLevel(double level)
ContactCenterSim
ContactCenterEval.formatStatistics()
to level.
setConfidenceLevel
in interface ContactCenterSim
level
- the level of confidence of the intervals.public TimeUnit getDefaultUnit()
ContactCenterInfo
getDefaultUnit
in interface ContactCenterInfo
public Object getEvalOption(EvalOptionType option)
ContactCenterEval
EvalOptionType.getType()
.
If the option is not supported, this should
throw a NoSuchElementException
.
This exception can be thrown if and only if
ContactCenterEval.hasEvalOption(umontreal.iro.lecuyer.contactcenters.app.EvalOptionType)
returns false for
the given option.
getEvalOption
in interface ContactCenterEval
option
- the queried evaluation option.
public EvalOptionType[] getEvalOptions()
ContactCenterEval
ContactCenterEval.eval()
.
This should never return a null pointer;
if no evaluation options are supported for some reasons,
this should return an array with length 0.
getEvalOptions
in interface ContactCenterEval
public int getNumAgentGroups()
ContactCenterInfo
getNumAgentGroups
in interface ContactCenterInfo
public int getNumContactTypes()
ContactCenterInfo
ContactCenterInfo.getNumInContactTypes()
+ ContactCenterInfo.getNumOutContactTypes()
.
getNumContactTypes
in interface ContactCenterInfo
public int getNumInContactTypes()
ContactCenterInfo
getNumInContactTypes
in interface ContactCenterInfo
public CallCenter getModel()
public CallCenterStat getStat()
public void setStat(CallCenterStat ccStat)
public int getNumMainPeriods()
ContactCenterInfo
PeriodChangeEvent
.
For a steady-state evaluation on
a single period, this
always returns 1, even if
the model defines several period.
getNumMainPeriods
in interface ContactCenterInfo
public int getNumMatricesOfAWT()
ContactCenterInfo
getNumMatricesOfAWT
in interface ContactCenterInfo
public String getMatrixOfAWTName(int m)
ContactCenterInfo
getMatrixOfAWTName
in interface ContactCenterInfo
getMatrixOfAWTName
in class AbstractContactCenterInfo
m
- the index of the matrix of AWTs.
public int getNumOutContactTypes()
ContactCenterInfo
getNumOutContactTypes
in interface ContactCenterInfo
public int getNumWaitingQueues()
ContactCenterInfo
getNumWaitingQueues
in interface ContactCenterInfo
public PerformanceMeasureType[] getPerformanceMeasures()
ContactCenterEval
getPerformanceMeasures
in interface ContactCenterEval
public boolean hasEvalOption(EvalOptionType option)
ContactCenterEval
ContactCenterEval.getEvalOptions()
. Otherwise, it
returns false.
hasEvalOption
in interface ContactCenterEval
option
- the queried evaluation option.
public void reset()
ContactCenterEval
reset
in interface ContactCenterEval
public boolean seemsUnstable()
ContactCenterEval
IllegalStateException
if it is called before ContactCenterEval.eval()
and
always return false if no
stability check applies.
seemsUnstable
in interface ContactCenterEval
public void setEvalOption(EvalOptionType option, Object value)
ContactCenterEval
NoSuchElementException
. If the class of the given
value is incompatible, this throws a ClassCastException
.
If the evaluation option cannot be changed, this
throws an UnsupportedOperationException
.
setEvalOption
in interface ContactCenterEval
option
- the option to be set.value
- the new value of the option.public String getAgentGroupName(int i)
ContactCenterInfo
getAgentGroupName
in interface ContactCenterInfo
getAgentGroupName
in class AbstractContactCenterInfo
i
- the identifier of the agent group.
public Map<String,String> getAgentGroupProperties(int i)
ContactCenterInfo
ContactCenterInfo.getContactTypeProperties(int)
,
for agent groups instead of contact types.
getAgentGroupProperties
in interface ContactCenterInfo
getAgentGroupProperties
in class AbstractContactCenterInfo
i
- the agent group identifier.
public String getContactTypeName(int k)
ContactCenterInfo
ContactCenterInfo.getNumContactTypes()
. The first ContactCenterInfo.getNumInContactTypes()
indices are inbound contact types whereas the
remaining indices are outbound contact types.
If no contact type name is available, this
returns null.
getContactTypeName
in interface ContactCenterInfo
getContactTypeName
in class AbstractContactCenterInfo
k
- the contact type identifier.
public Map<String,String> getContactTypeProperties(int k)
ContactCenterInfo
getContactTypeProperties
in interface ContactCenterInfo
getContactTypeProperties
in class AbstractContactCenterInfo
k
- the contact type identifier.
public String getWaitingQueueName(int q)
ContactCenterInfo
getWaitingQueueName
in interface ContactCenterInfo
getWaitingQueueName
in class AbstractContactCenterInfo
q
- the index of the waiting queue.
public Map<String,String> getWaitingQueueProperties(int q)
ContactCenterInfo
ContactCenterInfo.getContactTypeProperties(int)
,
for waiting queues instead of contact types.
getWaitingQueueProperties
in interface ContactCenterInfo
getWaitingQueueProperties
in class AbstractContactCenterInfo
q
- the waiting queue identifier.
public double[] getObs(PerformanceMeasureType pm, int row, int column)
ContactCenterSimWithObservations
NoSuchElementException
.
getObs
in interface ContactCenterSimWithObservations
pm
- the type of performance measure.row
- the row of the performance measure.column
- the column of the performance measure.
public int numberObs(PerformanceMeasureType pm, int row, int column)
ContactCenterSimWithObservations
NoSuchElementException
.
numberObs
in interface ContactCenterSimWithObservations
pm
- the type of performance measure.row
- the row of the performance measure.column
- the column of the performance measure.
public void addTransitionListener(TransitionListener listener)
public void removeTransitionListener(TransitionListener listener)
public void clearTransitionListeners()
public List<TransitionListener> getTransitionListeners()
public void notifyInit(int r, int mp, CallCenterCTMC ctmc)
public void notifyTransition(int r, int mp1, CallCenterCTMC ctmc1, TransitionType type)
public static String formatInfo(CallCenterCTMC ctmc)
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |