public class WhittWallaceRoutingStaffingLS extends WhittWallaceRoutingStaffing
WhittWallaceRoutingStaffing
,
for the RouterPolicyType.LOCALSPEC
routing policy (for multiple regions).
The regions are determined by the call types.
When creating the skill sets and agent groups, the groups are assumed to be placed
at same the region as their primary call type.
If the secondary call type is originated from a different region, then the router
will impose an overflow delay time on the second skill, as defined by RouterPolicyType.LOCALSPEC.
The program returns the solution as a new call center parameter file that contains
the new routing, agent groups and agent staffing.
This program requires a call center problem that uses the routing policy
RouterPolicyType.LOCALSPEC
.
However, to export the solution, it will convert the solution to use the more flexible routing policy
RouterPolicyType.AGENTSPREFWITHDELAYS
, instead of RouterPolicyType.LOCALSPEC
.
The new routing solution is equivalent to the local-specialist routing policy.
Note: This optimization minimizes the number of agents, and it does not consider any agent cost.
However, for convenience to the user, this class provides functions to compute the total cost of the staffing
(for agents with 1 or 2 skills) with int[], double)
and
double)
.
The user may use these function to compute the staffing cost in order to compare it with
the results from other staffing optimization methods.
WhittWallaceRoutingStaffing.MatrixRow, WhittWallaceRoutingStaffing.RoutingMatrix
Constructor and Description |
---|
WhittWallaceRoutingStaffingLS(CallCenterParams ccParams,
BatchSimParams simParams)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
constructInitialRoutingMatrix()
Finds an initial solution using approximation formula Erlang A or Erlang C
(depends on the patience time).
|
protected void |
constructInitialRoutingMatrixRegionBased()
Constructs the initial solution by region.
|
static double |
getStaffingCost(CallCenterParams ccParams,
double costPremium)
Identical to
int[], double) , but the skill sets and
staffing vector are read from the call center parameters. |
double |
getStaffingCost(int[][] groupToTypeMap,
int[] staffing,
double costPremium)
Computes the cost of the staffing.
|
static void |
main(String[] args)
Executes the staffing and routing optimization.
|
void |
optimize(int maxSwaps)
Executes the optimization.
|
protected void |
printResult()
Prints the final results.
|
protected void |
setGroupName()
Sets the name of the agent group to include the 2 skills and the region.
|
protected void |
setGroupToTypeMap(RouterParams rpar,
int[][] groupToTypeMap)
Sets the
groupToTypeMap priority matrix and the associated delay matrix to the
given router. |
cleanGroupToTypeMap, findBestRowToAdd, findBestRowToRemove, findInitialFeasibleSolution, getStaffingByErlang, improveSolution, isValidRow, optimize, roundValues, writeResult
public WhittWallaceRoutingStaffingLS(CallCenterParams ccParams, BatchSimParams simParams)
ccParams
- the parameters of the call centersimParams
- the parameters of simulationprotected void constructInitialRoutingMatrix()
WhittWallaceRoutingStaffing
constructInitialRoutingMatrix
in class WhittWallaceRoutingStaffing
protected void constructInitialRoutingMatrixRegionBased()
This initialization method has less number of skill set configurations
than constructInitialRoutingMatrix()
.
protected void setGroupToTypeMap(RouterParams rpar, int[][] groupToTypeMap)
groupToTypeMap
priority matrix and the associated delay matrix to the
given router.setGroupToTypeMap
in class WhittWallaceRoutingStaffing
rpar
- the routing parameter to be update with the new groupToTypeMap
groupToTypeMap
- the new groupToTypeMap
protected void setGroupName()
RouterManager.getGroupToTypeMap()
defines the skill sets of each group.
The number of rows in that matrix must be equal to the number of agent groups.IllegalArgumentException
- if the number of rows in groupToTypeMap
is
not equal to the number of agent groups in CallCenterParams.getAgentGroups()
.protected void printResult()
public double getStaffingCost(int[][] groupToTypeMap, int[] staffing, double costPremium)
costPremium
.
A particularity of this local-specialist policy is that the a skill can be
associated with multiple call types, but it only counts for one skill cost if
its the same skill but for different regions.
Note: The optimization minimizes the number of agents. It does not minimize the staffing based on the agent cost.
groupToTypeMap
- the routing map to determine the call types served by each agent.staffing
- the staffing vectorcostPremium
- the extra cost for having 2 different skills.public static double getStaffingCost(CallCenterParams ccParams, double costPremium)
int[], double)
, but the skill sets and
staffing vector are read from the call center parameters.ccParams
- the call center parameterscostPremium
- the extra cost for having 2 different skillspublic void optimize(int maxSwaps)
WhittWallaceRoutingStaffing.writeResult(java.lang.String)
to export the solution
after this method is finished.optimize
in class WhittWallaceRoutingStaffing
maxSwaps
- the maximum number of skill set swaps to make a solution
feasible, at each iteration of the optimization. See method WhittWallaceRoutingStaffing.improveSolution(int)
.public static void main(String[] args) throws Exception
args
- see the descriptionException