public class FluidRatioProblem extends Object
FluidRatioStaffing
.Modifier and Type | Field and Description |
---|---|
protected double[] |
abanThresholds
The maximum abandonment ratio thresholds for all call types, followed by threshold for the aggregated calls.
|
protected double[] |
arrivalRates
The arrival rates of each call type.
|
protected CallCenter |
cc
The call center model.
|
protected ilog.cplex.IloCplex |
cplex
The Cplex instance that represents the recourse problem.
|
protected int |
currPeriod
The current period to be optimized.
|
protected HashMap<String,ilog.concert.IloNumVar> |
flowVarMap
A hash map that contains the flow covering variables with key String
w:k,i where k is the call type number and i is
the group number. |
protected int |
numGroups
The number of agent groups.
|
protected int |
numTypes
The number of call types.
|
protected boolean |
solveIP
Parameter that determines if this recourse problem must be solved by
integer programming (set to
true ) or relaxed to a linear problem. |
protected double[] |
staffCost
The staffing cost per agent for each group (for the variables
yVar . |
protected ilog.concert.IloNumVar[] |
yVar
The staffing variable, with index
[group] . |
Constructor and Description |
---|
FluidRatioProblem(CallCenter cc,
double[] staffCost,
int currentPeriod,
boolean solveIP)
Constructs the object that will allow to create the fluid model as a Cplex problem.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addFlowConstraints(double[] arrivalRates,
double[] abanThresholds,
double[][] workRatio)
Adds the flow covering constraints.
|
protected void |
addFlowVariables()
Creates the flow covering variables.
|
ilog.cplex.IloCplex |
buildProblem(double[] arrivalRates,
double[] abanThresholds,
double[][] workRatio)
Build the fluid staffing problem with Cplex.
|
ilog.cplex.IloCplex |
buildProblem(double[] arrivalRates,
double[] abanThresholds,
double[][] workRatio,
int[] lowerBound)
Builds the fluid staffing problem with Cplex by calling the method
double[], double[][]) and adds lower bounds
to each variable. |
ilog.cplex.IloCplex |
getCplexModel()
Returns the Cplex model, ready to be solved, or returns
null
if buildProblem(double[], double[], double[][]) has not been executed yet. |
protected final CallCenter cc
protected final int numTypes
protected final int numGroups
protected final boolean solveIP
true
) or relaxed to a linear problem.protected ilog.cplex.IloCplex cplex
protected ilog.concert.IloNumVar[] yVar
[group]
.protected HashMap<String,ilog.concert.IloNumVar> flowVarMap
w:k,i
where k
is the call type number and i
is
the group number.protected double[] staffCost
yVar
.protected double[] abanThresholds
Let K be the number of call types. If K = 1, then this vector has size 1. If K >= 2, then this vector has size (K + 1), with element index 0 to K - 1 corresponding to the call types and element K corresponding to the aggregated call types.
protected double[] arrivalRates
protected int currPeriod
public FluidRatioProblem(CallCenter cc, double[] staffCost, int currentPeriod, boolean solveIP)
buildProblem(double[], double[], double[][])
late.cc
- the call center modelstaffCost
- the staffing vector cost per agent for each groupcurrentPeriod
- the current period to optimizesolveIP
- to create a MIP problem, or a relaxed LP problempublic ilog.cplex.IloCplex buildProblem(double[] arrivalRates, double[] abanThresholds, double[][] workRatio) throws ilog.concert.IloException
arrivalRates
- the arrival rates of each call typeabanThresholds
- the maximum abandonment ratio thresholds for each call type and aggregated call type.
Let K be the number of call types. If K = 1, then this vector must be of size 1. If K >= 2, then this vector must be of size K + 1, with element index 0 to K - 1 corresponding to the call types and element K corresponding to the aggregated call types.
workRatio
- the distribution ratio of activities of a group over all call types.
The sum of ratio over all call types must be 1 for each group. A ratio cannot be negative.
The indexes are [type][group]
.ilog.concert.IloException
- an error occurred while creating the problem with Cplexpublic ilog.cplex.IloCplex buildProblem(double[] arrivalRates, double[] abanThresholds, double[][] workRatio, int[] lowerBound) throws ilog.concert.IloException
double[], double[][])
and adds lower bounds
to each variable.arrivalRates
- the arrival rate of each call typeabanThresholds
- the maximum abandonment ratio thresholds for each call type and aggregated call type.workRatio
- the distribution ratio of activities of a group over all call types.
The sum of ratio over all call types must be 1 for each group. A ratio cannot be negative.
The indexes are [type][group]
.lowerBound
- the lower bound for each variable.
The size of this array must be equal to the number of agent groups.
This is used to control the
neighborhood search with the linear programming. If the user sets the bound to null
or
a bound of 0, then no lower bound will be added to the Cplex problem.ilog.concert.IloException
protected void addFlowVariables() throws ilog.concert.IloException
ilog.concert.IloException
protected void addFlowConstraints(double[] arrivalRates, double[] abanThresholds, double[][] workRatio) throws ilog.concert.IloException
buildProblem(double[], double[], double[][])
.
This also adds the constraints that limit the work activity of each group over each call type.
The constraints are used to approximate the work load assigned by a routing policy
(because the fluid model does not consider the real routing policy of the call center).arrivalRates
- the arrival rates for each call typeabanThresholds
- the maximum abandonment ratio threshold for each call type and aggregated calls.
See method buildProblem(double[], double[], double[][])
.workRatio
- the distribution ratio of activities of a group over all call types.
The sum of ratio over all call types must be 1 for each group. A ratio cannot be negative.
The indexes are [type][group]
.ilog.concert.IloException
public ilog.cplex.IloCplex getCplexModel()
null
if buildProblem(double[], double[], double[][])
has not been executed yet.null
if buildProblem(double[], double[], double[][])
has not been executed yet