|
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.app.MBatchMeansSim
public class MBatchMeansSim
This simulator performs a certain number of replications of a simulation with batch means. An object from this class is constructed using a simulator which is assumed to use batch means. When an evaluation is triggered, the internal simulator is called several times to get values. This allows, e.g., to simulate with different values of λ for a Poisson-gamma arrival process.
Field Summary |
---|
Fields inherited from class umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterSim |
---|
autoResetStartStream, seqSampEachEval |
Constructor Summary | |
---|---|
MBatchMeansSim(ContactCenterSim sim,
int numReps)
Constructs a simulator running numReps independent batch means experiments using the internal simulator sim. |
Method Summary | |
---|---|
void |
eval()
Equivalent to eval
(getNumTargetReplications()). |
void |
eval(int numReps)
Performs numReps independent replications of a batch means simulation. |
String |
formatStatistics()
Formats information about every performance measure after ContactCenterEval.eval() is called. |
String |
getAgentGroupName(int i)
Returns the name associated with the agent group identifier i. |
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() . |
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. |
MatrixOfTallies<Tally> |
getMatrixOfStatProbes(PerformanceMeasureType pm)
Returns the matrix of statistical probes used to manage observations for estimating the performance measures in group m. |
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. |
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 |
getNumTargetReplications()
Returns the default target number of replications. |
int |
getNumWaitingQueues()
Returns the total number of waiting queues capable of storing contacts. |
PerformanceMeasureType[] |
getPerformanceMeasures()
Returns an array containing all the groups of performance measures this object can estimate. |
ContactCenterSim |
getSimulator()
Returns the internal simulator used by this object. |
String |
getWaitingQueueName(int q)
Returns the name of the waiting queue with index q used by the evaluation. |
boolean |
hasEvalOption(EvalOptionType option)
Determines if the evaluation option option is supported by the implemented system. |
static void |
main(String[] args)
Main method allowing to run this class from the command-line with CallCenterSim as the internal simulator. |
void |
newSeeds()
Changes the seeds of the random number generators used during the simulation. |
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 |
setEvalOption(EvalOptionType option,
Object val)
Sets the evaluation option option to value. |
Methods inherited from class umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterSim |
---|
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, getReportParams, 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.ContactCenterEval |
---|
getEvalInfo, getReportParams, isVerbose, setReportParams, setVerbose |
Constructor Detail |
---|
public MBatchMeansSim(ContactCenterSim sim, int numReps)
sim
- the internal simulator which is assumed to use batch means.numReps
- the number of independent batch means experiments.Method Detail |
---|
public ContactCenterSim getSimulator()
public double getConfidenceLevel()
ContactCenterSim
ContactCenterEval.formatStatistics()
.
The initial confidence level is
implementation-specific, and
usually set by a
constructor.
public void setConfidenceLevel(double level)
ContactCenterSim
ContactCenterEval.formatStatistics()
to level.
level
- the level of confidence of the intervals.public TimeUnit getDefaultUnit()
ContactCenterInfo
public int getNumTargetReplications()
public MatrixOfTallies<Tally> getMatrixOfStatProbes(PerformanceMeasureType pm)
ContactCenterSim
MatrixOfTallies
object.
For functions of multiple averages, e.g., ratios of averages,
this must return a MatrixOfFunctionOfMultipleMeansTallies
.
pm
- the group of performance measures of interest.
public void eval()
eval
(getNumTargetReplications()).
public void eval(int numReps)
numReps
- the number of replications.public void resetStartStream()
ContactCenterSim
RandomStream.resetStartStream()
for all random streams used by the simulator.
public void resetStartSubstream()
ContactCenterSim
RandomStream.resetStartSubstream()
for all random streams used by the simulator.
public void resetNextSubstream()
ContactCenterSim
RandomStream.resetNextSubstream()
for all random streams used by the simulator.
public PerformanceMeasureType[] getPerformanceMeasures()
ContactCenterEval
public boolean hasEvalOption(EvalOptionType option)
ContactCenterEval
ContactCenterEval.getEvalOptions()
. Otherwise, it
returns false.
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.
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.
option
- the queried evaluation option.
public void setEvalOption(EvalOptionType option, Object val)
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
.
option
- the option to be set.val
- 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 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 String getWaitingQueueName(int q)
ContactCenterInfo
getWaitingQueueName
in interface ContactCenterInfo
getWaitingQueueName
in class AbstractContactCenterInfo
q
- the index of the waiting queue.
public int getNumAgentGroups()
ContactCenterInfo
public int getNumContactTypes()
ContactCenterInfo
ContactCenterInfo.getNumInContactTypes()
+ ContactCenterInfo.getNumOutContactTypes()
.
public int getNumInContactTypes()
ContactCenterInfo
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.
public int getNumOutContactTypes()
ContactCenterInfo
public int getNumWaitingQueues()
ContactCenterInfo
public boolean seemsUnstable()
ContactCenterEval
IllegalStateException
if it is called before ContactCenterEval.eval()
and
always return false if no
stability check applies.
public void reset()
ContactCenterEval
public int getCompletedSteps()
ContactCenterSim
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.
public String formatStatistics()
ContactCenterEval
ContactCenterEval.eval()
is called.
It can be simulation statistics, information
about the steps of an approximation algorithm,
or simply the values of all performance measures.
This method should call ContactCenterEval.getEvalInfo()
to obtain general information about the evaluation
and incorporate the information into the
returned string.
For each entry in the map, the method
should add a key: value line
in the string.
Then, the method appends the performance measures
to the returned string.
The PerformanceMeasureFormatText
class
can be used to convert matrices of performance measures
into strings.
If the evaluation was not triggered by
calling ContactCenterEval.eval()
before this method is called,
an IllegalStateException
is thrown.
If no statistical information is available even
after the evaluation, this method should return
an empty string instead of throwing an exception.
formatStatistics
in interface ContactCenterEval
formatStatistics
in class AbstractContactCenterSim
public int getNumMatricesOfAWT()
ContactCenterInfo
public static void main(String[] args) throws IOException, ParserConfigurationException, SAXException
CallCenterSim
as the internal simulator. The needed command-line
arguments are the name of an XML file containing the simulation parameters
(root element mskccparams), and the name of a second XML file
containing the simulation parameters (root elements
batchsimparams).
args
- the command-line arguments.
IOException
ParserConfigurationException
SAXException
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |