ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.msk.model
Class CallCenter

java.lang.Object
  extended by umontreal.iro.lecuyer.contactcenters.app.AbstractContactCenterInfo
      extended by umontreal.iro.lecuyer.contactcenters.msk.model.CallCenter
All Implemented Interfaces:
ContactCenterInfo

public class CallCenter
extends AbstractContactCenterInfo

Represents the model of a call center with multiple call types and agent groups. The model encapsulates all the logic of the call center itself: a simulator with a clock and event list, a simulation event marking the change of periods, the call factories which create objects for every call, manager objects for arrival processes, dialers, agent groups, and the router, etc. A program can use methods in this class to obtain references to the call center objects, and retrieve their parameters, or register listeners to observe their evolution in time.

A model is created from an instance of CallCenterParams, and an instance of RandomStreams. After it is created using the create() method, it can be initialized for simulation using initSim(). The encapsulated period-change event, and managed arrival processes and dialers must then be started to schedule events before the simulation is started using simulator().start().


Constructor Summary
CallCenter(CallCenterParams ccParams)
          Creates a call center model with parameters stored in ccParams, and using the default class of random stream MRG32k3a.
CallCenter(CallCenterParams ccParams, RandomStreams streams)
          Constructs a new call center model from the call center parameters ccParams, and the random streams streams.
CallCenter(Simulator sim, CallCenterParams ccParams)
          Similar to CallCenter(CallCenterParams), with the given simulator sim.
CallCenter(Simulator sim, CallCenterParams ccParams, RandomStreams streams)
          Similar to CallCenter(CallCenterParams,RandomStreams), with the given simulator sim.
 
Method Summary
 void create()
          Calls create (false).
 void create(boolean recreateStreams)
          Constructs the elements of the call center.
protected  WaitingQueue createWaitingQueue(int q)
          Constructs and returns the qth waiting queue for this call center.
 AgentGroup getAgentGroup(int i)
          Returns the agent group with index i.
 AgentGroupManager getAgentGroupManager(int i)
          Returns the agent group manager with index i.
 AgentGroupManager[] getAgentGroupManagers()
          Returns an array containing the agent group managers of this model.
 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.
 AgentGroup[] getAgentGroups()
          Returns an array containing the agent groups of this model.
 SegmentInfo getAgentGroupSegment(int i)
          Returns the information object for the ith user-defined segment regrouping agent groups.
 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.
 SegmentInfo[] getAgentGroupSegments()
          Returns an array containing information objects for all user-defined segments regrouping agent groups.
 double getAgentsMult()
          Returns the global multiplier for the number of agents in any group during any period.
 ArrivalProcessManager[] getArrivalProcesManagers()
          Returns the array of arrival process managers in this model.
 ContactArrivalProcess getArrivalProcess(int k)
          Returns the arrival process with index k, or null if k is smaller than $ \Ki$, and no arrival process is dedicated to inbound calls of type k.
 ContactArrivalProcess[] getArrivalProcesses()
          Returns an array containing the arrival processes of this model.
 ArrivalProcessManager getArrivalProcessManager(int k)
          Returns the arrival process manager with index k.
 double getArrivalsMult()
          Returns the global multiplier applied to the arrival rates or number of arrivals for each arrival process in this model.
 AWTPeriod getAwtPeriod()
          Returns the object used to compute the AWT period of contacts.
 int getAwtPeriod(Contact contact)
          Returns the period index used to obtain the period-specific acceptable waiting time for contact contact.
 double getBusynessFactor()
          Returns the current value of B used by arrival processes.
 RandomVariateGen getBusynessGen()
          Returns a reference to the random variate generator used for the global busyness factor B multiplying the arrival rates or number of arrivals of calls.
 CallCenterParams getCallCenterParams()
          Returns the call center parameters associated with this model.
 CallFactory[] getCallFactories()
          Returns the array of call factories for this model.
 CallFactory getCallFactory(int k)
          Returns the call factory generating calls of type k in this model.
 double getConferenceTimesMult()
          Returns the global multiplier for conference times of calls transferred to a new agent with the primary agent waiting for the secondary agent.
 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.
 SegmentInfo getContactTypeSegment(int k)
          Returns the information object for the kth user-defined segment regrouping contact types.
 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.
 SegmentInfo[] getContactTypeSegments()
          Returns an array containing information objects for all user-defined segments regrouping contact types.
 boolean[][] getDefaultShiftMatrix()
          Returns the J×P default shift matrix used for any agent group with a schedule giving only a vector of agents.
 TimeUnit getDefaultUnit()
          Returns the default unit used for this call center.
 Dialer getDialer(int k)
          Returns the dialer with index k, or null if k is smaller than $ \Ko$, and no dialer is dedicated to outbound calls of type k.
 DialerManager getDialerManager(int k)
          Returns the dialer manager with index k.
 DialerManager[] getDialerManagers()
          Returns the array of dialer managers in this model.
 DialerObjects getDialerObjects()
          Returns the instance of DialerObjects associated with this model.
 Dialer[] getDialers()
          Returns an array containing the dialers of this model.
 SegmentInfo getInContactTypeSegment(int k)
          Returns the information object for the kth user-defined segment regrouping inbound contact types.
 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.
 SegmentInfo[] getInContactTypeSegments()
          Returns an array containing information objects for all user-defined segments regrouping inbound contact types.
 String getMainPeriodName(int mp)
          Returns the name corresponding to the main period mp.
 SegmentInfo getMainPeriodSegment(int p)
          Returns the information object for the pth user-defined segment regrouping main periods.
 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().
 SegmentInfo[] getMainPeriodSegments()
          Returns an array containing information objects for all user-defined segments regrouping main periods.
 Date getMainPeriodStartingDate(int mp)
          Returns the date corresponding to the beginning of the main period mp.
 String getMatrixOfAWTName(int m)
          Returns the name of the matrix of acceptable waiting time with index m, or null if no name was given in the parameter file.
 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 getNumArrivalProcesses()
          Returns the maximal number of arrival process managers in this model.
 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 getNumDialers()
          Returns the maximal number of dialer managers in this model.
 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 sets of parameters for the service level given by the user in parameter file.
 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.
 SegmentInfo getOutContactTypeSegment(int k)
          Returns the information object for the kth user-defined segment regrouping outbound contact types.
 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.
 SegmentInfo[] getOutContactTypeSegments()
          Returns an array containing information objects for all user-defined segments regrouping outbound contact types.
 double getPatienceTimesMult()
          Returns the global multiplier for patience times which is applied on every generated patience time.
 PeriodChangeEvent getPeriodChangeEvent()
          Returns a reference to the period-change event used by this model.
 double getPeriodDuration()
          Returns the duration of main periods, expressed in the default time unit returned by getDefaultUnit().
 double getPreServiceTimesNoConfMult()
          Returns the global multiplier for pre-service times of calls transferred to a new agent without the primary agent waiting for the secondary agent.
 double getPreviewTimesMult()
          Returns the global multiplier applied to all generated preview times of outbound calls.
 Map<String,Object> getProperties()
          Returns a map containing the user-defined properties associated with this model.
 int getQueueCapacity()
          Returns the current queue capacity in this model.
 RandomStreams getRandomStreams()
          Returns the random streams used by this model.
 Router getRouter()
          Returns a reference to the router used by this model.
 RouterManager getRouterManager()
          Returns a reference to the router manager of this model.
 ServiceLevelParamReadHelper getServiceLevelParams(int m)
          Returns the set of parameters m for the service level.
 double getServiceTimesMult()
          Returns the global multiplier for service times which is applied on every generated service time.
 Date getStartingDate()
          Returns the date corresponding to the environment being modeled.
 double getStartingTime()
          Returns the starting time of the first main period, expressed in the default time unit.
 RandomStreams getStreams()
          Deprecated. Use getRandomStreams() instead.
 double[] getTime(Duration... d)
          Constructs and returns an array whose elements correspond to the time durations in the given array, converted to the default time unit.
 double getTime(Duration d)
          Converts the given duration d to a time in the default time unit.
 double[][] getTime(Duration[][] d)
          Similar to getTime(Duration...), for a 2D array.
 double[] getTime(XMLGregorianCalendar... d)
          Similar to getTime(Duration...), for an array of XML gregorian calendars.
 double getTime(XMLGregorianCalendar xgcal)
          Converts the time returned by CallCenterUtil.getTimeInMillis(XMLGregorianCalendar) to the default time unit returned by getDefaultUnit().
 double[][] getTime(XMLGregorianCalendar[][] d)
          Similar to getTime(XMLGregorianCalendar...), for a 2D array.
 double getTransferTimesMult()
          Returns the global multiplier applied on any generated transfer time.
 WaitingQueue getWaitingQueue(int q)
          Returns the waiting queue with index q in this model.
 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.
 WaitingQueue[] getWaitingQueues()
          Returns an array containing the waiting queues of this model.
 String getWaitingQueueSegmentName(int q)
          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.
 Class<? extends WaitingTimePredictor> getWaitingTimePredictorClass()
          Returns the class of waiting time predictors used by some routing policies, and virtual holding.
 void initSim()
          Initializes the model for a new simulation with a random busyness factor.
 void initSim(double b1)
          Initializes the model for a new simulation setting the busyness factor of arrival processes to the given value b.
 boolean isCallTransferSupported()
          Determines if this model supports call transfers.
 boolean[][] isExponentialPatienceTime()
          Returns an array containing true at position [k][p] if contacts of type k arrived during period p have exponential patience times.
 boolean isExponentialPatienceTime(int k, int mp)
          Determines if patience times for contacts of type k arrived during period mp are exponential, and returns the result of the test.
 boolean[][][] isExponentialServiceTime()
          Returns an array containing true at position [k][i][p] if contacts of type k arrived during period p, and served by agents in group i have exponential service times.
 boolean isExponentialServiceTime(int k, int i, int mp)
          Determines if service times for contacts of type k arrived during period mp, and served by agents in group i are exponential, and returns the result of the test.
 boolean isHorizonSpanningDays()
          Determines if the horizon of this model spans multiple days, i.e., if the period duration times the number of periods is larger than 24 hours.
 boolean isVirtualHoldSupported()
          Determines if this model supports virtual holding.
 void reset(CallCenterParams ccParams1, RandomStreams streams1)
          Recreates the model with new parameters.
 void resetAgentsMult()
          Sets the multiplier returned by getAgentsMult() to 1, and adjusts the multipliers for each agent group.
 void resetNextSubstream()
          Calls RandomStream.resetNextSubstream() on every random stream of this model.
 void resetStartStream()
          Calls RandomStream.resetStartStream() on every random stream of this model.
 void resetStartSubstream()
          Calls RandomStream.resetStartSubstream() on each random stream of this model.
 void setAgentsMult(double agentsMult)
          Sets the global multiplier for the number of agents to agentsMult.
 void setArrivalsMult(double arrivalsMult)
          Sets the global multiplier for arrivals to arrivalsMult.
 void setAwtPeriod(AWTPeriod awtPeriod)
          Sets the object for computing AWT periods to awtPeriod.
 void setBusynessGen(RandomVariateGen bgen)
          Sets the random variate generator for the global busyness factor to bgen.
 void setConferenceTimesMult(double conferenceTimesMult)
          Sets the global multiplier for conference times to conferenceTimesMult.
 void setPatienceTimesMult(double patienceTimesMult)
          Sets the global multiplier for patience times to patienceTimesMult.
 void setPreServiceTimesNoConfMult(double preServiceTimesNoConfMult)
          Sets the global multiplier for pre-service times to preServiceTimesNoConfMult.
 void setPreviewTimesMult(double previewTimesMult)
          Sets the global multiplier for preview times to previewTimesMult.
 void setQueueCapacity(int q)
          Sets the total queue capacity to q.
 void setRandomStreams(RandomStreams streams)
          Sets the random streams used by this model to streams.
 void setRouter(Router router)
          Deprecated. Use RouterManager.setRouter(Router) instead.
 void setServiceTimesMult(double serviceTimesMult)
          Sets the global multiplier for service times to serviceTimesMult.
 void setSimulator(Simulator sim)
          Sets the simulator of this model to sim.
 void setTransferTimesMult(double transferTimesMult)
          Sets the global multiplier for transfer times to transferTimesMult.
 Simulator simulator()
          Returns the simulator associated with this call center model.
 
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
 

Constructor Detail

CallCenter

public CallCenter(CallCenterParams ccParams,
                  RandomStreams streams)
Constructs a new call center model from the call center parameters ccParams, and the random streams streams. This constructor assumes that ccParams is valid. The class CallCenterParamsConverter can be used to create valid objects from XML files.

Note that the create() method must be called after the model is constructed in order to create the model.

Parameters:
ccParams -
streams -
Throws:
NullPointerException - if ccParams or streams are null.

CallCenter

public CallCenter(Simulator sim,
                  CallCenterParams ccParams,
                  RandomStreams streams)
Similar to CallCenter(CallCenterParams,RandomStreams), with the given simulator sim.


CallCenter

public CallCenter(CallCenterParams ccParams)
Creates a call center model with parameters stored in ccParams, and using the default class of random stream MRG32k3a.

Note that the create() method must be called after the model is constructed in order to create the model.

Parameters:
ccParams - the parameters of the call center.
Throws:
NullPointerException - if ccParams is null.

CallCenter

public CallCenter(Simulator sim,
                  CallCenterParams ccParams)
Similar to CallCenter(CallCenterParams), with the given simulator sim.

Method Detail

simulator

public final Simulator simulator()
Returns the simulator associated with this call center model. The simulator is used to schedule events, and obtain simulation time when necessary.

Returns:
the associated simulator.

setSimulator

public final void setSimulator(Simulator sim)
Sets the simulator of this model to sim. After this method is called, the model should be reset using the create() method.

Parameters:
sim - the new simulator.
Throws:
NullPointerException - if sim is null.

getTime

public double getTime(Duration d)
Converts the given duration d to a time in the default time unit. This method calls Duration.getTimeInMillis(Date) using the date returned by getStartingDate(). It then uses TimeUnit.convert(double,TimeUnit,TimeUnit) to convert the obtained time in milliseconds to the default unit given by getDefaultUnit().

Parameters:
d - the duration to be converted.
Returns:
the duration in the default time unit.

getTime

public double[] getTime(Duration... d)
Constructs and returns an array whose elements correspond to the time durations in the given array, converted to the default time unit. This method constructs an array with the same length as d, and sets element i of the target array to the result of getTime(Duration) called with d[i].

Parameters:
d - the array of durations to convert.
Returns:
the array of converted durations.

getTime

public double[][] getTime(Duration[][] d)
Similar to getTime(Duration...), for a 2D array.

Parameters:
d - the 2D array of durations to convert.
Returns:
the 2D array of converted durations.

getTime

public double getTime(XMLGregorianCalendar xgcal)
Converts the time returned by CallCenterUtil.getTimeInMillis(XMLGregorianCalendar) to the default time unit returned by getDefaultUnit().

Parameters:
xgcal - the XML gregorian calendar representing a time.
Returns:
the time in the default time unit.

getTime

public double[] getTime(XMLGregorianCalendar... d)
Similar to getTime(Duration...), for an array of XML gregorian calendars.

Parameters:
d - the array of times to convert.
Returns:
the array of converted times.

getTime

public double[][] getTime(XMLGregorianCalendar[][] d)
Similar to getTime(XMLGregorianCalendar...), for a 2D array.

Parameters:
d - the 2D array of times to convert.
Returns:
the 2D array of converted times.

getDefaultUnit

public TimeUnit getDefaultUnit()
Returns the default unit used for this call center. This corresponds to the unit for simulation time, and for output such as waiting times, excess times, etc.

Returns:
the default unit.

getPeriodDuration

public double getPeriodDuration()
Returns the duration of main periods, expressed in the default time unit returned by getDefaultUnit().

Returns:
the period duration.

getStartingDate

public Date getStartingDate()
Returns the date corresponding to the environment being modeled. This corresponds to the date at which the preliminary period begins, with time set to midnight. This corresponds to the current date, at which this object was created, if no date was given explicitly in parameters.

Returns:
the date corresponding to the considered environment.

getStartingTime

public double getStartingTime()
Returns the starting time of the first main period, expressed in the default time unit.

Returns:
the starting time of the first main period.

getMainPeriodStartingDate

public Date getMainPeriodStartingDate(int mp)
Returns the date corresponding to the beginning of the main period mp. This method adds the starting time, and mp times the period duration to the date returned by getStartingDate(), and returns the resulting date.

Parameters:
mp - the index of the main period.
Returns:
the date of the main period.

isHorizonSpanningDays

public boolean isHorizonSpanningDays()
Determines if the horizon of this model spans multiple days, i.e., if the period duration times the number of periods is larger than 24 hours. This method determines the starting dates of the first and last main periods, using getMainPeriodStartingDate(int), and returns true if and only if the two dates have different days according to the Gregorian calendar.

Returns:
the success indicator of the test.

getNumMatricesOfAWT

public int getNumMatricesOfAWT()
Returns the number of sets of parameters for the service level given by the user in parameter file.

Returns:
the number of sets of parameters for the service level.

getMatrixOfAWTName

public String getMatrixOfAWTName(int m)
Returns the name of the matrix of acceptable waiting time with index m, or null if no name was given in the parameter file.

Specified by:
getMatrixOfAWTName in interface ContactCenterInfo
Overrides:
getMatrixOfAWTName in class AbstractContactCenterInfo
Parameters:
m - the index of the matrix.
Returns:
the name corresponding to the matrix, or null.
Throws:
ArrayIndexOutOfBoundsException - if m is negative or greater than or equal to the value returned by getNumMatricesOfAWT().

getServiceLevelParams

public ServiceLevelParamReadHelper getServiceLevelParams(int m)
Returns the set of parameters m for the service level.

Parameters:
m - the index of the set.
Returns:
the set of parameters.

getCallCenterParams

public CallCenterParams getCallCenterParams()
Returns the call center parameters associated with this model.

Returns:
the associated call center parameters.

getRandomStreams

public RandomStreams getRandomStreams()
Returns the random streams used by this model.

Returns:
the random streams used.

getStreams

@Deprecated
public RandomStreams getStreams()
Deprecated. Use getRandomStreams() instead.

Returns the random streams associated with this simulator.

Returns:
the associated random streams.

setRandomStreams

public void setRandomStreams(RandomStreams streams)
Sets the random streams used by this model to streams. This method calls RandomStreams.createStreams(CallCenterParams) on the call center parameters to create necessary streams.

Note that the new random streams are used only after create() is called.

Parameters:
streams - the new random streams.
Throws:
NullPointerException - if streams id null.

resetNextSubstream

public void resetNextSubstream()
Calls RandomStream.resetNextSubstream() on every random stream of this model.


resetStartStream

public void resetStartStream()
Calls RandomStream.resetStartStream() on every random stream of this model.


resetStartSubstream

public void resetStartSubstream()
Calls RandomStream.resetStartSubstream() on each random stream of this model.


reset

public void reset(CallCenterParams ccParams1,
                  RandomStreams streams1)
           throws CallCenterCreationException
Recreates the model with new parameters. This class sets the call center parameters to ccParams, the random streams to streams, and calls create() to recreate the model.

Parameters:
ccParams1 - the new call center parameters.
streams1 - the new random streams.
Throws:
NullPointerException - if ccParams or streams are null.
CallCenterCreationException

create

public void create()
            throws CallCenterCreationException
Calls create (false).

Throws:
CallCenterCreationException - if an error occurs during the creation of the model.

create

public void create(boolean recreateStreams)
            throws CallCenterCreationException
Constructs the elements of the call center. This method is called by the constructor or by reset(CallCenterParams,RandomStreams). If recreateStreams is true, a new RandomStreams object is created and associated with this model; this results in a change of seeds for every random stream used. If recreateStreams is false, the same random streams are kept, and new ones are created just if needed.

Since this method recreates the complete structure of the call center, any listener observing the evolution of the model must be re-registered after this method returns.

Parameters:
recreateStreams - determines if random streams are recreated.
Throws:
CallCenterCreationException - if an error occurs during the creation of the model.

getDialerObjects

public DialerObjects getDialerObjects()
Returns the instance of DialerObjects associated with this model. If no such instance exists, it is constructed, stored for future use, and returned.

Returns:
eht dialer objects of this model.

createWaitingQueue

protected WaitingQueue createWaitingQueue(int q)
Constructs and returns the qth waiting queue for this call center. By default, this returns an instance of StandardWaitingQueue which is a FIFO queue without priority.

Parameters:
q - the index of the created waiting queue.
Returns:
the constructed waiting queue.

initSim

public void initSim()
Initializes the model for a new simulation with a random busyness factor. This method first generates the busyness factor B using the generator returned by getBusynessGen(), or sets B = 1 if no generator was given in parameter file for the busyness factor. It then calls initSim(double) with the generated B to complete initialization.


getBusynessFactor

public double getBusynessFactor()
Returns the current value of B used by arrival processes.

Returns:
the current value of B.

initSim

public void initSim(double b1)
Initializes the model for a new simulation setting the busyness factor of arrival processes to the given value b. This method initializes arrival processes, dialers, agent groups, waiting queues, and the router, without scheduling any event. Methods such as PeriodChangeEvent.start(), ContactArrivalProcess.start(), etc. must be used to schedule events before starting the simulation.

Parameters:
b1 - the busyness factor used.

isCallTransferSupported

public boolean isCallTransferSupported()
Determines if this model supports call transfers. This returns true if CallFactory.isCallTransferSupported() returns true for at least one call factory returned by getCallFactories().

Returns:
true if and only if this model supports call transfers.

isVirtualHoldSupported

public boolean isVirtualHoldSupported()
Determines if this model supports virtual holding. This returns true if CallFactory.isVirtualHoldSupported() returns true for at least one call factory returned by getCallFactories().

Returns:
true if and only if this model supports call virtual holding.

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.

Returns:
the total number of main periods.

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().

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.

Returns:
the total number of inbound contact types.

getNumOutContactTypes

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

Returns:
the total number of outbound contact types.

getNumAgentGroups

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

Returns:
the total number of agent groups.

getNumWaitingQueues

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

Returns:
the number of waiting queues.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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 q)
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:
q - 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.

getAwtPeriod

public AWTPeriod getAwtPeriod()
Returns the object used to compute the AWT period of contacts. This method returns null unless setAwtPeriod(AWTPeriod) was called with a non-null value.

Returns:
the object for AWT periods.

setAwtPeriod

public void setAwtPeriod(AWTPeriod awtPeriod)
Sets the object for computing AWT periods to awtPeriod.

Parameters:
awtPeriod - the object for computing AWT periods.

getAwtPeriod

public int getAwtPeriod(Contact contact)
Returns the period index used to obtain the period-specific acceptable waiting time for contact contact. If getAwtPeriod() returns null, this method returns the main period index of the contact's arrival. Otherwise, it returns the result of getAwtPeriod().getAwtPeriod (contact).

Parameters:
contact - the contact to be tested.
Returns:
the AWT period of the contact.

getPeriodChangeEvent

public PeriodChangeEvent getPeriodChangeEvent()
Returns a reference to the period-change event used by this model. This event occurs at the beginning of each period of the horizon, and triggers updates of some parameters such as the staffing in agent groups. One should start this event using PeriodChangeEvent.start() to simulate the horizon, or use PeriodChangeEvent.setCurrentPeriod(int) to simulate a single period as if it was infinite in the model.

Returns:
the period-change event.

setRouter

@Deprecated
public void setRouter(Router router)
Deprecated. Use RouterManager.setRouter(Router) instead.


getRouter

public Router getRouter()
Returns a reference to the router used by this model. This method calls getRouterManager().getRouter().


getRouterManager

public RouterManager getRouterManager()
Returns a reference to the router manager of this model.


getBusynessGen

public RandomVariateGen getBusynessGen()
Returns a reference to the random variate generator used for the global busyness factor B multiplying the arrival rates or number of arrivals of calls. This method returns null if no busyness factor is used.

Returns:
the random variate generator for busyness factor.

setBusynessGen

public void setBusynessGen(RandomVariateGen bgen)
Sets the random variate generator for the global busyness factor to bgen.

Parameters:
bgen - the new random variate generator.

getNumDialers

public int getNumDialers()
Returns the maximal number of dialer managers in this model. This corresponds to the number of outbound call types plus the number of dialers that can generate calls of several types.

Returns:
the number of dialers.

getDialerManager

public DialerManager getDialerManager(int k)
Returns the dialer manager with index k. The first $ \Ko$ dialers generate outbound calls of a single type while other dialers can generate calls of several types. This method returns null if k is smaller than $ \Ko$, and no dialer dedicated to calls of outbound type k exists.

Parameters:
k - the index of the dialer manager.
Returns:
the dialer manager.
Throws:
ArrayIndexOutOfBoundsException - if k is negative, or greater than or equal to the value returned by getNumDialers().

getDialer

public Dialer getDialer(int k)
Returns the dialer with index k, or null if k is smaller than $ \Ko$, and no dialer is dedicated to outbound calls of type k. This method calls getDialerManager(int) with the given value of k, and returns the dialer associated with the returned dialer manager.

Parameters:
k - the index of the dialer.
Returns:
the dialer, or null.

getDialerManagers

public DialerManager[] getDialerManagers()
Returns the array of dialer managers in this model. The first $ \Ko$ elements of the returned array represent dialers dedicated to a single type of outbound call, and may be null if no dialer is dedicated to a given call type.


getDialers

public Dialer[] getDialers()
Returns an array containing the dialers of this model. This method calls getDialerManagers(), and creates an array with each element k being the dialer associated with the dialer manager k. As with getDialerManagers(), some elements in the returned array might be null.


getNumArrivalProcesses

public int getNumArrivalProcesses()
Returns the maximal number of arrival process managers in this model. This corresponds to the number of inbound call types plus the number of arrival processes that can generate calls of several types.

Returns:
the number of arrival processes.

getArrivalProcessManager

public ArrivalProcessManager getArrivalProcessManager(int k)
Returns the arrival process manager with index k. The first $ \Ki$ arrival processes generate inbound calls of a single type while other processes can generate calls of several types. This method returns null if k is smaller than $ \Ki$, and no arrival process dedicated to calls of inbound type k exists.

Parameters:
k - the index of the arrival process manager.
Returns:
the arrival process manager.
Throws:
ArrayIndexOutOfBoundsException - if k is negative, or greater than or equal to the value returned by getNumArrivalProcesses().

getArrivalProcess

public ContactArrivalProcess getArrivalProcess(int k)
Returns the arrival process with index k, or null if k is smaller than $ \Ki$, and no arrival process is dedicated to inbound calls of type k. This method calls getArrivalProcessManager(int) with the given value of k, and returns the arrival process associated with the returned manager.

Parameters:
k - the index of the arrival process.
Returns:
the arrival process, or null.

getArrivalProcesManagers

public ArrivalProcessManager[] getArrivalProcesManagers()
Returns the array of arrival process managers in this model. The first $ \Ki$ elements of the returned array represent arrival processes dedicated to a single type of inbound call, and may be null if no arrival process is dedicated to a given call type.


getArrivalProcesses

public ContactArrivalProcess[] getArrivalProcesses()
Returns an array containing the arrival processes of this model. This method calls getArrivalProcesManagers(), and creates an array with each element k being the arrival process associated with the manager k. As with getArrivalProcesManagers(), some elements in the returned array might be null.


getAgentGroupManager

public AgentGroupManager getAgentGroupManager(int i)
Returns the agent group manager with index i.

Parameters:
i - the index of the agent group.
Returns:
the agent group manager.
Throws:
ArrayIndexOutOfBoundsException - if i is negative, or greater than or equal to the value returned by getNumAgentGroups().

getAgentGroup

public AgentGroup getAgentGroup(int i)
Returns the agent group with index i. This method is equivalent to calling getAgentGroupManager(int) and using AgentGroupManager.getAgentGroup().

Parameters:
i - the index of the agent group.
Returns:
the agent group.
Throws:
ArrayIndexOutOfBoundsException - if i is negative, or greater than or equal to the value returned by getNumAgentGroups().

getAgentGroupManagers

public AgentGroupManager[] getAgentGroupManagers()
Returns an array containing the agent group managers of this model.


getAgentGroups

public AgentGroup[] getAgentGroups()
Returns an array containing the agent groups of this model.


getWaitingQueues

public WaitingQueue[] getWaitingQueues()
Returns an array containing the waiting queues of this model.


getWaitingQueue

public WaitingQueue getWaitingQueue(int q)
Returns the waiting queue with index q in this model.

Parameters:
q - the index of the waiting queue.
Returns:
a reference to the waiting queue.
Throws:
ArrayIndexOutOfBoundsException - if q is negative, or greater than or equal to the value returned by getNumWaitingQueues().

getCallFactories

public CallFactory[] getCallFactories()
Returns the array of call factories for this model.


getCallFactory

public CallFactory getCallFactory(int k)
Returns the call factory generating calls of type k in this model.

Parameters:
k - the index of the call type.
Returns:
a reference to the call factory.
Throws:
ArrayIndexOutOfBoundsException - if k is negative, or greater than or equal to the value returned by getNumContactTypes().

getInContactTypeSegments

public SegmentInfo[] getInContactTypeSegments()
Returns an array containing information objects for all user-defined segments regrouping inbound contact types.


getInContactTypeSegment

public SegmentInfo getInContactTypeSegment(int k)
Returns the information object for the kth user-defined segment regrouping inbound contact types.

Parameters:
k - the index of the user-defined segment.
Returns:
the segment information object.
Throws:
ArrayIndexOutOfBoundsException - if k is negative, or greater than or equal to getNumInContactTypeSegments().

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.

getOutContactTypeSegments

public SegmentInfo[] getOutContactTypeSegments()
Returns an array containing information objects for all user-defined segments regrouping outbound contact types.


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.

getOutContactTypeSegment

public SegmentInfo getOutContactTypeSegment(int k)
Returns the information object for the kth user-defined segment regrouping outbound contact types.

Parameters:
k - the index of the user-defined segment.
Returns:
the segment information object.
Throws:
ArrayIndexOutOfBoundsException - if k is negative, or greater than or equal to getNumOutContactTypeSegments().

getContactTypeSegments

public SegmentInfo[] getContactTypeSegments()
Returns an array containing information objects for all user-defined segments regrouping contact types.


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.

getContactTypeSegment

public SegmentInfo getContactTypeSegment(int k)
Returns the information object for the kth user-defined segment regrouping contact types.

Parameters:
k - the index of the user-defined segment.
Returns:
the segment information object.
Throws:
ArrayIndexOutOfBoundsException - if k is negative, or greater than or equal to getNumContactTypeSegments().

getAgentGroupSegments

public SegmentInfo[] getAgentGroupSegments()
Returns an array containing information objects for all user-defined segments regrouping agent groups.


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.

getAgentGroupSegment

public SegmentInfo getAgentGroupSegment(int i)
Returns the information object for the ith user-defined segment regrouping agent groups.

Parameters:
i - the index of the user-defined segment.
Returns:
the segment information object.
Throws:
ArrayIndexOutOfBoundsException - if i is negative, or greater than or equal to getNumAgentGroups().

getMainPeriodSegments

public SegmentInfo[] getMainPeriodSegments()
Returns an array containing information objects for all user-defined segments regrouping main periods.


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.

getMainPeriodSegment

public SegmentInfo getMainPeriodSegment(int p)
Returns the information object for the pth user-defined segment regrouping main periods.

Parameters:
p - the index of the user-defined segment.
Returns:
the segment information object.
Throws:
ArrayIndexOutOfBoundsException - if p is negative, or greater than or equal to getNumMainPeriods().

getArrivalsMult

public double getArrivalsMult()
Returns the global multiplier applied to the arrival rates or number of arrivals for each arrival process in this model.

Returns:
the global multiplier for arrivals.

getPatienceTimesMult

public double getPatienceTimesMult()
Returns the global multiplier for patience times which is applied on every generated patience time.

Returns:
the global multiplier for patience times.

getServiceTimesMult

public double getServiceTimesMult()
Returns the global multiplier for service times which is applied on every generated service time.

Returns:
the global multiplier for service times.

getConferenceTimesMult

public double getConferenceTimesMult()
Returns the global multiplier for conference times of calls transferred to a new agent with the primary agent waiting for the secondary agent.

Returns:
the global multiplier for conference times.

getPreServiceTimesNoConfMult

public double getPreServiceTimesNoConfMult()
Returns the global multiplier for pre-service times of calls transferred to a new agent without the primary agent waiting for the secondary agent.

Returns:
the global multiplier for pre-service times.

getTransferTimesMult

public double getTransferTimesMult()
Returns the global multiplier applied on any generated transfer time.

Returns:
the global multiplier for transfer times.

getPreviewTimesMult

public double getPreviewTimesMult()
Returns the global multiplier applied to all generated preview times of outbound calls.

Returns:
the global multiplier for preview times.

getAgentsMult

public double getAgentsMult()
Returns the global multiplier for the number of agents in any group during any period.

Returns:
the global multiplier for staffing.

setArrivalsMult

public void setArrivalsMult(double arrivalsMult)
Sets the global multiplier for arrivals to arrivalsMult. This multiplier takes effect only after the next call to initSim().

Parameters:
arrivalsMult - the new multiplier.
Throws:
IllegalArgumentException - if the given multiplier is negative.

setPatienceTimesMult

public void setPatienceTimesMult(double patienceTimesMult)
Sets the global multiplier for patience times to patienceTimesMult. This multiplier takes effect only after the next call to initSim().

Parameters:
patienceTimesMult - the new multiplier.
Throws:
IllegalArgumentException - if the given multiplier is negative.

setServiceTimesMult

public void setServiceTimesMult(double serviceTimesMult)
Sets the global multiplier for service times to serviceTimesMult. This multiplier takes effect only after the next call to initSim().

Parameters:
serviceTimesMult - the new multiplier.
Throws:
IllegalArgumentException - if the given multiplier is negative.

setConferenceTimesMult

public void setConferenceTimesMult(double conferenceTimesMult)
Sets the global multiplier for conference times to conferenceTimesMult. This multiplier takes effect only after the next call to initSim().

Parameters:
conferenceTimesMult - the new multiplier.
Throws:
IllegalArgumentException - if the given multiplier is negative.

setPreServiceTimesNoConfMult

public void setPreServiceTimesNoConfMult(double preServiceTimesNoConfMult)
Sets the global multiplier for pre-service times to preServiceTimesNoConfMult. This multiplier takes effect only after the next call to initSim().

Parameters:
preServiceTimesNoConfMult - the new multiplier.
Throws:
IllegalArgumentException - if the given multiplier is negative.

setTransferTimesMult

public void setTransferTimesMult(double transferTimesMult)
Sets the global multiplier for transfer times to transferTimesMult. This multiplier takes effect only after the next call to initSim().

Parameters:
transferTimesMult - the new multiplier.
Throws:
IllegalArgumentException - if the given multiplier is negative.

setPreviewTimesMult

public void setPreviewTimesMult(double previewTimesMult)
Sets the global multiplier for preview times to previewTimesMult. This multiplier takes effect only after the next call to initSim().

Parameters:
previewTimesMult - the new multiplier.
Throws:
IllegalArgumentException - if the given multiplier is negative.

setAgentsMult

public void setAgentsMult(double agentsMult)
Sets the global multiplier for the number of agents to agentsMult. This multiplier takes effect only after the next call to initSim().

Parameters:
agentsMult - the new multiplier.
Throws:
IllegalArgumentException - if the given multiplier is negative.

getDefaultShiftMatrix

public boolean[][] getDefaultShiftMatrix()
Returns the J×P default shift matrix used for any agent group with a schedule giving only a vector of agents. Here, J is the number of shifts in the matrix. Element (j, p) of the returned matrix is true if and only if agents on shift j work during main period p.

Returns:
the default matrix of shifts.

resetAgentsMult

public void resetAgentsMult()
Sets the multiplier returned by getAgentsMult() to 1, and adjusts the multipliers for each agent group. Let m be the multiplier returned by getAgentsMult() before this method is called. This method changes the multiplier for each agent group i from mi to m*mi, and resets the global multiplier m to 1.


getWaitingTimePredictorClass

public Class<? extends WaitingTimePredictor> getWaitingTimePredictorClass()
Returns the class of waiting time predictors used by some routing policies, and virtual holding.

Returns:
the class of predictor for waiting times.

getQueueCapacity

public int getQueueCapacity()
Returns the current queue capacity in this model. This corresponds to the maximal total number of calls in queue at any time during the simulation,. An infinite queue capacity is represented by Integer.MAX_VALUE.

Returns:
the total queue capacity.

setQueueCapacity

public void setQueueCapacity(int q)
Sets the total queue capacity to q.

Parameters:
q - the new queue capacity.
Throws:
IllegalArgumentException - if the given queue capacity is smaller than the current total number of calls in queue.

isExponentialPatienceTime

public boolean isExponentialPatienceTime(int k,
                                         int mp)
Determines if patience times for contacts of type k arrived during period mp are exponential, and returns the result of the test.

Parameters:
k - the tested contact type.
mp - the tester arrival period.
Returns:
true if and only if patience times are exponential.

isExponentialPatienceTime

public boolean[][] isExponentialPatienceTime()
Returns an array containing true at position [k][p] if contacts of type k arrived during period p have exponential patience times.

Returns:
the status of patience times for all contact types and periods.

isExponentialServiceTime

public boolean isExponentialServiceTime(int k,
                                        int i,
                                        int mp)
Determines if service times for contacts of type k arrived during period mp, and served by agents in group i are exponential, and returns the result of the test.

Parameters:
k - the tested contact type.
i - the tested agent group.
mp - the tested arrival period.
Returns:
true if and only if service times are exponential.

isExponentialServiceTime

public boolean[][][] isExponentialServiceTime()
Returns an array containing true at position [k][i][p] if contacts of type k arrived during period p, and served by agents in group i have exponential service times.

Returns:
the status of service times for all contact types and periods.

getProperties

public Map<String,Object> getProperties()
Returns a map containing the user-defined properties associated with this model.

Returns:
the map of user-defined properties.

ContactCenters
V. 0.9.9.

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