Class StartingPopulationHeuristicImpl
java.lang.Object
de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.startingPopulation.AbstractStartingPopulationHeuristic
de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.startingPopulation.impl.StartingPopulationHeuristicImpl
- All Implemented Interfaces:
IStartingPoulationHeuristic
Class implements a basic strategy to implement a heuristic that generates a starting
population. The user specifies minNumerOfResourceContainers and maxNumberOfResourceContainers. Then
the algorithm will generate numberOfCandidatesPerAllocationLevel individuals for each resource container
number ("allocation level") between minNumberOfResourceContainers and maxNumberOfResourceContainers using a random allocation
of components (resp. allocation contexts) to resource containers and the default processing rate (as used
by firstIndividual. For each allocation level all individuals are evaluated and the Pareto optimal
candidates are put into the population. Then four new individuals are generated for each Pareto optimal
individual in the population. These new individuals use four different processing rates: minimum processing
rate, maximum processing rate, lower processing rate (mean between default and minimum) and higher processing rate
(mean between default and maximum). All of them are put into the population as well.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetNumberOfComponentsPerResourceContainer
(int numberOfComponents, int numberOfResourceContainers) getStartingPopulation
(org.opt4j.core.optimizer.IndividualCompleter completer, org.opt4j.core.IndividualFactory individualFactory, DSEIndividual baseIndividual) Used to generate starting population as described in class documentation.Methods inherited from class de.uka.ipd.sdq.dsexplore.opt4j.optimizer.heuristic.startingPopulation.AbstractStartingPopulationHeuristic
getAllocationContexts, getResourceContainers
-
Constructor Details
-
StartingPopulationHeuristicImpl
- Parameters:
configuration
- As defined by the user in the GUI.
-
-
Method Details
-
getNumberOfComponentsPerResourceContainer
public static ArrayList<Integer> getNumberOfComponentsPerResourceContainer(int numberOfComponents, int numberOfResourceContainers) - Parameters:
numberOfComponents
-numberOfResourceContainers
-- Returns:
- Calculates the number of components on each resource container when using numberOfComponents allocation contexts and numberOfResourceContainers resource containers. Integer represents number of components/allocation contexts and each resource container. Size of array will be numberOfResourceContainers.
-
getStartingPopulation
public Collection<DSEIndividual> getStartingPopulation(org.opt4j.core.optimizer.IndividualCompleter completer, org.opt4j.core.IndividualFactory individualFactory, DSEIndividual baseIndividual) Used to generate starting population as described in class documentation. FIXME: Must only use those servers that are allowed in designdecisions.- Parameters:
completer
- Used to evaluate inidividualsindividualFactory
- Used to copy individualbaseIndividual
- This individual is used as a starting point for the creation of all other individuals- Returns:
-