Class RandomGenerator

java.lang.Object
org.moeaframework.util.weights.RandomGenerator
All Implemented Interfaces:
WeightGenerator

public class RandomGenerator extends Object implements WeightGenerator
Generates weights randomly. This is the method proposed in [1] to replace the normal boundary intersection method in the original MOEA/D. If N weights are requested, this method first generates 50*N random weights. From these weights, N are selected that are maximally distant from all other weights.

References:

  1. Zhang, Q., et al. "The Performance of a New Version of MOEA/D on CEC09 Unconstrained MOP Test Instances." IEEE Congress on Evolutionary Computation, 2009.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RandomGenerator(int numberOfObjectives, int numberOfPoints)
    Constructs a new weight generator that generates randomly-sampled weights.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<double[]>
    Returns the generated weights.
    int
    Returns the number of weights that will be generated.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RandomGenerator

      public RandomGenerator(int numberOfObjectives, int numberOfPoints)
      Constructs a new weight generator that generates randomly-sampled weights.
      Parameters:
      numberOfObjectives - the number of objectives
      numberOfPoints - the number of weights to generate
  • Method Details

    • size

      public int size()
      Description copied from interface: WeightGenerator
      Returns the number of weights that will be generated.
      Specified by:
      size in interface WeightGenerator
      Returns:
      the number of weights that will be generated
    • generate

      public List<double[]> generate()
      Description copied from interface: WeightGenerator
      Returns the generated weights.
      Specified by:
      generate in interface WeightGenerator
      Returns:
      the generated weights