public class TestSimulatorCTMCProp extends TestSimulator
getIncrProportion()
.
But this method has a higher proportion of false transitions that TestSimulatorCTMCIncr
.
The maximum number of agents for each group simulation parameter is kept constant in a region of solutions. When the number of agents of a group i surpasses its maximum number, let's say Mi, then the parameter Mi will be increased to its current number plus an additional proportion p. Concretely, whenever the number of agents Xi > Mi, then the value Mi will be changed to:
This is checked for each group before generating a subgradient, so at minimum CRN will be applied at each subgradient. Note that using CRN only for each subgradient is not as effective as using CRN for the whole optimization (constant maximum number of agents parameter for the entire optimization). But finding such constant is difficult, so one would usually use an over-estimated parameter to be on the safe side, and this would result in a much higher proportion of false transitions. The approach implemented by this class is more efficient.
cc, cutp, eval, evalCount, evalTimeSec, numAgents, numGroups, numTypes, subgEvalCount, verbose
Constructor and Description |
---|
TestSimulatorCTMCProp(AbstractCallCenterCTMCSim eval,
CallCenter cc,
CuttingPlaneParams cutParams,
double incrProp)
Constructs the TestSimulator that will call the simulator.
|
Modifier and Type | Method and Description |
---|---|
protected DoubleMatrix2D |
evalStaffing(int[] staffing)
Calls the simulator to evaluate the given staffing.
|
protected SubgradientInfo |
generateGlobalSubg(int[] staffing,
DoubleMatrix2D sl,
int subStep)
Generates and returns the subgradient for the global service level.
|
protected SubgradientInfo |
generatePerCallSubg(int[] staffing,
DoubleMatrix2D sl,
int subStep)
Generates and returns the subgradient of the service level per call type.
|
double |
getAvgRatioFalseTransitions()
Returns the average ratio of false transitions.
|
double |
getIncrProportion()
Returns the increment proportion p, defined in the class description,
when updating the maximum number of agent vector of the CTMC simulator.
|
int |
getNumChangeMaxNumAgents()
Returns the number of times the maximum number of agents vector parameter has been changed
by calling
AbstractCallCenterCTMCSim.setMaxNumAgents(int[]) . |
void |
printMaxNumAgentsStat()
Prints the number of times that maximum number of agent vectors has changed,
the number of subgradients estimated and the current maximum number of agent vector
of the CTMC simulator.
|
evalNumAgents, generateSubg, getCallCenter, getEvalCount, getEvalTimeSeconds, getMinSLH, getMinSLIndexH, getMinSLIndexS, getMinSLS, getServiceLevel, getSubgEvalCount, getSubgradientInfo, isFeasible, needsCuts, printServiceLevel, setNumAgents, setVerbose
public TestSimulatorCTMCProp(AbstractCallCenterCTMCSim eval, CallCenter cc, CuttingPlaneParams cutParams, double incrProp)
eval
- the CTMC simulatorcc
- the call center parameterscutParams
- the parameter file of the cutting plane optimizerincrProp
- the increment proportion when changing the maximum number of agents of the CTMC simulatorpublic double getIncrProportion()
protected SubgradientInfo generateGlobalSubg(int[] staffing, DoubleMatrix2D sl, int subStep)
TestSimulator
generateGlobalSubg
in class TestSimulator
staffing
- the staffing point to generate subgradientssl
- the service level with the solution staffing
subStep
- the step length of the subgradientprotected SubgradientInfo generatePerCallSubg(int[] staffing, DoubleMatrix2D sl, int subStep)
TestSimulator
generatePerCallSubg
in class TestSimulator
staffing
- the staffing point to generate subgradientssl
- the service level with the solution staffing
subStep
- the step length of the subgradientprotected DoubleMatrix2D evalStaffing(int[] staffing)
TestSimulator
TestSimulator.lastNumAgentsSL
.evalStaffing
in class TestSimulator
staffing
- the staffing vector to needsCuts1public int getNumChangeMaxNumAgents()
AbstractCallCenterCTMCSim.setMaxNumAgents(int[])
.public double getAvgRatioFalseTransitions()
public void printMaxNumAgentsStat()