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
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
ConstructorDescriptionReallocationImpl
(org.opt4j.operator.copy.Copy<org.opt4j.core.Genotype> copy, DSEIndividualFactory individualFactory, DSEWorkflowConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionboolean
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 nullgetHeuristicCandidates
(DSEIndividual individual, UtilisationResultCacheAndHelper resultCache) Generates collection of candidates by applying the reallocation heuristicMethods inherited from class de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.AbstractTactic
doesNotImprove, getHeuristicWeight, getNumberOfGeneratedCandidates, improves, increaseCounterOfGeneratedCandidates, setHeuristicWeight
-
Constructor Details
-
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 Details
-
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
-