public interface CuttingPlaneTest
needsCuts()
which tests the satisfaction
of the SL constraints, and it estimates the subgradients if needed.Modifier and Type | Method and Description |
---|---|
DoubleMatrix2D |
evalNumAgents()
Evaluates the service level (SL) of the staffing vector set with
setNumAgents(int[]) . |
CallCenter |
getCallCenter()
Returns the call center model.
|
double |
getMinSLH()
Returns the service level (SL) of the call type that has the worst
unsatisfied SL for the cut generation by heuristic.
|
int |
getMinSLIndexH()
Returns the index of the call type that has the worst unsatisfied SL
for the cut generation by heuristic.
|
int |
getMinSLIndexS()
Returns the index of the call type that has the worst unsatisfied SL for
the cut generation by subgradients.
|
double |
getMinSLS()
Returns the service level (SL) of the call type that has the worst unsatisfied SL for
the cut generation by subgradient.
|
DoubleMatrix2D |
getServiceLevel()
Returns the service level of the last solution vector
evaluated with
evalNumAgents() , or
null if no staffing has yet been evaluated. |
SubgradientInfo |
getSubgradientInfo()
Returns the subgradient information on the service level.
|
boolean |
isFeasible()
Checks if the service level matrix returned by
getServiceLevel() is
feasible (satisfies all service level targets). |
boolean |
needsCuts()
Tests the call center with the current staffing, set with
setNumAgents(int[]) ,
and determines if the cutting-plane algorithm needs to add more cuts. |
void |
setNumAgents(int[] numAgents)
Sets a new staffing vector (performs deep copy).
|
CallCenter getCallCenter()
boolean needsCuts()
setNumAgents(int[])
,
and determines if the cutting-plane algorithm needs to add more cuts.
This method will compute the subgradient matrix if needed.true
if needs a new cut, otherwise false
(and
the optimal solution has been found)SubgradientInfo getSubgradientInfo()
int getMinSLIndexH()
CuttingPlaneParams.minEachSLH
.
Returns -1
if the SLs of all call types are equal or above
CuttingPlaneParams.minEachSLH.int getMinSLIndexS()
Returns -1 if the SLs of all call types are equal or above their SL targets
double getMinSLH()
getMinSLIndexH()
.double getMinSLS()
getMinSLIndexH()
.void setNumAgents(int[] numAgents)
numAgents
- the staffing vectorDoubleMatrix2D evalNumAgents()
setNumAgents(int[])
.
If this vector was the last vector to be simulated, then this method
will simply return the last simulated SL, and avoid making a useless
call to the simulator.DoubleMatrix2D getServiceLevel()
evalNumAgents()
, or
null
if no staffing has yet been evaluated.boolean isFeasible()
getServiceLevel()
is
feasible (satisfies all service level targets).true
if the service level matrix satisfies all targets, otherwise false
IllegalStateException
- if evalNumAgents()
has not been called yet
and getServiceLevel()
returned null