Package org.opt4j.optimizer.rs
Class RandomSearch
java.lang.Object
org.opt4j.core.optimizer.AbstractOptimizer
org.opt4j.optimizer.rs.RandomSearch
- All Implemented Interfaces:
Optimizer
The
RandomSearch
simply generates random Individual
s and
evaluates them.-
Field Summary
Fields inherited from class org.opt4j.core.optimizer.AbstractOptimizer
archive, completer, control, iteration, iterationListeners, optimizing, population, stateListeners
-
Constructor Summary
ConstructorDescriptionRandomSearch
(Population population, Archive archive, IndividualFactory individualFactory, IndividualCompleter completer, Control control, Iteration iteration, int batchsize) Constructs aRandomSearch
. -
Method Summary
Methods inherited from class org.opt4j.core.optimizer.AbstractOptimizer
addOptimizerIterationListener, addOptimizerStateListener, getIteration, injectListeners, isRunning, nextIteration, removeOptimizerIterationListener, removeOptimizerStateListener, startOptimization, stopOptimization
-
Field Details
-
batchsize
protected final int batchsize
-
-
Constructor Details
-
RandomSearch
@Inject public RandomSearch(Population population, Archive archive, IndividualFactory individualFactory, IndividualCompleter completer, Control control, Iteration iteration, int batchsize) Constructs aRandomSearch
.- Parameters:
population
- the populationarchive
- the archiveindividualFactory
- the individual creatorcompleter
- the completercontrol
- the controliteration
- the iteration counterbatchsize
- the size of the batch for an evaluation
-
-
Method Details
-
optimize
Description copied from interface:Optimizer
Starts the optimization process.- Throws:
StopException
- if the optimization is stoppedTerminationException
- if the optimization is terminated
-