Class RandomInitialization
java.lang.Object
org.moeaframework.core.initialization.RandomInitialization
- All Implemented Interfaces:
Initialization
- Direct Known Subclasses:
InjectedInitialization
Initializes all built-in decision variables randomly. This invokes
Variable.randomize()
on each decision
variable.-
Field Summary
-
Constructor Summary
ConstructorDescriptionRandomInitialization
(Problem problem) Constructs a random initialization operator. -
Method Summary
Modifier and TypeMethodDescriptionSolution[]
initialize
(int populationSize) Returns an array of solutions to become the initial population.
-
Field Details
-
problem
The problem.
-
-
Constructor Details
-
RandomInitialization
Constructs a random initialization operator.- Parameters:
problem
- the problem
-
-
Method Details
-
initialize
Description copied from interface:Initialization
Returns an array of solutions to become the initial population.- Specified by:
initialize
in interfaceInitialization
- Parameters:
populationSize
- the number of solutions to create and initialize- Returns:
- an array of the initial solutions
-