Package org.apache.wayang.profiler.log
Class GeneticOptimizer
java.lang.Object
org.apache.wayang.profiler.log.GeneticOptimizer
Implementation of the genetic optimization technique for finding good
LoadProfileEstimators.-
Constructor Summary
ConstructorsConstructorDescriptionGeneticOptimizer(OptimizationSpace optimizationSpace, Collection<PartialExecution> observations, Map<String, DynamicLoadProfileEstimator> estimators, Map<Platform, Variable> platformOverheads, Configuration configuration) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculateObservationBasedWeight(PartialExecution observation) doublecalculateRuntimeBasedWeight(PartialExecution observation) Creates a population of randomIndividuals.evolve(List<Individual> population) getData()static doublegetSelectionProbability(double score1, double score2, double minScore) voidupdateFitness(List<Individual> individuals) Update the fitness of theIndividuals w.r.t. to this instance and sort them according to their new fitness.
-
Constructor Details
-
GeneticOptimizer
public GeneticOptimizer(OptimizationSpace optimizationSpace, Collection<PartialExecution> observations, Map<String, DynamicLoadProfileEstimator> estimators, Map<Platform, Variable> platformOverheads, Configuration configuration) Creates a new instance.
-
-
Method Details
-
createInitialPopulation
Creates a population of randomIndividuals.- Returns:
- the
Individuals ordered by their fitness
-
updateFitness
Update the fitness of theIndividuals w.r.t. to this instance and sort them according to their new fitness.- Parameters:
individuals- theIndividuals
-
evolve
-
getSelectionProbability
public static double getSelectionProbability(double score1, double score2, double minScore) -
getActivatedGenes
-
getData
-
getConfiguration
-
getOptimizationSpace
-
getObservations
-
getNumObservations
-
getPlatformOverheads
-
calculateObservationBasedWeight
-
calculateRuntimeBasedWeight
-