Class AbstractTerminationCriterion
java.lang.Object
de.uka.ipd.sdq.tcfmoop.terminationcriteria.AbstractTerminationCriterion
- All Implemented Interfaces:
ITerminationCriterion
- Direct Known Subclasses:
ElapsedTimeCriterion
,GivenParetoFrontIsReachedCriterion
,InsignificantParetoFrontChangeCriterion
,InsignificantSetQualityImprovementCriterion
,MaxGenerationNumber
,MinimalQualityCriteriaValueCriterion
,NoNewParetoOptimalCandidatesFoundCriterion
,ParetoOptimalSetStabilityCriterion
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.opt4j.core.optimizer.Archive
protected boolean
protected TerminationCriteriaNames
protected Tree
protected boolean
protected org.opt4j.core.optimizer.Population
protected Node
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractTerminationCriterion
(IConfiguration conf, org.opt4j.core.optimizer.Population population, org.opt4j.core.optimizer.Archive archive) Initializes the termination criteria by supplying it with the configuration object and other needed resources. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
evaluate
(int iteration, long currentTime) Evaluates this termination criteria.protected abstract void
evaluateImpl
(int iteration, long currentTime) The implementation of the Evaluation logic is placed here.final boolean
Returns the result of the last evaluation.getName()
Returns the name of the termination criteria.final Tree
Returns the criteria output information.abstract void
-
Field Details
-
evaluationResult
protected boolean evaluationResult -
outputInformation
-
population
protected org.opt4j.core.optimizer.Population population -
archive
protected org.opt4j.core.optimizer.Archive archive -
name
-
suggestedStop
-
outputNeedsUpdate
protected boolean outputNeedsUpdate
-
-
Constructor Details
-
AbstractTerminationCriterion
protected AbstractTerminationCriterion(IConfiguration conf, org.opt4j.core.optimizer.Population population, org.opt4j.core.optimizer.Archive archive) Initializes the termination criteria by supplying it with the configuration object and other needed resources.- Parameters:
conf
- - The configuration object.population
- - The current Populationarchive
- - A reference to the archive- Throws:
RuntimeException
- if the configuration object is not fully initialized.
-
-
Method Details
-
getEvaluationResult
public final boolean getEvaluationResult()Returns the result of the last evaluation.- Specified by:
getEvaluationResult
in interfaceITerminationCriterion
- Returns:
- true - Optimization should be terminated. else - Optimization should continue.
-
evaluate
public final void evaluate(int iteration, long currentTime) Evaluates this termination criteria.- Specified by:
evaluate
in interfaceITerminationCriterion
- Parameters:
iteration
- - The number of the current iterationcurrentTime
- - The current time
-
evaluateImpl
protected abstract void evaluateImpl(int iteration, long currentTime) The implementation of the Evaluation logic is placed here.- Parameters:
iteration
- - The number of the current iterationcurrentTime
- - The current time
-
getName
Returns the name of the termination criteria.- Specified by:
getName
in interfaceITerminationCriterion
- Returns:
- the name of the termination criteria.
-
getOutputInformation
Returns the criteria output information.- Specified by:
getOutputInformation
in interfaceITerminationCriterion
- Returns:
- String with output information.
-
updateOutputInformation
public abstract void updateOutputInformation()
-