public class LocalSearchStochImpl extends AbstractLocalSearchStoch
StochSolution
.
The local search will creates new instances of the simulator for each scenario (even if they are not required to be optimized). Hence, the cutting-plane method and local search will not use common random numbers in the simulations.
This program requires an initial stochastic solution StochSolution
.
It will optimize each covered scenario, taken from StochSolution.getCoveredScenarios()
,
independently using the individual local search LocalSearchSingle
.
These local search instances can run in parallel by setting the parameter
AbstractLocalSearchStoch.setNumCPU(int)
.
bestSolution, currPeriod, numCPU, numGroups, numScenarios, numTypes, rMinusCost, rPlusCost, scenParams, simList, simpList, staffCost, verbose
Constructor and Description |
---|
LocalSearchStochImpl(ScenariosParams scenParams,
double[] staffCost,
List<? extends CallCenterSim> simList)
Constructs a new instance of the local search for the stochastic staffing problem.
|
LocalSearchStochImpl(ScenariosParams scenParams,
List<SimParams> simpList,
double[] staffCost)
Constructs a new instance of the local search for the stochastic staffing problem.
|
Modifier and Type | Method and Description |
---|---|
StochSolution |
optimize(StochSolution initSol,
int maxIter,
int maxCPUSec)
Executes the local search starting from the given initial stochastic solution.
|
getBestSolution, getNumCPU, getVerbose, setNumCPU, setVerbose, verbosePrint, verbosePrintln
public LocalSearchStochImpl(ScenariosParams scenParams, List<SimParams> simpList, double[] staffCost)
Using the list of SimParams
, the local search will creates new instances of the simulator.
Hence, the cutting-plane method and local search will not use common random numbers in the simulations.
scenParams
- the scenario parameterssimpList
- the simulation parametersstaffCost
- the staffing cost per agent per group (non-recourse variables)public LocalSearchStochImpl(ScenariosParams scenParams, double[] staffCost, List<? extends CallCenterSim> simList)
Using the list of SimParams
, the local search will creates new instances of the simulator.
Hence, the cutting-plane method and local search will not use common random numbers in the simulations.
scenParams
- the scenario parametersstaffCost
- the staffing cost per agent per group (non-recourse variables)simList
- the list of simulators, one for each scenariopublic StochSolution optimize(StochSolution initSol, int maxIter, int maxCPUSec)
LocalSearchStoch
LocalSearchStoch.setNumCPU(int)
.optimize
in interface LocalSearchStoch
optimize
in class AbstractLocalSearchStoch
initSol
- the initial stochastic solutionmaxIter
- the maximum number of iterations for each local search executionmaxCPUSec
- the maximum CPU time in seconds