Class MOEAD

All Implemented Interfaces:
Algorithm, Configurable, Stateful

public class MOEAD extends AbstractAlgorithm implements Configurable
Implementation of MOEA/D, the multiobjective evolutionary algorithm with decomposition. This implementation supports both the original MOEA/D specification from [1] as well as the utility-based search extension from [2].

References:

  1. Li, H. and Zhang, Q. "Multiobjective Optimization problems with Complicated Pareto Sets, MOEA/D and NSGA-II." IEEE Transactions on Evolutionary Computation, 13(2):284-302, 2009.
  2. 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 Details

    • MOEAD

      public MOEAD(Problem problem)
      Constructs the MOEA/D algorithm with default settings.
      Parameters:
      problem - the problem being solved
    • MOEAD

      public MOEAD(Problem problem, int initialPopulationSize, int neighborhoodSize, Initialization initialization, Variation variation, double delta, double eta, int updateUtility)
      Constructs the MOEA/D algorithm with the specified components. This version of MOEA/D uses utility-based search as described in [2].
      Parameters:
      problem - the problem being solved
      initialPopulationSize - the initial population size
      neighborhoodSize - the size of the neighborhood used for mating, which must be at least variation.getArity()-1.
      initialization - the initialization method
      variation - the variation operator
      delta - the probability of mating with a solution in the neighborhood rather than the entire population
      eta - the maximum number of population slots a solution can replace
      updateUtility - the frequency, in generations, in which utility values are updated; set to 50 to use the recommended update frequency or -1 to disable utility-based search.
    • MOEAD

      public MOEAD(Problem problem, int initialPopulationSize, int neighborhoodSize, Initialization initialization, Variation variation, double delta, double eta)
      Constructs the MOEA/D algorithm with the specified components. This constructs the original MOEA/D implementation without utility-based search.
      Parameters:
      problem - the problem being solved
      initialPopulationSize - the initial population size
      neighborhoodSize - the size of the neighborhood used for mating, which must be at least variation.getArity()-1.
      initialization - the initialization method
      variation - the variation operator
      delta - the probability of mating with a solution in the neighborhood rather than the entire population
      eta - the maximum number of population slots a solution can replace
    • MOEAD

      public MOEAD(Problem problem, int initialPopulationSize, int neighborhoodSize, WeightGenerator weightGenerator, Initialization initialization, Variation variation, double delta, double eta, int updateUtility)
      Constructs the MOEA/D algorithm with the specified components. This version of MOEA/D uses utility-based search as described in [2].
      Parameters:
      problem - the problem being solved
      initialPopulationSize - the initial population size
      neighborhoodSize - the size of the neighborhood used for mating, which must be at least variation.getArity()-1.
      weightGenerator - the weight generator, or null to use randomly-generated weights
      initialization - the initialization method, which must generate the same number of solutions as weights
      variation - the variation operator
      delta - the probability of mating with a solution in the neighborhood rather than the entire population
      eta - the maximum number of population slots a solution can replace
      updateUtility - the frequency, in generations, in which utility values are updated; set to 50 to use the recommended update frequency or -1 to disable utility-based search
    • MOEAD

      public MOEAD(Problem problem, int initialPopulationSize, int neighborhoodSize, WeightGenerator weightGenerator, Initialization initialization, Variation variation, double delta, double eta)
      Constructs the MOEA/D algorithm with the specified components. By default, this constructs the original MOEA/D implementation without utility-based search.
      Parameters:
      problem - the problem being solved
      initialPopulationSize - the initial population size
      neighborhoodSize - the size of the neighborhood used for mating, which must be at least variation.getArity()-1.
      weightGenerator - the weight generator, or null to use randomly-generated weights
      initialization - the initialization method, which must generate the same number of solutions as weights
      variation - the variation operator
      delta - the probability of mating with a solution in the neighborhood rather than the entire population
      eta - the maximum number of population slots a solution can replace
  • Method Details

    • getInitialPopulationSize

      public int getInitialPopulationSize()
      Returns the initial population size.
      Returns:
      the initial population size
    • setInitialPopulationSize

      public void setInitialPopulationSize(int initialPopulationSize)
      Sets the initial population size. This value can not be set after initialization.
      Parameters:
      initialPopulationSize - the initial population size
    • getNeighborhoodSize

      public int getNeighborhoodSize()
      Returns the size of the neighborhood used for mating.
      Returns:
      the neighborhood size
    • setNeighborhoodSize

      public void setNeighborhoodSize(int neighborhoodSize)
      Sets the size of the neighborhood used for mating, which must be at least variation.getArity()-1.
      Parameters:
      neighborhoodSize - the neighborhood size
    • getDelta

      public double getDelta()
      Returns the probability of mating with a solution in the neighborhood rather than the entire population.
      Returns:
      the delta value
    • setDelta

      public void setDelta(double delta)
      Sets the probability of mating with a solution in the neighborhood rather than the entire population.
      Parameters:
      delta - the delta value
    • getEta

      public double getEta()
      Returns the maximum number of population slots a solution can replace.
      Returns:
      the eta value
    • setEta

      public void setEta(double eta)
      Sets the maximum number of population slots a solution can replace.
      Parameters:
      eta - the eta value
    • getUpdateUtility

      public int getUpdateUtility()
      Returns the frequency, in generations, in which utility values are updated.
      Returns:
      the nmber of generations between each utility update
    • setUpdateUtility

      public void setUpdateUtility(int updateUtility)
      Sets the frequency, in generations, in which utility values are updated; set to 50 to use the recommended update frequency or -1 to disable utility-based search.
      Parameters:
      updateUtility - the number of generations between each utility update
    • getVariation

      public Variation getVariation()
      Returns the variation operator.
      Returns:
      the variation operator
    • setVariation

      public void setVariation(Variation variation)
      Sets the variation operator. MOEA/D typically uses differential evolution but other variation operators are supported.
      Parameters:
      variation - the variation to set
    • getInitialization

      public Initialization getInitialization()
      Returns the initialization method for generating solutions in the initial population.
      Returns:
      the initialization method
    • setInitialization

      public void setInitialization(Initialization initialization)
      Sets the initialization method for generating solutions in the initial population. This can only be set before initializing the algorithm.
      Parameters:
      initialization - the initialization method
    • getWeightGenerator

      public WeightGenerator getWeightGenerator()
      Returns the weight generator method.
      Returns:
      the weight generator
    • setWeightGenerator

      public void setWeightGenerator(WeightGenerator weightGenerator)
      Sets the weight generator, or null to use randomly-generated weights produced by RandomGenerator. The number of weights produced must exactly match the initial population size. This can only be set before initializing the algorithm.
      Parameters:
      weightGenerator - the weight generator
    • initialize

      protected void initialize()
      Description copied from class: AbstractAlgorithm
      Performs any initialization that is required by this algorithm. This method is called automatically on the first invocation of AbstractAlgorithm.step(). Implementations should always invoke super.initialize() to ensure the algorithm is initialized correctly.
      Overrides:
      initialize in class AbstractAlgorithm
    • getResult

      public NondominatedPopulation getResult()
      Description copied from interface: Algorithm
      Returns the current best-known result.
      Specified by:
      getResult in interface Algorithm
      Returns:
      the current best-known result
    • updateUtility

      protected void updateUtility()
      Updates the utility of each individual.
    • iterate

      public 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
    • saveState

      public void saveState(ObjectOutputStream stream) throws IOException
      Description copied from interface: Stateful
      Writes the state of this object to the stream. The order that objects are written to the stream is important. We recommend first calling super.saveState(stream) followed by writing each field.
      Specified by:
      saveState in interface Stateful
      Overrides:
      saveState in class AbstractAlgorithm
      Parameters:
      stream - the stream
      Throws:
      IOException - if an I/O error occurred
    • loadState

      public void loadState(ObjectInputStream stream) throws IOException, ClassNotFoundException
      Description copied from interface: Stateful
      Loads the state of this object from the stream. The order for reading objects from the stream must match the order they are written to the stream in Stateful.saveState(ObjectOutputStream).
      Specified by:
      loadState in interface Stateful
      Overrides:
      loadState in class AbstractAlgorithm
      Parameters:
      stream - the stream
      Throws:
      IOException - if an I/O error occurred
      ClassNotFoundException - if the stream referenced a class that is not defined