MOEA Framework 2.12
API Specification

org.moeaframework.algorithm.single
Class VectorAngleDistanceScalingComparator

java.lang.Object
  extended by org.moeaframework.algorithm.single.VectorAngleDistanceScalingComparator
All Implemented Interfaces:
Serializable, Comparator<Solution>, AggregateObjectiveComparator, DominanceComparator

public class VectorAngleDistanceScalingComparator
extends Object
implements AggregateObjectiveComparator, Serializable

The vector angle distance scaling aggregate function. The distance between the origin and the objective vector is scaled by the cosine angle between the objective vector and a target vector.

References:

  1. E. J. Hughes. "Multiple Single Objective Pareto Sampling." 2003 Congress on Evolutionary Computation, pp. 2678-2684.

See Also:
Serialized Form

Constructor Summary
VectorAngleDistanceScalingComparator(double[] weights)
          Constructs a new instance of the vector angle distance scaling aggregate function with the given weights.
VectorAngleDistanceScalingComparator(double[] weights, double q)
          Constructs a new instance of the vector angle distance scaling aggregate function with the given weights.
 
Method Summary
static double calculateFitness(Solution solution, double[] weights, double q)
          Computes the vector angle distance scaling aggregate fitness of the solution.
 int compare(Solution solution1, Solution solution2)
          Compares the two solutions using a dominance relation, returning -1 if solution1 dominates solution2, 1 if solution2 dominates solution1, and 0 if the solutions are non-dominated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

VectorAngleDistanceScalingComparator

public VectorAngleDistanceScalingComparator(double[] weights)
Constructs a new instance of the vector angle distance scaling aggregate function with the given weights.

Parameters:
weights - the weight vector; must have a magnitude of 1.0

VectorAngleDistanceScalingComparator

public VectorAngleDistanceScalingComparator(double[] weights,
                                            double q)
Constructs a new instance of the vector angle distance scaling aggregate function with the given weights.

Parameters:
weights - the weight vector; must have a magnitude of 1.0
q - factor for scaling the effects of the angle
Method Detail

compare

public int compare(Solution solution1,
                   Solution solution2)
Description copied from interface: DominanceComparator
Compares the two solutions using a dominance relation, returning -1 if solution1 dominates solution2, 1 if solution2 dominates solution1, and 0 if the solutions are non-dominated.

Specified by:
compare in interface Comparator<Solution>
Specified by:
compare in interface DominanceComparator
Parameters:
solution1 - the first solution
solution2 - the second solution
Returns:
-1 if solution1 dominates solution2, 1 if solution2 dominates solution1, and 0 if the solutions are non-dominated

calculateFitness

public static double calculateFitness(Solution solution,
                                      double[] weights,
                                      double q)
Computes the vector angle distance scaling aggregate fitness of the solution. One weight should be given for each objective.

Parameters:
solution - the solution
weights - the weight vector
q - factor for scaling the effects of the angle
Returns:
the fitness, where smaller values are preferred

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!