Class InjectedInitialization
java.lang.Object
org.moeaframework.core.initialization.RandomInitialization
org.moeaframework.core.initialization.InjectedInitialization
- All Implemented Interfaces:
Initialization
Initialization method that injects pre-defined solutions into the initial population. This is typically used to
initialize an algorithm with a set of known "good" solutions.
-
Field Summary
Fields inherited from class org.moeaframework.core.initialization.RandomInitialization
problem
-
Constructor Summary
ConstructorDescriptionInjectedInitialization
(Problem problem, List<Solution> injectedSolutions) Constructs a random initialization operator that includes one or more pre-defined solutions.InjectedInitialization
(Problem problem, Solution... injectedSolutions) Constructs a random initialization operator that includes one or more pre-defined solutions. -
Method Summary
Modifier and TypeMethodDescriptionSolution[]
initialize
(int populationSize) Returns an array of solutions to become the initial population.
-
Constructor Details
-
InjectedInitialization
Constructs a random initialization operator that includes one or more pre-defined solutions.- Parameters:
problem
- the probleminjectedSolutions
- the pre-defined solutions injected into the initial population
-
InjectedInitialization
Constructs a random initialization operator that includes one or more pre-defined solutions.- Parameters:
problem
- the probleminjectedSolutions
- the pre-defined solutions injected into the initial population
-
-
Method Details
-
initialize
Description copied from interface:Initialization
Returns an array of solutions to become the initial population.- Specified by:
initialize
in interfaceInitialization
- Overrides:
initialize
in classRandomInitialization
- Parameters:
populationSize
- the number of solutions to create and initialize- Returns:
- an array of the initial solutions
-