public class NoRecourseCCProblem extends RecourseCCProblem
RecourseCCProblem
without any
recourse variables.
However, the variables RecourseCCProblem.zVar
must still be used to
adjust the staffing cost.LARGE_NUMBER, scenVar, zVar
cc, cplex, flowVarMap, numGroups, numScenarios, numTypes, rMinusCost, rMinusVar, rPlusCost, rPlusVar, scenParams, solveIP, staffCost, yVar
Constructor and Description |
---|
NoRecourseCCProblem(CallCenter cc,
ScenariosParams scenParams,
List<CuttingPlaneOnly> cpList,
boolean solveIP)
Constructs the stochastic staffing problem with chance constraint, but
no recourse variables.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addConstraints(int scenIndex,
CuttingPlaneOnly cp,
ArrayList<StochCP.VariableData> varList)
Adds the constraints from
CuttingPlaneOnly . |
ilog.cplex.IloCplex |
buildProblem(List<CuttingPlaneOnly> cpList)
Builds and returns the Cplex model, ready to be solved.
|
protected void |
initIP()
Initializes the integer variables, and sets the recourse variables
RecourseProblem.rPlusVar to RecourseProblem.rMinusVar to null . |
protected void |
initLP()
Initializes the continuous variables (but not the flow covering variables),
and sets the recourse variables
RecourseProblem.rPlusVar to RecourseProblem.rMinusVar to null . |
addFlowVariables, getCplexModel, parseVariables
public NoRecourseCCProblem(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 RecourseCCProblem
cpList
- the list of CuttingPlaneOnly
instances that were used to optimize
individually the scenarios.ilog.concert.IloException
protected void addConstraints(int scenIndex, CuttingPlaneOnly cp, ArrayList<StochCP.VariableData> varList) throws ilog.concert.IloException
RecourseProblem
CuttingPlaneOnly
.addConstraints
in class RecourseCCProblem
scenIndex
- the scenario index numbercp
- the CuttingPlaneOnly
instance used to optimize this scenariovarList
- the variable index translatorilog.concert.IloException
- an error occurred with Cplexprotected void initIP() throws ilog.concert.IloException
RecourseProblem.rPlusVar
to RecourseProblem.rMinusVar
to null
.
However, RecourseCCProblem.zVar
is NOT null
.initIP
in class RecourseProblem
ilog.concert.IloException
protected void initLP() throws ilog.concert.IloException
RecourseProblem.rPlusVar
to RecourseProblem.rMinusVar
to null
.
However, RecourseCCProblem.zVar
is NOT null
.initLP
in class RecourseProblem
ilog.concert.IloException