ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.msk
Class AbstractCallCenterSim

java.lang.Object
  extended by umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterInfo
      extended by umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterEval
          extended by umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterSim
              extended by umontreal.iro.lecuyer.contactcenters.msk.AbstractCallCenterSim
All Implemented Interfaces:
ContactCenterEval, ContactCenterInfo, ContactCenterSim, ObservableContactCenterSim
Direct Known Subclasses:
CallCenterSim, CallCenterSimRQMC, CallCenterSimStrat

public abstract class AbstractCallCenterSim
extends AbstractContactCenterSim
implements ObservableContactCenterSim


Field Summary
protected  Logger logger
           
 
Fields inherited from class umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterSim
autoResetStartStream, seqSampEachEval
 
Constructor Summary
AbstractCallCenterSim(CallCenterParams ccParams, SimParams simParams)
          Constructs a new call center simulator using call center parameters ccParams, and simulation parameters simParams.
AbstractCallCenterSim(CallCenterParams ccParams, SimParams simParams, RandomStreams streams)
          Constructs a new call center simulator using call center parameters ccParams, simulation parameters simParams, and random streams streams.
AbstractCallCenterSim(Simulator sim, CallCenterParams ccParams, SimParams simParams)
          Similar to AbstractCallCenterSim(CallCenterParams,SimParams), with the given simulator sim.
AbstractCallCenterSim(Simulator sim, CallCenterParams ccParams, SimParams simParams, RandomStreams streams)
          Similar to AbstractCallCenterSim(CallCenterParams,SimParams,RandomStreams), with the given simulator sim.
 
Method Summary
 void abort()
          Aborts the current simulation.
 void addContactCenterSimListener(ContactCenterSimListener l)
          Registers the listener l to be notified about the progress of the simulator.
 void applyControlVariables()
           
 void clearContactCenterSimListeners()
          Removes all the listeners registered with this simulator.
static ControlVariable[] createControlVariables(ControlVariableType... cvTypes)
           
protected  CallCenter createModel(Simulator sim, CallCenterParams ccPs, RandomStreams streams)
          Constructs and returns the model of the call center used by this simulator.
protected  SimLogic createSimLogic(CallCenter model, SimParams simParams)
          Constructs and returns a SimLogic implementation for the simulation logic, using the given model and simulation parameters simParams.
 void disableControlVariables()
           
 void enableControlVariables(ControlVariable... cvs)
           
 void eval()
          Performs a simulation to evaluate the performance measures.
protected  void finishEvaluation()
           
 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.
 String getAgentGroupSegmentName(int i)
          Returns the name associated with the agent group segment i, where i is a number greater than or equal to 0 and smaller than ContactCenterInfo.getNumAgentGroupSegments().
 Map<String,String> getAgentGroupSegmentProperties(int i)
          This method is similar to ContactCenterInfo.getContactTypeProperties(int), for agent group segments instead of contact types.
 CallCenter getCallCenter()
          Returns a reference to the model used by this simulator.
 CallCenterStatProbes getCallCenterStatProbes()
           
 int getCompletedSteps()
          Returns the number of completed steps for the simulation.
 DoubleMatrix2D[] getConfidenceInterval(PerformanceMeasureType m, double level)
          Returns confidence intervals on the means or ratios of means, for the group of performance measures m, with confidence level level.
 double getConfidenceLevel()
          Returns the confidence level of the intervals output by ContactCenterEval.formatStatistics().
 List<ContactCenterSimListener> getContactCenterSimListeners()
          Returns the listeners registered with this simulator.
 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.
 String getContactTypeSegmentName(int k)
          Returns the name associated with the contact type segment k, where k is a number greater than or equal to 0 and smaller than ContactCenterInfo.getNumContactTypeSegments().
 Map<String,String> getContactTypeSegmentProperties(int k)
          This method is similar to ContactCenterInfo.getContactTypeProperties(int), for contact type segments instead of contact types.
 double getCpuTime()
           
 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 getInContactTypeSegmentName(int k)
          Returns the name associated with the inbound contact type segment k, where k is a number greater than or equal to 0 and smaller than ContactCenterInfo.getNumInContactTypeSegments().
 Map<String,String> getInContactTypeSegmentProperties(int k)
          This method is similar to ContactCenterInfo.getContactTypeProperties(int), for inbound contact type segments instead of contact types.
 String getMainPeriodName(int mp)
          Returns the name corresponding to the main period mp.
 String getMainPeriodSegmentName(int mp)
          Returns the name associated with the main period segment mp, where mp is a number greater than or equal to 0 and smaller than ContactCenterInfo.getNumMainPeriodSegments().
 String getMatrixOfAWTName(int m)
          Returns the name associated with the matrix of AWTs with index m.
 MatrixOfFunctionOfMultipleMeansTallies<?> getMatrixOfFunctionOfMultipleMeansTallies(PerformanceMeasureType m)
          Returns the matrix of function of multiple means tallies used to manage observations for estimating the performance measures in group m.
 MatrixOfStatProbes<?> getMatrixOfStatProbes(PerformanceMeasureType m)
          Returns the matrix of statistical probes used to manage observations for estimating the performance measures in group m.
 MatrixOfTallies<?> getMatrixOfTallies(PerformanceMeasureType m)
          Returns the matrix of tallies used to manage observations for estimating the performance measures in group m.
 DoubleMatrix2D getMax(PerformanceMeasureType m)
          Returns a matrix of maximum values for the performance measure m.
 DoubleMatrix2D getMin(PerformanceMeasureType m)
          Returns a matrix of minimum values for the group of performance measures m.
 CallCenter getModel()
          Deprecated. 
 int getNumAgentGroups()
          Returns the total number of agent groups supported by this contact center.
 int getNumAgentGroupSegments()
          Returns the number of user-defined segments regrouping agent groups.
 int getNumContactTypes()
          Returns the total number of contact types supported by this contact center.
 int getNumContactTypeSegments()
          Returns the number of user-defined segments regrouping contact types.
 int getNumInContactTypes()
          Returns the total number of inbound contact types for this contact center.
 int getNumInContactTypeSegments()
          Returns the number of user-defined segments regrouping inbound contact types.
 int getNumMainPeriods()
          Returns the number of main periods used for evaluation, as defined in PeriodChangeEvent.
 int getNumMainPeriodSegments()
          Returns the number of user-defined segments regrouping main periods.
 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 getNumOutContactTypeSegments()
          Returns the number of user-defined segments regrouping outbound contact types.
 int getNumWaitingQueues()
          Returns the total number of waiting queues capable of storing contacts.
 int getNumWaitingQueueSegments()
          Returns the number of user-defined segments regrouping waiting queues.
 String getOutContactTypeSegmentName(int k)
          Returns the name associated with the outbound contact type segment k, where k is a number greater than or equal to 0 and smaller than ContactCenterInfo.getNumOutContactTypeSegments().
 Map<String,String> getOutContactTypeSegmentProperties(int k)
          This method is similar to ContactCenterInfo.getContactTypeProperties(int), for outbound contact type segments instead of contact types.
 DoubleMatrix2D getPerformanceMeasure(PerformanceMeasureType m)
          Returns the matrix of values corresponding to the group of performance measures m estimated by the last call to ContactCenterEval.eval().
 PerformanceMeasureType[] getPerformanceMeasures()
          Returns an array containing all the groups of performance measures this object can estimate.
 ReportParams getReportParams()
          Returns the parameters for reports formatted by ContactCenterEval.formatStatistics(), or ContactCenterEval.formatStatisticsExcel(WritableWorkbook).
 int getRequiredNewSteps()
           
 SimLogic getSimLogic()
          Returns a reference to the simulation logic used by this simulator.
 SimStoppingCondition getSimStoppingCondition()
           
 DoubleMatrix2D getVariance(PerformanceMeasureType m)
          Returns a matrix of sample variances for the group of performance measures m.
 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.
 String getWaitingQueueSegmentName(int k)
          Returns the name associated with the waiting queue segment q, where q is a number greater than or equal to 0 and smaller than ContactCenterInfo.getNumMainPeriodSegments().
 Map<String,String> getWaitingQueueSegmentProperties(int q)
          This method is similar to ContactCenterInfo.getContactTypeProperties(int), for waiting queue segments instead of contact types.
 boolean hasEvalOption(EvalOptionType option)
          Determines if the evaluation option option is supported by the implemented system.
protected  void init()
           
 void initControlVariableSupport()
           
 void initTimer()
           
 void initTrace()
           
 boolean isAborted()
          Determines if the simulation has been aborted by using the ObservableContactCenterSim.abort() method.
 boolean isUsingControlVariables()
           
 boolean isVerbose()
          Determines if the implementation should print information during the evaluation of the performance measures.
 void newSeeds()
          Changes the seeds of the random number generators used during the simulation.
protected  void prepareEvaluation()
           
 void removeContactCenterSimListener(ContactCenterSimListener l)
          Removes the listener l from the list of listeners registered with this simulator.
 void reset()
          Resets this contact center evaluation system for new parameters.
 void reset(CallCenterParams ccParams, SimParams simParams)
           
 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 value)
          Sets the evaluation option option to value.
 void setReportParams(ReportParams reportParams)
          Sets the report parameters to reportParams.
 void setSimStoppingCondition(SimStoppingCondition scond)
           
 void setVerbose(boolean verbose)
          Sets the verbose status to v.
 
Methods inherited from class umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterSim
formatStatistics, formatStatisticsExcel, formatStatisticsLaTeX, getAutoResetStartStream, getConfidenceInterval, getOneSimDone, getSeqSampEachEval, hasPerformanceMeasure, setAutoResetStartStream, setOneSimDone, setSeqSampEachEval
 
Methods inherited from class umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterEval
getEvalInfo
 
Methods inherited from class umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterInfo
getNumAgentGroupsWithSegments, getNumContactTypesWithSegments, getNumInContactTypesWithSegments, getNumMainPeriodsWithSegments, getNumOutContactTypesWithSegments, getNumWaitingQueuesWithSegments
 
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, getSeqSampEachEval, setAutoResetStartStream, setSeqSampEachEval
 
Methods inherited from interface umontreal.iro.lecuyer.contactcenters.app.ContactCenterEval
formatStatistics, formatStatisticsExcel, formatStatisticsLaTeX, getEvalInfo, hasPerformanceMeasure
 
Methods inherited from interface umontreal.iro.lecuyer.contactcenters.app.ContactCenterInfo
getNumAgentGroupsWithSegments, getNumContactTypesWithSegments, getNumInContactTypesWithSegments, getNumMainPeriodsWithSegments, getNumOutContactTypesWithSegments, getNumWaitingQueuesWithSegments
 

Field Detail

logger

protected Logger logger
Constructor Detail

AbstractCallCenterSim

public AbstractCallCenterSim(CallCenterParams ccParams,
                             SimParams simParams)
                      throws CallCenterCreationException
Constructs a new call center simulator using call center parameters ccParams, and simulation parameters simParams.

This calls createModel(umontreal.iro.lecuyer.simevents.Simulator, umontreal.iro.lecuyer.contactcenters.msk.params.CallCenterParams, umontreal.iro.lecuyer.contactcenters.msk.model.RandomStreams) to create the model, createSimLogic(umontreal.iro.lecuyer.contactcenters.msk.model.CallCenter, umontreal.iro.lecuyer.contactcenters.app.params.SimParams) to create the simulation logic.

Parameters:
ccParams - the call center parameters.
simParams - the simulation parameters.
Throws:
CallCenterCreationException

AbstractCallCenterSim

public AbstractCallCenterSim(CallCenterParams ccParams,
                             SimParams simParams,
                             RandomStreams streams)
                      throws CallCenterCreationException
Constructs a new call center simulator using call center parameters ccParams, simulation parameters simParams, and random streams streams.

This calls createModel(umontreal.iro.lecuyer.simevents.Simulator, umontreal.iro.lecuyer.contactcenters.msk.params.CallCenterParams, umontreal.iro.lecuyer.contactcenters.msk.model.RandomStreams) to create the model, createSimLogic(umontreal.iro.lecuyer.contactcenters.msk.model.CallCenter, umontreal.iro.lecuyer.contactcenters.app.params.SimParams) to create the simulation logic.

Parameters:
ccParams - the call center parameters.
simParams - the simulation parameters.
streams - the random streams used by the simulator.
Throws:
CallCenterCreationException

AbstractCallCenterSim

public AbstractCallCenterSim(Simulator sim,
                             CallCenterParams ccParams,
                             SimParams simParams)
                      throws CallCenterCreationException
Similar to AbstractCallCenterSim(CallCenterParams,SimParams), with the given simulator sim.

Throws:
CallCenterCreationException

AbstractCallCenterSim

public AbstractCallCenterSim(Simulator sim,
                             CallCenterParams ccParams,
                             SimParams simParams,
                             RandomStreams streams)
                      throws CallCenterCreationException
Similar to AbstractCallCenterSim(CallCenterParams,SimParams,RandomStreams), with the given simulator sim.

Throws:
CallCenterCreationException
Method Detail

getReportParams

public ReportParams getReportParams()
Description copied from interface: ContactCenterEval
Returns the parameters for reports formatted by 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.

Specified by:
getReportParams in interface ContactCenterEval
Overrides:
getReportParams in class AbstractContactCenterEval
Returns:
the printed statistics.

setReportParams

public void setReportParams(ReportParams reportParams)
Description copied from interface: ContactCenterEval
Sets the report parameters to reportParams.

Specified by:
setReportParams in interface ContactCenterEval
Overrides:
setReportParams in class AbstractContactCenterEval
Parameters:
reportParams - the report parameters..
See Also:
ContactCenterEval.getReportParams()

getDefaultUnit

public TimeUnit getDefaultUnit()
Description copied from interface: ContactCenterInfo
Returns the time unit in which output performance measures representing times are expressed. If this method returns null, performance measures representing time are output as any other performance measures; no time conversion can be performed or time unit displayed.

Specified by:
getDefaultUnit in interface ContactCenterInfo
Returns:
the default time unit.

init

protected void init()

getModel

@Deprecated
public CallCenter getModel()
Deprecated. 

Use getCallCenter() instead.


getCallCenter

public CallCenter getCallCenter()
Returns a reference to the model used by this simulator.

Returns:
a reference to the model.

getSimLogic

public SimLogic getSimLogic()
Returns a reference to the simulation logic used by this simulator.

Returns:
a reference to the simulation logic.

createModel

protected CallCenter createModel(Simulator sim,
                                 CallCenterParams ccPs,
                                 RandomStreams streams)
                          throws CallCenterCreationException
Constructs and returns the model of the call center used by this simulator. By default, this method constructs an instance of the CallCenter class, calls the CallCenter.create() method, and returns the resulting model object.

Parameters:
ccPs - the parameters of the call center.
streams - the random streams.
Returns:
the constructed model.
Throws:
CallCenterCreationException

createSimLogic

protected SimLogic createSimLogic(CallCenter model,
                                  SimParams simParams)
Constructs and returns a SimLogic implementation for the simulation logic, using the given model and simulation parameters simParams.

By default, this method creates a RepLogic instance if simParams is an instance of RepSimParams, a BatchMeansLogic if simParams is an instance of BatchSimParams, and throws an exception otherwise.

Parameters:
model - the simulation model.
simParams - the simulation parameters.
Returns:
the simulation logic.

initTimer

public void initTimer()

initTrace

public void initTrace()

isVerbose

public boolean isVerbose()
Description copied from interface: ContactCenterEval
Determines if the implementation should print information during the evaluation of the performance measures. The information depends on the type of evaluation method being involved. It can include steps or iterations of an approximation algorithm, or information about important elements of a simulation. Summary information should be printed on the standard output while debugging data, e.g., traces of every event in a simulation, should be sent to log files if they are generated. By default, the verbose mode is disabled.

Specified by:
isVerbose in interface ContactCenterEval
Overrides:
isVerbose in class AbstractContactCenterEval
Returns:
true if the implementation is in verbose mode, false otherwise (the default).

setVerbose

public void setVerbose(boolean verbose)
Description copied from interface: ContactCenterEval
Sets the verbose status to v. If v is true, verbose mode is enabled. Otherwise, it is disabled.

Specified by:
setVerbose in interface ContactCenterEval
Overrides:
setVerbose in class AbstractContactCenterEval
Parameters:
verbose - true to activate verbose mode, false to disable it.
See Also:
ContactCenterEval.isVerbose()

getConfidenceLevel

public double getConfidenceLevel()
Description copied from interface: ContactCenterSim
Returns the confidence level of the intervals output by ContactCenterEval.formatStatistics(). The initial confidence level is implementation-specific, and usually set by a constructor.

Specified by:
getConfidenceLevel in interface ContactCenterSim
Returns:
the level of confidence for the intervals.

setConfidenceLevel

public void setConfidenceLevel(double level)
Description copied from interface: ContactCenterSim
Sets the level of confidence for the intervals output by ContactCenterEval.formatStatistics() to level.

Specified by:
setConfidenceLevel in interface ContactCenterSim
Parameters:
level - the level of confidence of the intervals.

getAgentGroupName

public String getAgentGroupName(int i)
Description copied from interface: ContactCenterInfo
Returns the name associated with the agent group identifier i. If no name is associated with a given agent group, this returns null.

Specified by:
getAgentGroupName in interface ContactCenterInfo
Overrides:
getAgentGroupName in class AbstractContactCenterInfo
Parameters:
i - the identifier of the agent group.
Returns:
the agent group name, or null.

getContactTypeName

public String getContactTypeName(int k)
Description copied from interface: ContactCenterInfo
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(). 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.

Specified by:
getContactTypeName in interface ContactCenterInfo
Overrides:
getContactTypeName in class AbstractContactCenterInfo
Parameters:
k - the contact type identifier.
Returns:
the contact type name or null if no name is defined.

getNumMatricesOfAWT

public int getNumMatricesOfAWT()
Description copied from interface: ContactCenterInfo
Returns the number of matrices containing acceptable waiting times, for estimating service levels. Usually, this returns 1.

Specified by:
getNumMatricesOfAWT in interface ContactCenterInfo
Returns:
the number of matrices of acceptable waiting times.

getMatrixOfAWTName

public String getMatrixOfAWTName(int m)
Description copied from interface: ContactCenterInfo
Returns the name associated with the matrix of AWTs with index m. This method returns null if no name is associated with the matrix. This name can be used, e.g., to give the AWT if the same AWT is used for all contact types and periods.

Specified by:
getMatrixOfAWTName in interface ContactCenterInfo
Overrides:
getMatrixOfAWTName in class AbstractContactCenterInfo
Parameters:
m - the index of the matrix of AWTs.
Returns:
the name associated with the matrix.

getEvalOptions

public EvalOptionType[] getEvalOptions()
Description copied from interface: ContactCenterEval
Returns the array of the evaluation option types supported by the implementing object. The evaluation options are the variable parameters of the contact center which can be changed between calls to 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.

Specified by:
getEvalOptions in interface ContactCenterEval
Returns:
the array of supported evaluation options.

hasEvalOption

public boolean hasEvalOption(EvalOptionType option)
Description copied from interface: ContactCenterEval
Determines if the evaluation option option is supported by the implemented system. It should return true if and only if the option is in the array returned by ContactCenterEval.getEvalOptions(). Otherwise, it returns false.

Specified by:
hasEvalOption in interface ContactCenterEval
Parameters:
option - the queried evaluation option.
Returns:
the support status of the option.

getEvalOption

public Object getEvalOption(EvalOptionType option)
Description copied from interface: ContactCenterEval
Returns the current value of the evaluation option option. The class of the returned object must be assignable to the class given by 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.

Specified by:
getEvalOption in interface ContactCenterEval
Parameters:
option - the queried evaluation option.
Returns:
the current value of the option.

setEvalOption

public void setEvalOption(EvalOptionType option,
                          Object value)
Description copied from interface: ContactCenterEval
Sets the evaluation option option to value. If the given option is not supported, this throws a 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.

Specified by:
setEvalOption in interface ContactCenterEval
Parameters:
option - the option to be set.
value - the new value of the option.

getSimStoppingCondition

public SimStoppingCondition getSimStoppingCondition()

setSimStoppingCondition

public void setSimStoppingCondition(SimStoppingCondition scond)

getNumAgentGroups

public int getNumAgentGroups()
Description copied from interface: ContactCenterInfo
Returns the total number of agent groups supported by this contact center.

Specified by:
getNumAgentGroups in interface ContactCenterInfo
Returns:
the total number of agent groups.

getNumContactTypes

public int getNumContactTypes()
Description copied from interface: ContactCenterInfo
Returns the total number of contact types supported by this contact center. This should be the same as ContactCenterInfo.getNumInContactTypes() + ContactCenterInfo.getNumOutContactTypes().

Specified by:
getNumContactTypes in interface ContactCenterInfo
Returns:
the total number of contact types.

getNumInContactTypes

public int getNumInContactTypes()
Description copied from interface: ContactCenterInfo
Returns the total number of inbound contact types for this contact center.

Specified by:
getNumInContactTypes in interface ContactCenterInfo
Returns:
the total number of inbound contact types.

getNumMainPeriods

public int getNumMainPeriods()
Description copied from interface: ContactCenterInfo
Returns the number of main periods used for evaluation, as defined in PeriodChangeEvent. For a steady-state evaluation on a single period, this always returns 1, even if the model defines several period.

Specified by:
getNumMainPeriods in interface ContactCenterInfo
Returns:
the total number of main periods.

getNumOutContactTypes

public int getNumOutContactTypes()
Description copied from interface: ContactCenterInfo
Returns the total number of outbound contact types for this contact center.

Specified by:
getNumOutContactTypes in interface ContactCenterInfo
Returns:
the total number of outbound contact types.

getNumWaitingQueues

public int getNumWaitingQueues()
Description copied from interface: ContactCenterInfo
Returns the total number of waiting queues capable of storing contacts.

Specified by:
getNumWaitingQueues in interface ContactCenterInfo
Returns:
the number of waiting queues.

getContactTypeProperties

public Map<String,String> getContactTypeProperties(int k)
Description copied from interface: ContactCenterInfo
Returns the properties associated with contact type k. Properties are additional strings describing a contact type. This can include the language of the customers, the originating region, etc. If no property is defined for the given contact type, this method returns an empty map.

Specified by:
getContactTypeProperties in interface ContactCenterInfo
Overrides:
getContactTypeProperties in class AbstractContactCenterInfo
Parameters:
k - the contact type identifier.
Returns:
the map of properties.

getContactTypeSegmentName

public String getContactTypeSegmentName(int k)
Description copied from interface: ContactCenterInfo
Returns the name associated with the contact type segment k, where k is a number greater than or equal to 0 and smaller than ContactCenterInfo.getNumContactTypeSegments(). If no segment name is available, this returns null.

Specified by:
getContactTypeSegmentName in interface ContactCenterInfo
Overrides:
getContactTypeSegmentName in class AbstractContactCenterInfo
Parameters:
k - the contact type segment identifier.
Returns:
the segment name or null if no name is defined.

getContactTypeSegmentProperties

public Map<String,String> getContactTypeSegmentProperties(int k)
Description copied from interface: ContactCenterInfo
This method is similar to ContactCenterInfo.getContactTypeProperties(int), for contact type segments instead of contact types.

Specified by:
getContactTypeSegmentProperties in interface ContactCenterInfo
Overrides:
getContactTypeSegmentProperties in class AbstractContactCenterInfo
Parameters:
k - the segment identifier.
Returns:
the map of properties.

getAgentGroupProperties

public Map<String,String> getAgentGroupProperties(int i)
Description copied from interface: ContactCenterInfo
This method is similar to ContactCenterInfo.getContactTypeProperties(int), for agent groups instead of contact types.

Specified by:
getAgentGroupProperties in interface ContactCenterInfo
Overrides:
getAgentGroupProperties in class AbstractContactCenterInfo
Parameters:
i - the agent group identifier.
Returns:
the map of properties.

getAgentGroupSegmentName

public String getAgentGroupSegmentName(int i)
Description copied from interface: ContactCenterInfo
Returns the name associated with the agent group segment i, where i is a number greater than or equal to 0 and smaller than ContactCenterInfo.getNumAgentGroupSegments(). If no segment name is available, this returns null.

Specified by:
getAgentGroupSegmentName in interface ContactCenterInfo
Overrides:
getAgentGroupSegmentName in class AbstractContactCenterInfo
Parameters:
i - the agent group segment identifier.
Returns:
the segment name or null if no name is defined.

getAgentGroupSegmentProperties

public Map<String,String> getAgentGroupSegmentProperties(int i)
Description copied from interface: ContactCenterInfo
This method is similar to ContactCenterInfo.getContactTypeProperties(int), for agent group segments instead of contact types.

Specified by:
getAgentGroupSegmentProperties in interface ContactCenterInfo
Overrides:
getAgentGroupSegmentProperties in class AbstractContactCenterInfo
Parameters:
i - the segment identifier.
Returns:
the map of properties.

getInContactTypeSegmentName

public String getInContactTypeSegmentName(int k)
Description copied from interface: ContactCenterInfo
Returns the name associated with the inbound contact type segment k, where k is a number greater than or equal to 0 and smaller than ContactCenterInfo.getNumInContactTypeSegments(). If no segment name is available, this returns null.

Specified by:
getInContactTypeSegmentName in interface ContactCenterInfo
Overrides:
getInContactTypeSegmentName in class AbstractContactCenterInfo
Parameters:
k - the inbound contact type segment identifier.
Returns:
the segment name or null if no name is defined.

getInContactTypeSegmentProperties

public Map<String,String> getInContactTypeSegmentProperties(int k)
Description copied from interface: ContactCenterInfo
This method is similar to ContactCenterInfo.getContactTypeProperties(int), for inbound contact type segments instead of contact types.

Specified by:
getInContactTypeSegmentProperties in interface ContactCenterInfo
Overrides:
getInContactTypeSegmentProperties in class AbstractContactCenterInfo
Parameters:
k - the segment identifier.
Returns:
the map of properties.

getMainPeriodSegmentName

public String getMainPeriodSegmentName(int mp)
Description copied from interface: ContactCenterInfo
Returns the name associated with the main period segment mp, where mp is a number greater than or equal to 0 and smaller than ContactCenterInfo.getNumMainPeriodSegments(). If no segment name is available, this returns null.

Specified by:
getMainPeriodSegmentName in interface ContactCenterInfo
Overrides:
getMainPeriodSegmentName in class AbstractContactCenterInfo
Parameters:
mp - the main period segment identifier.
Returns:
the segment name or null if no name is defined.

getNumAgentGroupSegments

public int getNumAgentGroupSegments()
Description copied from interface: ContactCenterInfo
Returns the number of user-defined segments regrouping agent groups.

Specified by:
getNumAgentGroupSegments in interface ContactCenterInfo
Overrides:
getNumAgentGroupSegments in class AbstractContactCenterInfo
Returns:
the number of segments regrouping agent groups.

getNumContactTypeSegments

public int getNumContactTypeSegments()
Description copied from interface: ContactCenterInfo
Returns the number of user-defined segments regrouping contact types.

Specified by:
getNumContactTypeSegments in interface ContactCenterInfo
Overrides:
getNumContactTypeSegments in class AbstractContactCenterInfo
Returns:
the number of segments regrouping contact types.

getNumInContactTypeSegments

public int getNumInContactTypeSegments()
Description copied from interface: ContactCenterInfo
Returns the number of user-defined segments regrouping inbound contact types.

Specified by:
getNumInContactTypeSegments in interface ContactCenterInfo
Overrides:
getNumInContactTypeSegments in class AbstractContactCenterInfo
Returns:
the number of segments regrouping inbound contact types.

getNumMainPeriodSegments

public int getNumMainPeriodSegments()
Description copied from interface: ContactCenterInfo
Returns the number of user-defined segments regrouping main periods.

Specified by:
getNumMainPeriodSegments in interface ContactCenterInfo
Overrides:
getNumMainPeriodSegments in class AbstractContactCenterInfo
Returns:
the number of segments regrouping main periods.

getNumOutContactTypeSegments

public int getNumOutContactTypeSegments()
Description copied from interface: ContactCenterInfo
Returns the number of user-defined segments regrouping outbound contact types.

Specified by:
getNumOutContactTypeSegments in interface ContactCenterInfo
Overrides:
getNumOutContactTypeSegments in class AbstractContactCenterInfo
Returns:
the number of segments regrouping outbound contact types.

getNumWaitingQueueSegments

public int getNumWaitingQueueSegments()
Description copied from interface: ContactCenterInfo
Returns the number of user-defined segments regrouping waiting queues.

The result of this method depends on the role of the waiting queues, which depends on the router's policy. For example, if waiting queues correspond to contact types, this returns the result of ContactCenterInfo.getNumContactTypeSegments().

Specified by:
getNumWaitingQueueSegments in interface ContactCenterInfo
Overrides:
getNumWaitingQueueSegments in class AbstractContactCenterInfo
Returns:
the number of segments regrouping waiting queues.

getOutContactTypeSegmentName

public String getOutContactTypeSegmentName(int k)
Description copied from interface: ContactCenterInfo
Returns the name associated with the outbound contact type segment k, where k is a number greater than or equal to 0 and smaller than ContactCenterInfo.getNumOutContactTypeSegments(). If no segment name is available, this returns null.

Specified by:
getOutContactTypeSegmentName in interface ContactCenterInfo
Overrides:
getOutContactTypeSegmentName in class AbstractContactCenterInfo
Parameters:
k - the outbound contact type segment identifier.
Returns:
the segment name or null if no name is defined.

getOutContactTypeSegmentProperties

public Map<String,String> getOutContactTypeSegmentProperties(int k)
Description copied from interface: ContactCenterInfo
This method is similar to ContactCenterInfo.getContactTypeProperties(int), for outbound contact type segments instead of contact types.

Specified by:
getOutContactTypeSegmentProperties in interface ContactCenterInfo
Overrides:
getOutContactTypeSegmentProperties in class AbstractContactCenterInfo
Parameters:
k - the segment identifier.
Returns:
the map of properties.

getWaitingQueueProperties

public Map<String,String> getWaitingQueueProperties(int q)
Description copied from interface: ContactCenterInfo
This method is similar to ContactCenterInfo.getContactTypeProperties(int), for waiting queues instead of contact types.

Specified by:
getWaitingQueueProperties in interface ContactCenterInfo
Overrides:
getWaitingQueueProperties in class AbstractContactCenterInfo
Parameters:
q - the waiting queue identifier.
Returns:
the map of properties.

getWaitingQueueSegmentName

public String getWaitingQueueSegmentName(int k)
Description copied from interface: ContactCenterInfo
Returns the name associated with the waiting queue segment q, where q is a number greater than or equal to 0 and smaller than ContactCenterInfo.getNumMainPeriodSegments(). If no segment name is available, this returns null.

Specified by:
getWaitingQueueSegmentName in interface ContactCenterInfo
Overrides:
getWaitingQueueSegmentName in class AbstractContactCenterInfo
Parameters:
k - the waiting queue segment identifier.
Returns:
the segment name or null if no name is defined.

getWaitingQueueSegmentProperties

public Map<String,String> getWaitingQueueSegmentProperties(int q)
Description copied from interface: ContactCenterInfo
This method is similar to ContactCenterInfo.getContactTypeProperties(int), for waiting queue segments instead of contact types.

Specified by:
getWaitingQueueSegmentProperties in interface ContactCenterInfo
Overrides:
getWaitingQueueSegmentProperties in class AbstractContactCenterInfo
Parameters:
q - the segment identifier.
Returns:
the map of properties.

getPerformanceMeasures

public PerformanceMeasureType[] getPerformanceMeasures()
Description copied from interface: ContactCenterEval
Returns an array containing all the groups of performance measures this object can estimate. If no performance measure is supported by a given implementation, this method should return an array with length 0 instead of null.

Specified by:
getPerformanceMeasures in interface ContactCenterEval
Returns:
the array of groups of performance measures.

getWaitingQueueName

public String getWaitingQueueName(int q)
Description copied from interface: ContactCenterInfo
Returns the name of the waiting queue with index q used by the evaluation. If the waiting queue has no name, returns null.

Specified by:
getWaitingQueueName in interface ContactCenterInfo
Overrides:
getWaitingQueueName in class AbstractContactCenterInfo
Parameters:
q - the index of the waiting queue.
Returns:
the name of the waiting queue.

getMainPeriodName

public String getMainPeriodName(int mp)
Description copied from interface: ContactCenterInfo
Returns the name corresponding to the main period mp. This can return null or an empty string for unnamed periods.

Specified by:
getMainPeriodName in interface ContactCenterInfo
Overrides:
getMainPeriodName in class AbstractContactCenterInfo
Parameters:
mp - the index of the main period.
Returns:
the name of the main period.

reset

public void reset()
Description copied from interface: ContactCenterEval
Resets this contact center evaluation system for new parameters. Every cached or processed parameter should be reread from the parameter objects. In the case of the simulation, one should try to preserve random number seeds whenever possible, even if the contact center needs to be reconstructed. Some implementatios of this interface provide specialized reset methods allowing to change the associated parameter objects.

Specified by:
reset in interface ContactCenterEval

reset

public void reset(CallCenterParams ccParams,
                  SimParams simParams)
           throws CallCenterCreationException
Throws:
CallCenterCreationException

seemsUnstable

public boolean seemsUnstable()
Description copied from interface: ContactCenterEval
Determines if the system seems to be unstable. When a system is unstable, the returned steady-state performance measures are not reliable. This method mainly applies for stationary simulators which return true when the system appears to be unstable, i.e., some waiting queues grow up with simulation time. The method must throw an IllegalStateException if it is called before ContactCenterEval.eval() and always return false if no stability check applies.

Specified by:
seemsUnstable in interface ContactCenterEval
Returns:
the result of the stability check.

prepareEvaluation

protected void prepareEvaluation()

finishEvaluation

protected void finishEvaluation()

getRequiredNewSteps

public int getRequiredNewSteps()

eval

public void eval()
Description copied from interface: ContactCenterSim
Performs a simulation to evaluate the performance measures. Unless 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.

Specified by:
eval in interface ContactCenterEval
Specified by:
eval in interface ContactCenterSim

getCompletedSteps

public int getCompletedSteps()
Description copied from interface: ContactCenterSim
Returns the number of completed steps for the simulation. When using independent replications, a step corresponds to a replication. When using batch means for stationary simulation, this corresponds to the number of terminated batches.

Specified by:
getCompletedSteps in interface ContactCenterSim
Returns:
the number of completed steps.

getPerformanceMeasure

public DoubleMatrix2D getPerformanceMeasure(PerformanceMeasureType m)
Description copied from interface: ContactCenterEval
Returns the matrix of values corresponding to the group of performance measures m estimated by the last call to ContactCenterEval.eval(). The dimensions of the matrix and the role of its elements depend on the queried group of performance measures, and the capabilities of the implementing evaluation system. See the PerformanceMeasureType class for more information about the defined performance measures. If the queried measure is not supported by this evaluation object, this throws a NoSuchElementException. If the values of the measures are not available, e.g., the ContactCenterEval.eval() method was never called after the last call to ContactCenterEval.reset(), this throws an IllegalStateException.

Specified by:
getPerformanceMeasure in interface ContactCenterEval
Overrides:
getPerformanceMeasure in class AbstractContactCenterSim
Parameters:
m - the queried group of performance measures.
Returns:
the matrix of values computed by the evaluation system.

getVariance

public DoubleMatrix2D getVariance(PerformanceMeasureType m)
Description copied from interface: ContactCenterSim
Returns a matrix of sample variances for the group of performance measures m. If the group of performance measures is not supported, or the sample variance cannot be computed, this method throws a NoSuchElementException.

Specified by:
getVariance in interface ContactCenterSim
Overrides:
getVariance in class AbstractContactCenterSim
Parameters:
m - the queried group of performance measures.
Returns:
the matrix of sample variances.

getMin

public DoubleMatrix2D getMin(PerformanceMeasureType m)
Description copied from interface: ContactCenterSim
Returns a matrix of minimum values for the group of performance measures m. If the group of measures defines no minimum (e.g., a ratio of expectations), or it is not supported, this method throws NoSuchElementException.

Specified by:
getMin in interface ContactCenterSim
Overrides:
getMin in class AbstractContactCenterSim
Parameters:
m - the queried group of performance measures.
Returns:
the matrix of minima.

getMax

public DoubleMatrix2D getMax(PerformanceMeasureType m)
Description copied from interface: ContactCenterSim
Returns a matrix of maximum values for the performance measure m. If the group of measures defines no maximum (e.g., a ratio of expectations), or if it is not supported, this method throws NoSuchElementException.

Specified by:
getMax in interface ContactCenterSim
Overrides:
getMax in class AbstractContactCenterSim
Parameters:
m - the queried group of performance measures.
Returns:
the matrix of maxima.

getMatrixOfStatProbes

public MatrixOfStatProbes<?> getMatrixOfStatProbes(PerformanceMeasureType m)
Description copied from interface: ContactCenterSim
Returns the matrix of statistical probes used to manage observations for estimating the performance measures in group m. The particular subclass of the statistical probe matrix depends on the performance measure type only. For averages, this method must return a MatrixOfTallies object. For functions of multiple averages, e.g., ratios of averages, this must return a MatrixOfFunctionOfMultipleMeansTallies.

Specified by:
getMatrixOfStatProbes in interface ContactCenterSim
Parameters:
m - the group of performance measures of interest.
Returns:
the matrix of statistical probes.

getMatrixOfTallies

public MatrixOfTallies<?> getMatrixOfTallies(PerformanceMeasureType m)
Description copied from interface: ContactCenterSim
Returns the matrix of tallies used to manage observations for estimating the performance measures in group m. This matrix is available only for performance measures corresponding to expectations, not functions of expectations.

Specified by:
getMatrixOfTallies in interface ContactCenterSim
Overrides:
getMatrixOfTallies in class AbstractContactCenterSim
Parameters:
m - the group of performance measures of interest.
Returns:
the matrix of tallies.

getMatrixOfFunctionOfMultipleMeansTallies

public MatrixOfFunctionOfMultipleMeansTallies<?> getMatrixOfFunctionOfMultipleMeansTallies(PerformanceMeasureType m)
Description copied from interface: ContactCenterSim
Returns the matrix of function of multiple means tallies used to manage observations for estimating the performance measures in group m. This matrix is available only for performance measures corresponding functions of expectations.

Specified by:
getMatrixOfFunctionOfMultipleMeansTallies in interface ContactCenterSim
Overrides:
getMatrixOfFunctionOfMultipleMeansTallies in class AbstractContactCenterSim
Parameters:
m - the group of performance measures of interest.
Returns:
the matrix of function of multiple means tallies.

getConfidenceInterval

public DoubleMatrix2D[] getConfidenceInterval(PerformanceMeasureType m,
                                              double level)
Description copied from interface: ContactCenterSim
Returns confidence intervals on the means or ratios of means, for the group of performance measures m, with confidence level level. This must return an array of two matrices, the first containing the lower bound values and the second, the upper bound values. For an unbounded confidence interval, one of the two matrices can be null. For each element of the performance measure matrix, a confidence interval whose desired coverage probability is level must be computed, independently of the other elements in the matrix. As a result, the coverage probability of all computed intervals will be smaller than level. The way each interval is computed is implementation-specific.

Specified by:
getConfidenceInterval in interface ContactCenterSim
Overrides:
getConfidenceInterval in class AbstractContactCenterSim
Parameters:
m - the queried group of performance measures.
level - desired probability that, for a given performance measure, the (random) confidence interval covers the true mean (a constant).
Returns:
an array of two matrices containing lower and upper bounds of the confidence intervals.

newSeeds

public void newSeeds()
Description copied from interface: ContactCenterSim
Changes the seeds of the random number generators used during the simulation. When calling 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.

Specified by:
newSeeds in interface ContactCenterSim

resetNextSubstream

public void resetNextSubstream()
Description copied from interface: ContactCenterSim
Calls RandomStream.resetNextSubstream() for all random streams used by the simulator.

Specified by:
resetNextSubstream in interface ContactCenterSim

resetStartStream

public void resetStartStream()
Description copied from interface: ContactCenterSim
Calls RandomStream.resetStartStream() for all random streams used by the simulator.

Specified by:
resetStartStream in interface ContactCenterSim

resetStartSubstream

public void resetStartSubstream()
Description copied from interface: ContactCenterSim
Calls RandomStream.resetStartSubstream() for all random streams used by the simulator.

Specified by:
resetStartSubstream in interface ContactCenterSim

getCpuTime

public double getCpuTime()

formatReport

public void formatReport()

createControlVariables

public static ControlVariable[] createControlVariables(ControlVariableType... cvTypes)

getCallCenterStatProbes

public CallCenterStatProbes getCallCenterStatProbes()

isUsingControlVariables

public boolean isUsingControlVariables()

enableControlVariables

public void enableControlVariables(ControlVariable... cvs)

applyControlVariables

public void applyControlVariables()

disableControlVariables

public void disableControlVariables()

initControlVariableSupport

public void initControlVariableSupport()

abort

public void abort()
Description copied from interface: ObservableContactCenterSim
Aborts the current simulation.

Specified by:
abort in interface ObservableContactCenterSim

addContactCenterSimListener

public void addContactCenterSimListener(ContactCenterSimListener l)
Description copied from interface: ObservableContactCenterSim
Registers the listener l to be notified about the progress of the simulator.

Specified by:
addContactCenterSimListener in interface ObservableContactCenterSim
Parameters:
l - the listener to be notified.

clearContactCenterSimListeners

public void clearContactCenterSimListeners()
Description copied from interface: ObservableContactCenterSim
Removes all the listeners registered with this simulator.

Specified by:
clearContactCenterSimListeners in interface ObservableContactCenterSim

getContactCenterSimListeners

public List<ContactCenterSimListener> getContactCenterSimListeners()
Description copied from interface: ObservableContactCenterSim
Returns the listeners registered with this simulator.

Specified by:
getContactCenterSimListeners in interface ObservableContactCenterSim
Returns:
the list of registered listeners.

isAborted

public boolean isAborted()
Description copied from interface: ObservableContactCenterSim
Determines if the simulation has been aborted by using the ObservableContactCenterSim.abort() method.

Specified by:
isAborted in interface ObservableContactCenterSim
Returns:
true if the simulation was aborted, false otherwise.

removeContactCenterSimListener

public void removeContactCenterSimListener(ContactCenterSimListener l)
Description copied from interface: ObservableContactCenterSim
Removes the listener l from the list of listeners registered with this simulator.

Specified by:
removeContactCenterSimListener in interface ObservableContactCenterSim
Parameters:
l - the listener being removed.

ContactCenters
V. 0.9.9.

To submit a bug or ask questions, send an e-mail to Richard Simard.