Class AbstractTactic
- java.lang.Object
-
- de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.AbstractTactic
-
- All Implemented Interfaces:
ITactic
- Direct Known Subclasses:
AbstractProcessingRateTactic
,ConcurrentProcessingSystemImplCatia
,ReallocateForReduceLinkUsage
,ReallocationImpl
,ServerConsolidationImpl
,ServerExpansionImpl
public abstract class AbstractTactic extends Object implements ITactic
-
-
Field Summary
Fields Modifier and Type Field Description protected org.opt4j.operator.copy.Copy<org.opt4j.core.Genotype>
copy
Creates copy of genotypesprotected DSEIndividualFactory
individualFactory
Builds individual
-
Constructor Summary
Constructors Constructor Description AbstractTactic(org.opt4j.operator.copy.Copy<org.opt4j.core.Genotype> copy, DSEIndividualFactory individualFactory, DSEWorkflowConfiguration configuration, String[] strings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
doesNotImprove(Dimension dimension, EvaluationAspect aspect)
Checks if a certain aspect of a dimension is not improved, if the heuristic is applied.double
getHeuristicWeight()
Weight of heuristic determines the probability of its candidates being selectedint
getNumberOfGeneratedCandidates()
Returns the number of generated candidates of this instanceboolean
improves(Dimension dimension, EvaluationAspect aspect)
Checks if a certain aspect of a dimension is improved, if the heuristic is applied.protected void
increaseCounterOfGeneratedCandidates()
protected void
setHeuristicWeight(double weight)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.ITactic
getHeuristicCandidates
-
-
-
-
Field Detail
-
copy
protected final org.opt4j.operator.copy.Copy<org.opt4j.core.Genotype> copy
Creates copy of genotypes
-
individualFactory
protected final DSEIndividualFactory individualFactory
Builds individual
-
-
Constructor Detail
-
AbstractTactic
public AbstractTactic(org.opt4j.operator.copy.Copy<org.opt4j.core.Genotype> copy, DSEIndividualFactory individualFactory, DSEWorkflowConfiguration configuration, String[] strings)
- Parameters:
copy
- Creates copy of genotypesindividualFactory
- Builds individual
-
-
Method Detail
-
increaseCounterOfGeneratedCandidates
protected final void increaseCounterOfGeneratedCandidates()
-
getHeuristicWeight
public final double getHeuristicWeight()
Description copied from interface:ITactic
Weight of heuristic determines the probability of its candidates being selected- Specified by:
getHeuristicWeight
in interfaceITactic
- Returns:
- Weight used for selecting candidate out of a set of candidates
-
setHeuristicWeight
protected final void setHeuristicWeight(double weight)
-
getNumberOfGeneratedCandidates
public final int getNumberOfGeneratedCandidates()
Description copied from interface:ITactic
Returns the number of generated candidates of this instance- Specified by:
getNumberOfGeneratedCandidates
in interfaceITactic
- Returns:
- Number of candidates generated by this heuristic
-
improves
public final boolean improves(Dimension dimension, EvaluationAspect aspect)
Description copied from interface:ITactic
Checks if a certain aspect of a dimension is improved, if the heuristic is applied. The specification is necessary, if the heuristics are applied based on their bound violations.
-
doesNotImprove
public boolean doesNotImprove(Dimension dimension, EvaluationAspect aspect)
Description copied from interface:ITactic
Checks if a certain aspect of a dimension is not improved, if the heuristic is applied. The specification is necessary, if the heuristics are applied based on their bound violations.- Specified by:
doesNotImprove
in interfaceITactic
- Parameters:
dimension
- The dimension to checkaspect
- The evaluation aspect of the dimension to check- Returns:
true
, if theEvaluationAspect
of thedimension
, i.e. quality attribute, of a individual does not improve after applying the heuristicfalse
, otherwise- See Also:
ITactic.improves(Dimension, EvaluationAspect)
-
-