Class ServerExpansionImpl
java.lang.Object
de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.AbstractTactic
de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.impl.ServerExpansionImpl
- All Implemented Interfaces:
ITactic
Implements a server expansion heuristic. This heuristic finds a
highly utilised resource container, creates a new resource container and reallocates
components to this new resource container
-
Field Summary
Fields inherited from class de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.AbstractTactic
copy, individualFactory
-
Constructor Summary
ConstructorDescriptionServerExpansionImpl
(org.opt4j.operator.copy.Copy<org.opt4j.core.Genotype> copy, DSEIndividualFactory individualFactory, DSEWorkflowConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionboolean
doesMatchPrecondition
(DSEIndividual individual) Check whether there is a resource container that has a utilisation >= THRESHOLD_HIGH_UTILISATION and there is a least one unused resource container (unused means no allocated components)getHeuristicCandidates
(DSEIndividual individual, UtilisationResultCacheAndHelper resultsHelper) Generates collection of candidates by applying the server consolidation heuristicMethods inherited from class de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.operators.AbstractTactic
doesNotImprove, getHeuristicWeight, getNumberOfGeneratedCandidates, improves, increaseCounterOfGeneratedCandidates, setHeuristicWeight
-
Constructor Details
-
ServerExpansionImpl
public ServerExpansionImpl(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
Check whether there is a resource container that has a utilisation >= THRESHOLD_HIGH_UTILISATION and there is a least one unused resource container (unused means no allocated components)- Parameters:
individual
-- Returns:
-
getHeuristicCandidates
public List<TacticsResultCandidate> getHeuristicCandidates(DSEIndividual individual, UtilisationResultCacheAndHelper resultsHelper) Generates collection of candidates by applying the server consolidation heuristic- Parameters:
individual
- Individual which the heuristic should be applied to- Returns:
- Collection of improved individuals
-