public class NoRecourseProblem extends RecourseProblem
RecourseProblem
.cc, cplex, flowVarMap, numGroups, numScenarios, numTypes, rMinusCost, rMinusVar, rPlusCost, rPlusVar, scenParams, solveIP, staffCost, yVar
Constructor and Description |
---|
NoRecourseProblem(CallCenter cc,
ScenariosParams scenParams,
List<CuttingPlaneOnly> cpList,
boolean solveIP)
Constructs the stochastic staffing problem with recourse.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addConstraints(int scenIndex,
CuttingPlaneOnly cp,
ArrayList<StochCP.VariableData> varList)
Adds the constraints from
CuttingPlaneOnly , without the recourse variables. |
ilog.cplex.IloCplex |
buildProblem(List<CuttingPlaneOnly> cpList)
Builds and returns the Cplex model, ready to be solved.
|
protected void |
initIP()
Initializes the integer variables (but not the flow covering variables), and
the recourse variables are set to constant value 0.
|
protected void |
initLP()
Initializes the continuous variables (but not the flow covering variables), and
the recourse variables are set to constant value 0.
|
addFlowVariables, getCplexModel, parseVariables
public NoRecourseProblem(CallCenter cc, ScenariosParams scenParams, List<CuttingPlaneOnly> cpList, boolean solveIP)
cc
- a sample of the call center model (only used for some data)scenParams
- the scenario parameterscpList
- the list of cutting-plane solver used to optimize the scenarios individually.
Note that these instances must correspond to the scenario order in scenParams
.solveIP
- set to true
to create an MIP problem, or false
to create an LP problempublic ilog.cplex.IloCplex buildProblem(List<CuttingPlaneOnly> cpList) throws ilog.concert.IloException
RecourseProblem
RecourseProblem.getCplexModel()
.buildProblem
in class RecourseProblem
cpList
- the list of CuttingPlaneOnly
instances that were used to optimize
individually the scenarios.ilog.concert.IloException
protected void initIP() throws ilog.concert.IloException
RecourseProblem.rPlusVar
and RecourseProblem.rMinusVar
to null
.initIP
in class RecourseProblem
ilog.concert.IloException
protected void initLP() throws ilog.concert.IloException
RecourseProblem.rPlusVar
and RecourseProblem.rMinusVar
to null
.initLP
in class RecourseProblem
ilog.concert.IloException
protected void addConstraints(int scenIndex, CuttingPlaneOnly cp, ArrayList<StochCP.VariableData> varList) throws ilog.concert.IloException
CuttingPlaneOnly
, without the recourse variables.addConstraints
in class RecourseProblem
scenIndex
- the scenario index numbercp
- the CuttingPlaneOnly
instance used to optimize this scenariovarList
- the variable index translatorilog.concert.IloException
- an error occurred with Cplex