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
public abstract class AbstractTerminationCriterion extends Object implements ITerminationCriterion
-
-
Field Summary
Fields Modifier and Type Field Description protected org.opt4j.core.optimizer.Archive
archive
protected boolean
evaluationResult
protected TerminationCriteriaNames
name
protected Tree
outputInformation
protected boolean
outputNeedsUpdate
protected org.opt4j.core.optimizer.Population
population
protected Node
suggestedStop
-
Constructor Summary
Constructors Modifier Constructor Description 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.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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.boolean
getEvaluationResult()
Returns the result of the last evaluation.TerminationCriteriaNames
getName()
Returns the name of the termination criteria.Tree
getOutputInformation()
Returns the criteria output information.abstract void
updateOutputInformation()
-
-
-
Field Detail
-
evaluationResult
protected boolean evaluationResult
-
outputInformation
protected Tree outputInformation
-
population
protected org.opt4j.core.optimizer.Population population
-
archive
protected org.opt4j.core.optimizer.Archive archive
-
name
protected TerminationCriteriaNames name
-
suggestedStop
protected Node suggestedStop
-
outputNeedsUpdate
protected boolean outputNeedsUpdate
-
-
Constructor Detail
-
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 Detail
-
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
public TerminationCriteriaNames getName()
Returns the name of the termination criteria.- Specified by:
getName
in interfaceITerminationCriterion
- Returns:
- the name of the termination criteria.
-
getOutputInformation
public final Tree getOutputInformation()
Returns the criteria output information.- Specified by:
getOutputInformation
in interfaceITerminationCriterion
- Returns:
- String with output information.
-
updateOutputInformation
public abstract void updateOutputInformation()
-
-