MOEA Framework 2.12
API Specification

org.moeaframework.algorithm
Class RandomSearch

java.lang.Object
  extended by org.moeaframework.algorithm.AbstractAlgorithm
      extended by org.moeaframework.algorithm.RandomSearch
All Implemented Interfaces:
Algorithm

public class RandomSearch
extends AbstractAlgorithm

Random search implementation. An Initialization instance is used to generate random solutions, which are evaluated and all non-dominated solutions retained. The result is the set of all non-dominated solutions.


Field Summary
 
Fields inherited from class org.moeaframework.algorithm.AbstractAlgorithm
initialized, numberOfEvaluations, problem, terminated
 
Constructor Summary
RandomSearch(Problem problem, Initialization generator, NondominatedPopulation archive)
          Constructs a new random search procedure for the given problem.
 
Method Summary
 NondominatedPopulation getResult()
          Returns the current best-known result.
protected  void initialize()
          Performs any initialization that is required by this algorithm.
protected  void iterate()
          Performs one iteration of the algorithm.
 
Methods inherited from class org.moeaframework.algorithm.AbstractAlgorithm
evaluate, evaluateAll, evaluateAll, finalize, getNumberOfEvaluations, getProblem, getState, isInitialized, isTerminated, setState, step, terminate
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomSearch

public RandomSearch(Problem problem,
                    Initialization generator,
                    NondominatedPopulation archive)
Constructs a new random search procedure for the given problem.

Parameters:
problem - the problem being solved
generator - the initialization routine used to generate random solutions
archive - the archive of non-dominated solutions
Method Detail

getResult

public NondominatedPopulation getResult()
Description copied from interface: Algorithm
Returns the current best-known result.

Returns:
the current best-known result

initialize

protected void initialize()
Description copied from class: AbstractAlgorithm
Performs any initialization that is required by this algorithm. This method is called automatically by the first invocation of AbstractAlgorithm.step(), but may also be called manually prior to any invocations of step. Implementations should always invoke super.initialize() to ensure the hierarchy is initialized correctly.

Overrides:
initialize in class AbstractAlgorithm

iterate

protected void iterate()
Description copied from class: AbstractAlgorithm
Performs one iteration of the algorithm. This method should be overridden by implementations to perform each logical iteration of the algorithm.

Specified by:
iterate in class AbstractAlgorithm

MOEA Framework 2.12
API Specification

Copyright 2009-2016 MOEA Framework. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage. Visit us on Github!