public interface LocalSearchSingle
LocalSearchStoch
to manage multiple local searches in parallel (one for each scenario).Modifier and Type | Interface and Description |
---|---|
static class |
LocalSearchSingle.Solution
This class represents the local search solution.
|
Modifier and Type | Method and Description |
---|---|
double |
computeCost(int[] staffing,
int[] rPlus,
int[] rMinus)
Computes the cost of this solution, without multiplying by the
probability mass of the scenario.
|
DoubleMatrix2D |
evalSL(int[] realStaffing)
Performs the simulation of the given staffing and returns the service level measures.
|
DoubleMatrix2D |
evalSL(int[] staffing,
int[] rPlus,
int[] rMinus)
Performs the simulation of the given staffing and returns the service level measures.
|
LocalSearchSingle.Solution |
getBestSolution()
Returns the best solution found or
null if
the local search has not been executed yet. |
boolean |
getVerbose()
Returns the value of the verbose parameter.
|
LocalSearchSingle.Solution |
optimize(int[] staffInit,
int[] rPlusInit,
int[] rMinusInit,
int maxIter,
int maxCPUSec)
Executes the local search for this scenario.
|
void |
setVerbose(boolean verbose)
Sets verbose to
true to print program output to screen, else
sets to false to print less information. |
double computeCost(int[] staffing, int[] rPlus, int[] rMinus)
staffing
- the staffing vectorrPlus
- the recourse vector for adding agentsrMinus
- the recourse vector for removing agentsLocalSearchSingle.Solution getBestSolution()
null
if
the local search has not been executed yet.null
if
the local search has not been executed yetLocalSearchSingle.Solution optimize(int[] staffInit, int[] rPlusInit, int[] rMinusInit, int maxIter, int maxCPUSec)
staffInit
- the initial staffing variables (non-recourse)rPlusInit
- the initial recourse variables for adding agentsrMinusInit
- the initial recourse variables for removing agentsmaxIter
- maximum number of iterationsmaxCPUSec
- maximum CPU time in secondsDoubleMatrix2D evalSL(int[] realStaffing)
realStaffing
- the staffing vector simulate.
Use int[], int[])
to get the real staffing vector.DoubleMatrix2D evalSL(int[] staffing, int[] rPlus, int[] rMinus)
staffing
- the non-recourse staffing vectorrPlus
- the recourse variables for adding agentsrMinus
- the recourse variables for removing agentsvoid setVerbose(boolean verbose)
true
to print program output to screen, else
sets to false
to print less information.verbose
- true
to print program output to screen, else
false
to print less information.boolean getVerbose()