|
jInfer | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.mff.ksi.jinfer.iss.experiments.termination.TimeIterations
public class TimeIterations
An implementation of the TerminationCriterion
based on the total time
spent running the metaheuristics and the number of iterations - improvement
heuristics runs. Also, as soon as known optimum is reached, this criterion
is met.
Field Summary | |
---|---|
static TimeIterations |
NULL
Instance terminating immediately, without running any IHs. |
Constructor Summary | |
---|---|
TimeIterations(int maxIterations)
Constructor. |
|
TimeIterations(int maxIterations,
long maxTime)
Full constructor. |
Method Summary | |
---|---|
Pair<Boolean,String> |
terminate(Experiment experiment,
long time,
List<IdSet> solutions)
Returns a flag whether to terminate the iterations of the metaheuristic. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final TimeIterations NULL
Constructor Detail |
---|
public TimeIterations(int maxIterations)
maxIterations
- Maximum number of iterations - improvement
heuristics runs allowed.public TimeIterations(int maxIterations, long maxTime)
maxIterations
- Maximum number of iterations - improvement
heuristics runs allowed.maxTime
- Maximal time allowed, in milliseconds.Method Detail |
---|
public Pair<Boolean,String> terminate(Experiment experiment, long time, List<IdSet> solutions)
TerminationCriterion
terminate
in interface TerminationCriterion
experiment
- Experiment in context of which to measure the quality.time
- Total time taken so far.solutions
- The pool solutions that were produced in the last run.
true
if the
metaheuristic should be terminated, false otherwise. The second
is a string describing why the metaheuristics was terminated, in
user-friendly language.
|
jInfer | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |