ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.dialer
Class BadContactMismatchRatesDialerPolicy

java.lang.Object
  extended by umontreal.iro.lecuyer.contactcenters.dialer.ThresholdDialerPolicy
      extended by umontreal.iro.lecuyer.contactcenters.dialer.BadContactMismatchRatesDialerPolicy
All Implemented Interfaces:
DialerPolicy

public class BadContactMismatchRatesDialerPolicy
extends ThresholdDialerPolicy

Represents a threshold-based dialer's policy taking bad contact and mismatch rates into account for dialing, as used in Deslaurier's blend call center model [9]. This dialer's policy needs to be informed about the contact center's activity through two methods: notifyInboundContact(Contact,boolean), and notifyOutboundContact(Contact,boolean). When an inbound contact is processed (served, abandoned, or blocked) by the contact center, the notifyInboundContact(Contact,boolean) method needs to be called. When an outbound contact is processed, the notifyOutboundContact(Contact,boolean) method must be called. For both contact types, the user has to indicate this dialer's policy if the processed contact must be considered as good or bad. Usually, a good inbound contact is a contact meeting some service level requirements, e.g., having waited less than a certain time in queue. An outbound contact can be considered as good if it is not a mismatch.

When the dialer's policy is asked a number of calls to make, it gets the total number of free agents $ \Ntf$(t) in a test set. If this number is smaller than a given minimum st, no call is made. Otherwise, the dialer looks at the rate of bad inbound contacts in the last p periods of duration d. If this rate is smaller than or equal to a threshold si, the dialer's policy evaluates $ \Ndf$(t), the number of free agents in a target set. If this number is smaller than sd, no call is made. Otherwise, the base number of calls to dial n = $ \htmax${Math.round ( κ$ \Ndf$(t))+ c - a, 0} is computed. Then, if the rate of bad outbound contacts in the p last periods of duration d is smaller than or equal to a threshold so, 2n calls are made. Otherwise, n calls are made.


Constructor Summary
BadContactMismatchRatesDialerPolicy(DialerList list, AgentGroupSet testSet, AgentGroupSet targetSet, int minFreeTest, int minFreeTarget, double maxBadContactRate, double mismatchRateThresh, int numCheckedPeriods, double checkedPeriodDuration)
          This is the same as the constructor BadContactMismatchRatesDialerPolicy(DialerList,AgentGroupSet,AgentGroupSet,int,int,double,int,double,double,int,double) , with κ = 1 and c = 0.
BadContactMismatchRatesDialerPolicy(DialerList list, AgentGroupSet testSet, AgentGroupSet targetSet, int minFreeTest, int minFreeTarget, double kappa, int c, double maxBadContactRate, double mismatchRateThresh, int numCheckedPeriods, double checkedPeriodDuration)
          Constructs a new bad contact/mismatch rates dialer's policy with the dialer list list, test set testSet, target set targetSet.
 
Method Summary
 void dialerStarted(Dialer dialer)
          This method is called when the dialer using this policy is started.
 void dialerStopped(Dialer dialer)
          This method is called when the dialer using this policy is stopped.
 double getCheckedPeriodDuration()
          Returns the duration d of the checked periods.
 double getCurrentBadContactRate()
          Gets the current bad contact rate as used by getNumDials(umontreal.iro.lecuyer.contactcenters.dialer.Dialer).
 double getCurrentMismatchRate()
          Returns the current mismatch rate as used by getNumDials(umontreal.iro.lecuyer.contactcenters.dialer.Dialer).
 SumMatrixSW getInBadContactsSumMatrix()
          Returns the matrix of sums counting the number of bad inbound contacts notified to this dialing policy.
 SumMatrixSW getInTotalSumMatrix()
          Returns the matrix of sums counting the total number of inbound contacts notified to this dialing policy.
 double getMaxBadContactRate()
          Returns the maximal rate of bad contacts si for this dialer's policy.
 double getMismatchRateThresh()
          Returns the threshold on the mismatch rate so for this dialer's policy.
 SumMatrixSW getMismatchSumMatrix()
          Returns the matrix of sums counting the number of mismatches notified to this dialing policy.
 int getNumCheckedPeriods()
          Returns the number of checked periods p for this dialer's policy.
 int getNumDials(Dialer dialer)
          Returns the number of calls the dialer should try to make simultaneously at the current simulation time.
 SumMatrixSW getOutTotalSumMatrix()
          Returns the matrix of sums counting the total number of outbound contacts for this dialing policy.
 void init(Dialer dialer)
          Initializes this dialer's policy for a new simulation replication.
 void notifyInboundContact(Contact contact, boolean bad)
          Notify a processed inbound contact to this dialer's policy.
 void notifyOutboundContact(Contact contact, boolean m)
          Notifies an outbound contact to this dialer policy.
 void setCheckedPeriodDuration(double checkedPeriodDuration)
          Sets the duration of the checked periods to checkedPeriodDuration.
 void setMaxBadContactRate(double maxBadContactRate)
          Sets the maximal rate of bad contacts for this dialer's policy to maxBadContactRate.
 void setMismatchRateThresh(double mismatchRateThresh)
          Sets the threshold on the mismatch rate to mismatchRateThresh.
 void setNumCheckedPeriods(int numCheckedPeriods)
          Sets the number of checked periods to numCheckedPeriods.
 
Methods inherited from class umontreal.iro.lecuyer.contactcenters.dialer.ThresholdDialerPolicy
getC, getDialerList, getKappa, getMinFreeAgentsTarget, getMinFreeAgentsTest, getTargetSet, getTestSet, setC, setDialerList, setKappa, setMinFreeAgentsTarget, setMinFreeAgentsTest, setTargetSet, setTestSet, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BadContactMismatchRatesDialerPolicy

public BadContactMismatchRatesDialerPolicy(DialerList list,
                                           AgentGroupSet testSet,
                                           AgentGroupSet targetSet,
                                           int minFreeTest,
                                           int minFreeTarget,
                                           double maxBadContactRate,
                                           double mismatchRateThresh,
                                           int numCheckedPeriods,
                                           double checkedPeriodDuration)
This is the same as the constructor BadContactMismatchRatesDialerPolicy(DialerList,AgentGroupSet,AgentGroupSet,int,int,double,int,double,double,int,double) , with κ = 1 and c = 0.

Parameters:
list - the dialer list from which to get contacts.
testSet - the test agent group set.
targetSet - the target agent group set.
minFreeTest - the minimal number of free agents in the test set.
minFreeTarget - the minimal number of free agents in the target set.
maxBadContactRate - the maximal rate of bad contacts.
mismatchRateThresh - the mismatch rate threshold.
numCheckedPeriods - the number of checked periods p.
checkedPeriodDuration - the duration d of checked periods.
Throws:
NullPointerException - if list, testSet or targetSet are null.
IllegalArgumentException - if a threshold on the number of agents, the number of checked periods or the duration of checked periods are negative, or a rate is negative or greater than 1.

BadContactMismatchRatesDialerPolicy

public BadContactMismatchRatesDialerPolicy(DialerList list,
                                           AgentGroupSet testSet,
                                           AgentGroupSet targetSet,
                                           int minFreeTest,
                                           int minFreeTarget,
                                           double kappa,
                                           int c,
                                           double maxBadContactRate,
                                           double mismatchRateThresh,
                                           int numCheckedPeriods,
                                           double checkedPeriodDuration)
Constructs a new bad contact/mismatch rates dialer's policy with the dialer list list, test set testSet, target set targetSet. The minimal number of free agents is set to minFreeTest for the test set, and minFreeTarget for the target set. The maximal rate of bad contacts is set to maxBadContactRate, while the threshold for mismatch rate is mismatchRateThresh. To take its decisions, the policy uses rates for the last numCheckedPeriods periods of duration checkedPeriodDuration.

Parameters:
list - the dialer list from which to get contacts.
testSet - the test agent group set.
targetSet - the target agent group set.
minFreeTest - the minimal number of free agents in the test set.
minFreeTarget - the minimal number of free agents in the target set.
kappa - the κ multiplicative constant.
c - the c additive constant.
maxBadContactRate - the maximal rate of bad contacts.
mismatchRateThresh - the mismatch rate threshold.
numCheckedPeriods - the number of checked periods p.
checkedPeriodDuration - the duration d of checked periods.
Throws:
NullPointerException - if list, testSet or targetSet are null.
IllegalArgumentException - if a threshold on the number of agents, the number of checked periods or the duration of checked periods are negative, or a rate is negative or greater than 1.
Method Detail

getMaxBadContactRate

public double getMaxBadContactRate()
Returns the maximal rate of bad contacts si for this dialer's policy.

Returns:
the maximal rate of bad contacts.

setMaxBadContactRate

public void setMaxBadContactRate(double maxBadContactRate)
Sets the maximal rate of bad contacts for this dialer's policy to maxBadContactRate.

Parameters:
maxBadContactRate - the new rate of bad contacts.
Throws:
IllegalArgumentException - if maxBadContactRate is smaller than 0 or greater than 1.

getMismatchRateThresh

public double getMismatchRateThresh()
Returns the threshold on the mismatch rate so for this dialer's policy.

Returns:
the mismatch rate threshold.

setMismatchRateThresh

public void setMismatchRateThresh(double mismatchRateThresh)
Sets the threshold on the mismatch rate to mismatchRateThresh.

Parameters:
mismatchRateThresh - the threshold on the mismatch rate.
Throws:
IllegalArgumentException - if mismatchRateThresh is smaller than 0 or greater than 1.

getNumCheckedPeriods

public int getNumCheckedPeriods()
Returns the number of checked periods p for this dialer's policy.

Returns:
the number of checked periods.

setNumCheckedPeriods

public void setNumCheckedPeriods(int numCheckedPeriods)
Sets the number of checked periods to numCheckedPeriods.

Parameters:
numCheckedPeriods - the number of checked periods.
Throws:
IllegalArgumentException - if numCheckedPeriods is negative or 0.

getCheckedPeriodDuration

public double getCheckedPeriodDuration()
Returns the duration d of the checked periods.

Returns:
the checked period duration.

setCheckedPeriodDuration

public void setCheckedPeriodDuration(double checkedPeriodDuration)
Sets the duration of the checked periods to checkedPeriodDuration.

Parameters:
checkedPeriodDuration - the duration of the checked periods.
Throws:
IllegalArgumentException - if checkedPeriodDuration is negative or 0.

init

public void init(Dialer dialer)
Description copied from interface: DialerPolicy
Initializes this dialer's policy for a new simulation replication. This method can be used, for example, to clear data structures containing information about a preceding simulation. This method should also clear the associated dialer list when appropriate.

Specified by:
init in interface DialerPolicy
Overrides:
init in class ThresholdDialerPolicy
Parameters:
dialer - the dialer which initialized this policy.

dialerStarted

public void dialerStarted(Dialer dialer)
Description copied from interface: DialerPolicy
This method is called when the dialer using this policy is started.

Specified by:
dialerStarted in interface DialerPolicy
Overrides:
dialerStarted in class ThresholdDialerPolicy
Parameters:
dialer - the started dialer.

dialerStopped

public void dialerStopped(Dialer dialer)
Description copied from interface: DialerPolicy
This method is called when the dialer using this policy is stopped.

Specified by:
dialerStopped in interface DialerPolicy
Overrides:
dialerStopped in class ThresholdDialerPolicy
Parameters:
dialer - the stopped dialer.

getCurrentBadContactRate

public double getCurrentBadContactRate()
Gets the current bad contact rate as used by getNumDials(umontreal.iro.lecuyer.contactcenters.dialer.Dialer).

Returns:
the current bad contact rate.

getCurrentMismatchRate

public double getCurrentMismatchRate()
Returns the current mismatch rate as used by getNumDials(umontreal.iro.lecuyer.contactcenters.dialer.Dialer).

Returns:
the current mismatch rate.

notifyInboundContact

public void notifyInboundContact(Contact contact,
                                 boolean bad)
Notify a processed inbound contact to this dialer's policy. The bad indicator determines if a bad contact is notified. The simulator must determine which contacts to notify as well as a definition of bad contacts. Usually, all inbound contacts are notified to the dialer, and bad contacts have a waiting time greater than some acceptable waiting time.

Parameters:
contact - the notified contact.
bad - true if a bad contact is notified, false if a good contact is notified.

notifyOutboundContact

public void notifyOutboundContact(Contact contact,
                                  boolean m)
Notifies an outbound contact to this dialer policy. If m is true, the contact is a mismatch, i.e., it has balked (most often) or needed to wait before abandoning or being served. The application needs to decide which outbound contacts are notified and determine if contacts are mismatches or not. Usually, only outbound contacts produced by the dialer using this policy are notified, including right and wrong party connects.

Parameters:
contact - the notified contact.
m - true if the notified contact is a mismatch, false otherwise.

getNumDials

public int getNumDials(Dialer dialer)
Description copied from interface: DialerPolicy
Returns the number of calls the dialer should try to make simultaneously at the current simulation time.

If Dialer.isUsingNumActionsEvents() returns true, this method must take into account the current number of action events while determining the additional number of calls to dial. In the simplest and most common cases, the method subtracts the result of Dialer.getNumActionEvents() to the number of calls to dial. However, in some cases, it might be necessary to use Dialer.getNumActionEvents(int) to get the number of action events for each contact type individually.

Specified by:
getNumDials in interface DialerPolicy
Overrides:
getNumDials in class ThresholdDialerPolicy
Parameters:
dialer - the triggered dialer.
Returns:
the number of calls the dialer should try to make.

getInBadContactsSumMatrix

public SumMatrixSW getInBadContactsSumMatrix()
Returns the matrix of sums counting the number of bad inbound contacts notified to this dialing policy.

Returns:
the matrix of sums for bad contacts.

getInTotalSumMatrix

public SumMatrixSW getInTotalSumMatrix()
Returns the matrix of sums counting the total number of inbound contacts notified to this dialing policy.

Returns:
the matrix of sums for the total number of contacts.

getMismatchSumMatrix

public SumMatrixSW getMismatchSumMatrix()
Returns the matrix of sums counting the number of mismatches notified to this dialing policy.

Returns:
the matrix of sums for the number of mismatches.

getOutTotalSumMatrix

public SumMatrixSW getOutTotalSumMatrix()
Returns the matrix of sums counting the total number of outbound contacts for this dialing policy.

Returns:
the matrix of sums for the number of outbound contacts.

ContactCenters
V. 0.9.9.

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