public class Step2Problem extends Object
Note: the user can select to use recourse variables (default option) or
without recourse variables using the method setUseRecourse(boolean)
.
Modifier and Type | Field and Description |
---|---|
protected CallCenter |
cc |
protected ilog.cplex.IloCplex |
cplex |
protected int |
numGroups |
protected int |
numScenarios |
protected int |
numTypes |
protected double[] |
rMinusCost |
protected double |
rMinusCostMult |
protected ilog.concert.IloNumVar[][] |
rMinusVar |
protected double[] |
rPlusCost |
protected double |
rPlusCostMult |
protected ilog.concert.IloNumVar[][] |
rPlusVar |
protected ScenariosParams |
scenParams |
protected boolean |
solveIP |
protected double[] |
staffCost |
protected boolean |
useRecourse
Set to
true to use recourse variables, or set to false to remove them from
the stochastic problem. |
protected ilog.concert.IloNumVar[] |
yVar |
Constructor and Description |
---|
Step2Problem(CallCenter cc,
ScenariosParams scenParams,
List<ArrayList<Integer>> solList,
double[] staffCost,
boolean solveIP)
Constructs the stochastic staffing problem with recourse.
|
Modifier and Type | Method and Description |
---|---|
ilog.cplex.IloCplex |
buildProblem(List<ArrayList<Integer>> solList)
Builds and returns the Cplex problem of Step 2, ready to be solved.
|
ilog.cplex.IloCplex |
getCplexModel()
Returns the Cplex model, ready to be solved, or returns
null
if buildProblem(java.util.List) has not been executed yet. |
boolean |
getUseRecourse()
Checks if the recourse variables are used.
|
protected void |
initIP()
Initializes the integer variables.
|
protected void |
initLP()
Initializes the continuous variables.
|
void |
setUseRecourse(boolean b)
Sets to use recourse variables if
true , or set to false to remove
them from the stochastic problem. |
protected final CallCenter cc
protected final ScenariosParams scenParams
protected final int numScenarios
protected final int numTypes
protected final int numGroups
protected final boolean solveIP
protected ilog.cplex.IloCplex cplex
protected ilog.concert.IloNumVar[] yVar
protected ilog.concert.IloNumVar[][] rPlusVar
protected ilog.concert.IloNumVar[][] rMinusVar
protected double[] staffCost
protected double[] rPlusCost
protected double[] rMinusCost
protected double rMinusCostMult
protected double rPlusCostMult
protected boolean useRecourse
true
to use recourse variables, or set to false
to remove them from
the stochastic problem.
This parameter must be set before calling buildProblem(java.util.List)
.public Step2Problem(CallCenter cc, ScenariosParams scenParams, List<ArrayList<Integer>> solList, double[] staffCost, boolean solveIP)
cc
- a sample of the call center model (only used for some data)scenParams
- the scenario parameterssolList
- the list of solutions obtained during step 1, for each scenario.
Note that these solutions must correspond to the scenario order in scenParams
.staffCost
- the per-agent staffing cost vectorsolveIP
- set to true
to create an MIP problem, or false
to create an LP problempublic void setUseRecourse(boolean b)
true
, or set to false
to remove
them from the stochastic problem.
This parameter must be set before calling buildProblem(java.util.List)
.b
- the value to setpublic boolean getUseRecourse()
public ilog.cplex.IloCplex buildProblem(List<ArrayList<Integer>> solList) throws ilog.concert.IloException
getCplexModel()
.solList
- the list of solutions obtained during step 1, for each scenario.
Note that these solutions must correspond to the scenario order in scenParams
.ilog.concert.IloException
- an error occurred while creating the problem in Cplexprotected void initIP() throws ilog.concert.IloException
ilog.concert.IloException
protected void initLP() throws ilog.concert.IloException
ilog.concert.IloException
public ilog.cplex.IloCplex getCplexModel()
null
if buildProblem(java.util.List)
has not been executed yet.null
if buildProblem(java.util.List)
has not been executed yet