Class ReallocationImpl
- java.lang.Object
-
- de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.AbstractTactic
-
- de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.impl.ReallocationImpl
-
- All Implemented Interfaces:
ITactic
public class ReallocationImpl extends AbstractTactic
Implements a reallocation heuristic which allocates a component from a highly utilised resource container to a lowly utilised container TODO: Only works for a single resource type so far.
-
-
Field Summary
-
Fields inherited from class de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.AbstractTactic
copy, individualFactory
-
-
Constructor Summary
Constructors Constructor Description ReallocationImpl(org.opt4j.operator.copy.Copy<org.opt4j.core.Genotype> copy, DSEIndividualFactory individualFactory, DSEWorkflowConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
doesMatchPrecondition(DSEIndividual individual, org.palladiosimulator.pcm.resourcetype.ResourceType resourceType)
Check whether there is one server with high utilization and one with low utilization which are both not nullList<TacticsResultCandidate>
getHeuristicCandidates(DSEIndividual individual, UtilisationResultCacheAndHelper resultCache)
Generates collection of candidates by applying the reallocation heuristic-
Methods inherited from class de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.AbstractTactic
doesNotImprove, getHeuristicWeight, getNumberOfGeneratedCandidates, improves, increaseCounterOfGeneratedCandidates, setHeuristicWeight
-
-
-
-
Constructor Detail
-
ReallocationImpl
public ReallocationImpl(org.opt4j.operator.copy.Copy<org.opt4j.core.Genotype> copy, DSEIndividualFactory individualFactory, DSEWorkflowConfiguration configuration)
- Parameters:
copy
- Used to copy genotypeindividualFactory
- Used to build individual
-
-
Method Detail
-
doesMatchPrecondition
public boolean doesMatchPrecondition(DSEIndividual individual, org.palladiosimulator.pcm.resourcetype.ResourceType resourceType)
Check whether there is one server with high utilization and one with low utilization which are both not null- Parameters:
individual
- Individual to checkresourceType
-
-
getHeuristicCandidates
public List<TacticsResultCandidate> getHeuristicCandidates(DSEIndividual individual, UtilisationResultCacheAndHelper resultCache)
Generates collection of candidates by applying the reallocation heuristic- Parameters:
individual
- Individual which the heuristic should be applied to- Returns:
- Collection of improved individuals
-
-