MOEA Framework 2.12
API Specification

org.moeaframework.algorithm.single
Class RepeatedSingleObjective

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

public class RepeatedSingleObjective
extends AbstractAlgorithm

Instantiates and runs several instances of a single objective algorithm. This is intended to be used with single-objective optimizers that use weighted aggregation of the objectives. This is based on the Repeated Single Objective (RSO) algorithm by E. J. Hughes [1], where he investigates running many single-objective optimizers (one many) compared to running a single many-objective optimizer (many once).

Be mindful of how running multiple instances affects the AbstractAlgorithm.step(). Each step performs one iteration of each instance. Thus, given 50 instances of an algorithm with a population size of 100, then 5000 evaluations will occur each step. In [1], they decrease the population size for the single objective optimizers.

References:

  1. E. J. Hughes. "Evolutionary many-objective optimization: many once or one many." 2005 IEEE Congress on Evolutionary Computation, pp. 222-227.


Field Summary
 
Fields inherited from class org.moeaframework.algorithm.AbstractAlgorithm
initialized, numberOfEvaluations, problem, terminated
 
Constructor Summary
RepeatedSingleObjective(Problem problem, String algorithmName, Properties properties, int instances)
          Constructs a new instance of the Many-Once algorithm, which runs many instances of a single-objective optimizer with varying weights.
 
Method Summary
protected  Algorithm createInstance(double[] weights)
          Constructs a new instance of the algorithm using the given weights.
 int getNumberOfEvaluations()
          Returns the number of times the evaluate method was invoked.
 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, 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

RepeatedSingleObjective

public RepeatedSingleObjective(Problem problem,
                               String algorithmName,
                               Properties properties,
                               int instances)
Constructs a new instance of the Many-Once algorithm, which runs many instances of a single-objective optimizer with varying weights.

Parameters:
problem - the problem
algorithmName - the algorithm name
properties - the algorithm properties
instances - the number of instances
Method Detail

getNumberOfEvaluations

public int getNumberOfEvaluations()
Description copied from interface: Algorithm
Returns the number of times the evaluate method was invoked. This is the primary measure of runtime for optimization algorithms.

Specified by:
getNumberOfEvaluations in interface Algorithm
Overrides:
getNumberOfEvaluations in class AbstractAlgorithm
Returns:
the number of times the evaluate method was invoked

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

createInstance

protected Algorithm createInstance(double[] weights)
Constructs a new instance of the algorithm using the given weights. This assumes the weights are passed using the "weights" property.

Parameters:
weights - the weights
Returns:
the new algorithm instance

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!