ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.app
Class SearchStoppingCondition

java.lang.Object
  extended by umontreal.iro.lecuyer.contactcenters.app.SearchStoppingCondition
All Implemented Interfaces:
SimStoppingCondition

public class SearchStoppingCondition
extends Object
implements SimStoppingCondition

Early stopping condition allowing to perform a first cut when using neighborhood search. When checked, this condition computes a confidence interval on the aggregate value of a given performance measure and the simulation exits when a threshold value δ falls outside the confidence interval with confidence level β. The simulation also stops when a certain number of batches or replications is reached or when the default stopping condition of the simulator is satisfied. If the stopping condition fails, only one additional batch or replication is performed before the condition is checked again.


Constructor Summary
SearchStoppingCondition(double beta, double delta, PerformanceMeasureType pm, int maxReps)
          Constructs a new search stopping condition with confidence level β, threshold value δ, on performance measure type pm and with a maximal number of replications or batches maxReps.
 
Method Summary
 int check(ContactCenterSim sim, int newReps)
          Checks the implemented stopping condition and returns the required number of additional batches or replications to simulate.
 double getBeta()
          Returns the β confidence level.
 double getDelta()
          Returns the treshold value δ.
 int getMaxReplications()
          Returns the maximal number of replications or batches to simulate if the stopping condition does not apply.
 PerformanceMeasureType getPerformanceMeasureType()
          Returns the checked performance measure.
 void setBeta(double beta)
          Sets the β confidence level to beta.
 void setDelta(double delta)
          Sets the treshold value δ to delta.
 void setMaxReplications(int maxReps)
          Sets the maximal number of replications or batches to maxReps.
 void setPerformanceMeasureType(PerformanceMeasureType pm)
          Sets the checked performance measure to pm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchStoppingCondition

public SearchStoppingCondition(double beta,
                               double delta,
                               PerformanceMeasureType pm,
                               int maxReps)
Constructs a new search stopping condition with confidence level β, threshold value δ, on performance measure type pm and with a maximal number of replications or batches maxReps.

Parameters:
beta - the confidence level of the confidence intervals.
delta - the threshold value.
pm - the target performance measure.
maxReps - the maximal number of replications or batches.
Throws:
IllegalArgumentException - if β is not in (0, 1) or maxReps is negative.
NullPointerException - if pm is null.
Method Detail

getBeta

public double getBeta()
Returns the β confidence level.

Returns:
the confidence level.

setBeta

public void setBeta(double beta)
Sets the β confidence level to beta.

Parameters:
beta - the new confidence level.
Throws:
IllegalArgumentException - if beta is not in (0, 1).

getDelta

public double getDelta()
Returns the treshold value δ.

Returns:
the threshold value.

setDelta

public void setDelta(double delta)
Sets the treshold value δ to delta.

Parameters:
delta - the new threshold value.

getMaxReplications

public int getMaxReplications()
Returns the maximal number of replications or batches to simulate if the stopping condition does not apply.

Returns:
the maximal number of replications or batches.

setMaxReplications

public void setMaxReplications(int maxReps)
Sets the maximal number of replications or batches to maxReps.

Parameters:
maxReps - the new maximal number of replications or batches.
Throws:
IllegalArgumentException - if maxReps is negative.

getPerformanceMeasureType

public PerformanceMeasureType getPerformanceMeasureType()
Returns the checked performance measure.

Returns:
the checked performance measure.

setPerformanceMeasureType

public void setPerformanceMeasureType(PerformanceMeasureType pm)
Sets the checked performance measure to pm.

Parameters:
pm - the new checked performance measure.
Throws:
NullPointerException - if pm is null.

check

public int check(ContactCenterSim sim,
                 int newReps)
Description copied from interface: SimStoppingCondition
Checks the implemented stopping condition and returns the required number of additional batches or replications to simulate. This method must be given the contact center simulator and the number of additional replications or batches to simulate according to the simulator's default stopping condition. This number can be used or ignored and the returned value will be used instead by the simulator.

Specified by:
check in interface SimStoppingCondition
Parameters:
sim - the contact center simulator.
newReps - the number of required additional batches or replications, according to the default stopping condition.
Returns:
the number of new replications or batches, according to the implemented stopping condition.

ContactCenters
V. 0.9.9.

To submit a bug or ask questions, send an e-mail to Richard Simard.