public class SolveStopperFactory
extends java.lang.Object
Constructor and Description |
---|
SolveStopperFactory() |
Modifier and Type | Method and Description |
---|---|
static Stopper |
andStopper(Stopper stopper1,
Stopper stopper2)
Compound stopper which stops the solver if both stopper1 and stopper2 would stop it.
|
static Stopper |
flatOptimizationStopper(int minRepeatSolutions)
Get a stopper that stops after the specified number of repeat solutions is found.
|
static Stopper |
immediateStopper()
Stop the solver immediately.
|
static Stopper |
maxElapsedTimeStopper(double maxSeconds)
Get a stopper after a certain number of seconds.
|
static Stopper |
maxEvaluationsSatisfactionStopper(int maxEvaluations,
double satisfactionTarget)
Stop the solver after the solver reaches max evaluations (or strategy executions to avoid a possible hang).
|
static Stopper |
maxEvaluationsStopper(int maxEvaluations)
Stop the solver after the solver reaches max evaluations (or strategy executions to avoid a possible hang).
|
static Stopper |
maxOptimalSolutionStopper(int minOptimalSolutions)
Get a stopper after the max number of optimal solutions is reached.
|
static Stopper |
minMaxTimeSatisfactionStopper(double minSeconds,
double maxSeconds,
double satisfactionTarget)
Get a stopper that runs between a minimum and maximum time and has a minimum satisfaction
that all objectives must reach in order to stop short of the maximum time.
|
static Stopper |
minSatisfactionStopper(double satisfactionTarget)
Get a stopper that stops after the minimum satisfaction is achieved.
|
static Stopper |
orStopper(Stopper stopper1,
Stopper stopper2)
Compound stopper which stops the solver if either stopper1 or stopper2 would stop it.
|
static Stopper |
orStoppers(Stopper... stoppers)
Compound stopper which stops the solver if any of the stoppers stop it.
|
public static Stopper immediateStopper()
public static Stopper maxEvaluationsStopper(int maxEvaluations)
maxEvaluations
- The maximum evaluations or strategy executions to run the solver.public static Stopper maxElapsedTimeStopper(double maxSeconds)
maxSeconds
- The maximum number of seconds before getting the stopper.public static Stopper minSatisfactionStopper(double satisfactionTarget)
satisfactionTarget
- The satisfaction that must be reached by all objectives before stopping.public static Stopper maxEvaluationsSatisfactionStopper(int maxEvaluations, double satisfactionTarget)
maxEvaluations
- The maximum evaluations or strategy executions to run the solver.satisfactionTarget
- The satisfaction that must be reached by all objectives before stopping.public static Stopper minMaxTimeSatisfactionStopper(double minSeconds, double maxSeconds, double satisfactionTarget)
minSeconds
- The mininum number of seconds before getting stopper.maxSeconds
- The maximum number of seconds before getting stopper.satisfactionTarget
- The satisfaction that must be reached by all objectives before stopping.public static Stopper flatOptimizationStopper(int minRepeatSolutions)
minRepeatSolutions
- the number of repeat solutions to find before stoppingpublic static Stopper maxOptimalSolutionStopper(int minOptimalSolutions)
minOptimalSolutions
- The minimum number of optimal solutionspublic static Stopper orStopper(Stopper stopper1, Stopper stopper2)
stopper1
- The first stopper to checkstopper2
- The second stopper to checkpublic static Stopper orStoppers(Stopper... stoppers)
stoppers
- The stoppers to check