MOEA Framework 2.12
API Specification

org.moeaframework.algorithm
Class ReferenceVectorGuidedPopulation

java.lang.Object
  extended by org.moeaframework.core.Population
      extended by org.moeaframework.algorithm.ReferenceVectorGuidedPopulation
All Implemented Interfaces:
Iterable<Solution>

public class ReferenceVectorGuidedPopulation
extends Population

A reference vector guided population, for use with RVEA, that truncates the population using the method outlined in [1].

References:

  1. R. Cheng, Y. Jin, M. Olhofer, and B. Sendhoff. "A Reference Vector Guided Evolutionary Algorithm for Many-objective Optimization." IEEE Transactions on Evolutionary Computation, Issue 99, 2016.


Nested Class Summary
protected static class ReferenceVectorGuidedPopulation.ReferenceVectorGuidedPopulationState
          Proxy for serializing the state of this population.
 
Constructor Summary
ReferenceVectorGuidedPopulation(int numberOfObjectives, int divisions, double alpha)
          Constructs a new population for RVEA.
ReferenceVectorGuidedPopulation(int numberOfObjectives, int divisions, double alpha, Iterable<? extends Solution> iterable)
          Constructs a new population for RVEA.
ReferenceVectorGuidedPopulation(int numberOfObjectives, int divisionsOuter, int divisionsInner, double alpha)
          Constructs a new population for RVEA.
ReferenceVectorGuidedPopulation(int numberOfObjectives, int divisionsOuter, int divisionsInner, double alpha, Iterable<? extends Solution> iterable)
          Constructs a new population for RVEA.
 
Method Summary
protected static double acosine(double[] line, double[] point)
          Returns the angle between the objective vector and a reference vector.
 void adapt()
          Normalize the reference vectors.
protected  List<List<Solution>> associateToReferencePoint(Population population)
          Associates each solution to the nearest reference vector, returning a list-of-lists.
protected  void calculateIdealPoint()
          Compute the ideal point.
protected static double cosine(double[] line, double[] point)
          Returns the cosine between the objective vector and a reference vector.
protected  ReferenceVectorGuidedPopulation.ReferenceVectorGuidedPopulationState getState()
          Returns the serializable state of this population.
protected  Solution select(List<Solution> solutions, int index)
          Select the solution with the smallest penalized distance.
 void setScalingFactor(double scalingFactor)
          Scaling factor used in the angle-penalized distance function.
protected  void setState(ReferenceVectorGuidedPopulation.ReferenceVectorGuidedPopulationState state)
          Configures this population given the serializable state.
protected  double smallestAngleBetweenWeights(int index)
          Computes the smallest angle between the given reference vector and all remaining vectors.
protected  void translateByIdealPoint()
          Offsets the solutions in this population by the ideal point.
 void truncate()
          Truncates the population so that only one solution is associated with each reference vector.
 void truncate(int size, Comparator<? super Solution> comparator)
          Sorts this population using the specified comparator and removes the last (maximum) solutions until this population's size is within the specified size.
 
Methods inherited from class org.moeaframework.core.Population
add, addAll, addAll, clear, contains, containsAll, containsAll, get, indexOf, isEmpty, iterator, remove, remove, removeAll, removeAll, replace, size, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceVectorGuidedPopulation

public ReferenceVectorGuidedPopulation(int numberOfObjectives,
                                       int divisions,
                                       double alpha)
Constructs a new population for RVEA.

Parameters:
numberOfObjectives - the number of objectives
divisions - the number of divisions
alpha - controls the rate of change in the angle-penalized distance function

ReferenceVectorGuidedPopulation

public ReferenceVectorGuidedPopulation(int numberOfObjectives,
                                       int divisions,
                                       double alpha,
                                       Iterable<? extends Solution> iterable)
Constructs a new population for RVEA.

Parameters:
numberOfObjectives - the number of objectives
divisions - the number of divisions
alpha - controls the rate of change in the angle-penalized distance function
iterable - the solutions used to initialize this population

ReferenceVectorGuidedPopulation

public ReferenceVectorGuidedPopulation(int numberOfObjectives,
                                       int divisionsOuter,
                                       int divisionsInner,
                                       double alpha)
Constructs a new population for RVEA.

Parameters:
numberOfObjectives - the number of objectives
divisionsOuter - the number of outer divisions
divisionsInner - the number of inner divisions
alpha - controls the rate of change in the angle-penalized distance function

ReferenceVectorGuidedPopulation

public ReferenceVectorGuidedPopulation(int numberOfObjectives,
                                       int divisionsOuter,
                                       int divisionsInner,
                                       double alpha,
                                       Iterable<? extends Solution> iterable)
Constructs a new population for RVEA.

Parameters:
numberOfObjectives - the number of objectives
divisionsOuter - the number of outer divisions
divisionsInner - the number of inner divisions
alpha - controls the rate of change in the angle-penalized distance function
iterable - the solutions used to initialize this population
Method Detail

setScalingFactor

public void setScalingFactor(double scalingFactor)
Scaling factor used in the angle-penalized distance function. This should be set to currentGeneration / maxGenerations. Smaller values favor convergence while larger values favor diversity.

Parameters:
scalingFactor - the scaling factor, between 0 and 1

adapt

public void adapt()
Normalize the reference vectors.


calculateIdealPoint

protected void calculateIdealPoint()
Compute the ideal point.


translateByIdealPoint

protected void translateByIdealPoint()
Offsets the solutions in this population by the ideal point. This method does not modify the objective values, it creates a new attribute with the name .


cosine

protected static double cosine(double[] line,
                               double[] point)
Returns the cosine between the objective vector and a reference vector. This method assumes the line is a normalized weight vector; the point does not need to be normalized.

Parameters:
line - the line originating from the origin
point - the point
Returns:
the cosine

acosine

protected static double acosine(double[] line,
                                double[] point)
Returns the angle between the objective vector and a reference vector. This method assumes the line is a normalized weight vector; the point does not need to be normalized.

Parameters:
line - the line originating from the origin
point - the point
Returns:
the angle (acosine)

associateToReferencePoint

protected List<List<Solution>> associateToReferencePoint(Population population)
Associates each solution to the nearest reference vector, returning a list-of-lists. The outer list maps to each reference vector using their index. The inner list is an unordered collection of the solutions associated with the reference point.

Parameters:
population - the population of solutions
Returns:
the association of solutions to reference points

smallestAngleBetweenWeights

protected double smallestAngleBetweenWeights(int index)
Computes the smallest angle between the given reference vector and all remaining vectors.

Parameters:
index - the index of the reference vector
Returns:
the smallest angle between the given reference vector and all remaining vectors

select

protected Solution select(List<Solution> solutions,
                          int index)
Select the solution with the smallest penalized distance.

Parameters:
solutions - the solutions
index - the index of the reference vector
Returns:
the solution with the smallest penalized distance

truncate

public void truncate(int size,
                     Comparator<? super Solution> comparator)
Description copied from class: Population
Sorts this population using the specified comparator and removes the last (maximum) solutions until this population's size is within the specified size.

Overrides:
truncate in class Population
Parameters:
size - the target population size after truncation
comparator - the comparator to be used for truncation

truncate

public void truncate()
Truncates the population so that only one solution is associated with each reference vector.


getState

protected ReferenceVectorGuidedPopulation.ReferenceVectorGuidedPopulationState getState()
Returns the serializable state of this population.

Returns:
the serializable state of this population

setState

protected void setState(ReferenceVectorGuidedPopulation.ReferenceVectorGuidedPopulationState state)
Configures this population given the serializable state.

Parameters:
state - the serializable state

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!