Class StartingPopulationHeuristicImpl

  • All Implemented Interfaces:
    IStartingPoulationHeuristic

    public class StartingPopulationHeuristicImpl
    extends AbstractStartingPopulationHeuristic
    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.
    • Constructor Detail

      • StartingPopulationHeuristicImpl

        public StartingPopulationHeuristicImpl​(DSEWorkflowConfiguration configuration)
        Parameters:
        configuration - As defined by the user in the GUI.
    • Method Detail

      • 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 inidividuals
        individualFactory - Used to copy individual
        baseIndividual - This individual is used as a starting point for the creation of all other individuals
        Returns: