Class ZCAT

java.lang.Object
org.moeaframework.problem.AbstractProblem
org.moeaframework.problem.ZCAT.ZCAT
All Implemented Interfaces:
AutoCloseable, Problem, AnalyticalProblem
Direct Known Subclasses:
ZCAT1, ZCAT10, ZCAT11, ZCAT12, ZCAT13, ZCAT14, ZCAT15, ZCAT16, ZCAT17, ZCAT18, ZCAT19, ZCAT2, ZCAT20, ZCAT3, ZCAT4, ZCAT5, ZCAT6, ZCAT7, ZCAT8, ZCAT9

public abstract class ZCAT extends AbstractProblem implements AnalyticalProblem
Abstract class for implementing ZCAT test problems.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final boolean
    true if bias is applied; false otherwise.
    static final double
    The precision when considering if two floating-point numbers are equal.
    protected final org.moeaframework.problem.ZCAT.PFShapeFunction
    The shape function for the Pareto front.
    protected final org.moeaframework.problem.ZCAT.PSShapeFunction
    The shape function for the Pareto set.
    protected final boolean
    true if imbalance is applied; false otherwise.
    protected final int
    The difficulty level between 1 and 6.

    Fields inherited from class org.moeaframework.problem.AbstractProblem

    numberOfConstraints, numberOfObjectives, numberOfVariables
  • Constructor Summary

    Constructors
    Constructor
    Description
    ZCAT(int numberOfObjectives, int level, boolean bias, boolean imbalance, org.moeaframework.problem.ZCAT.PFShapeFunction F, org.moeaframework.problem.ZCAT.PSShapeFunction G)
    Constructs a new ZCAT problem.
    ZCAT(int numberOfVariables, int numberOfObjectives, int level, boolean bias, boolean imbalance, org.moeaframework.problem.ZCAT.PFShapeFunction F, org.moeaframework.problem.ZCAT.PSShapeFunction G)
    Constructs a new ZCAT problem.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    evaluate(Solution solution)
    Evaluates the solution, updating the solution's objectives in place.
    protected double[]
    evaluateF(double[] alpha, double[] beta)
    Evaluates the final objective values by combining the position and distance values.
    protected double
    evaluateZ(double[] w, int i)
    Applies imbalance / the difficulty level to the intermediate vector w.
    Returns a randomly-generated solution using the analytical solution to this problem.
    protected double[]
    getAlpha(double[] y, org.moeaframework.problem.ZCAT.PFShapeFunction F)
    Computes the position of the solution on the Pareto front.
    protected double[]
    getBeta(double[] y, org.moeaframework.problem.ZCAT.PSShapeFunction G)
    Computes the distance of the solution to the Pareto front.
    int
    getDimension(double[] y)
    The dimension of the Pareto front / Pareto set.
    protected double[]
    getJ(int i, double[] w)
    Computes the J vector.
    protected double[]
    getW(double[] z, int m)
    Applies bias to the z vector when enabled.
    protected double[]
    getY(double[] x)
    Normalizes the decision variables.
    protected double[]
    getZ(double[] y, int m, org.moeaframework.problem.ZCAT.PSShapeFunction G)
    Applies the Pareto shape function to the decision variables.
    Returns a new solution for this problem.
    protected double
    Zbias(double z)
    Calculates the bias for a single element of the z vector.

    Methods inherited from class org.moeaframework.problem.AbstractProblem

    close, getName, getNumberOfConstraints, getNumberOfObjectives, getNumberOfVariables

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.moeaframework.core.Problem

    close, getName, getNumberOfConstraints, getNumberOfObjectives, getNumberOfVariables, isType
  • Field Details

    • EPSILON

      public static final double EPSILON
      The precision when considering if two floating-point numbers are equal. This differs from Settings.EPS to match the original ZCAT source code.
    • level

      protected final int level
      The difficulty level between 1 and 6.
    • bias

      protected final boolean bias
      true if bias is applied; false otherwise.
    • imbalance

      protected final boolean imbalance
      true if imbalance is applied; false otherwise.
    • F

      protected final org.moeaframework.problem.ZCAT.PFShapeFunction F
      The shape function for the Pareto front.
    • G

      protected final org.moeaframework.problem.ZCAT.PSShapeFunction G
      The shape function for the Pareto set.
  • Constructor Details

    • ZCAT

      public ZCAT(int numberOfObjectives, int level, boolean bias, boolean imbalance, org.moeaframework.problem.ZCAT.PFShapeFunction F, org.moeaframework.problem.ZCAT.PSShapeFunction G)
      Constructs a new ZCAT problem.
      Parameters:
      numberOfObjectives - the number of objectives
      level - the difficulty level between 1 and 6
      bias - true if bias is applied to the decision variables; false otherwise
      imbalance - true if imbalance is applied; false otherwise.
      F - the Pareto front shape function
      G - the Pareto set shape function
    • ZCAT

      public ZCAT(int numberOfVariables, int numberOfObjectives, int level, boolean bias, boolean imbalance, org.moeaframework.problem.ZCAT.PFShapeFunction F, org.moeaframework.problem.ZCAT.PSShapeFunction G)
      Constructs a new ZCAT problem.
      Parameters:
      numberOfVariables - the number of decision variables
      numberOfObjectives - the number of objectives
      level - the difficulty level between 1 and 6
      bias - true if bias is applied to the decision variables; false otherwise
      imbalance - true if imbalance is applied; false otherwise.
      F - the Pareto front shape function
      G - the Pareto set shape function
  • Method Details

    • evaluate

      public void evaluate(Solution solution)
      Description copied from interface: Problem
      Evaluates the solution, updating the solution's objectives in place. Algorithms must explicitly call this method when appropriate to evaluate new solutions or reevaluate modified solutions.
      Specified by:
      evaluate in interface Problem
      Parameters:
      solution - the solution to be evaluated
    • newSolution

      public Solution newSolution()
      Description copied from interface: Problem
      Returns a new solution for this problem. Implementations must initialize the variables so that the valid range of values is defined, but typically leave the actual value at a default or undefined state.
      Specified by:
      newSolution in interface Problem
      Returns:
      a new solution for this problem
    • getDimension

      public int getDimension(double[] y)
      The dimension of the Pareto front / Pareto set. This is typically numberOfObjectives-1 but can differ for certain degenerate (ZCAT14 - ZCAT16) or hybrid (ZCAT19 - ZCAT20) problems.
      Parameters:
      y - the normalized decision variables
      Returns:
      the dimension of the Pareto front / Pareto set
    • getAlpha

      protected double[] getAlpha(double[] y, org.moeaframework.problem.ZCAT.PFShapeFunction F)
      Computes the position of the solution on the Pareto front.
      Parameters:
      y - the normalized decision variable values
      F - the function defining the Pareto front shape
      Returns:
      the position values
    • getBeta

      protected double[] getBeta(double[] y, org.moeaframework.problem.ZCAT.PSShapeFunction G)
      Computes the distance of the solution to the Pareto front.
      Parameters:
      y - the normalized decision variable values
      G - the function defining the Pareto set shape
      Returns:
      the distance values
    • getJ

      protected double[] getJ(int i, double[] w)
      Computes the J vector.
      Parameters:
      i - the objective index
      w - the w vector
      Returns:
      the intermediate vector J
    • getW

      protected double[] getW(double[] z, int m)
      Applies bias to the z vector when enabled.
      Parameters:
      z - the z vector
      m - the dimension of the Pareto front / set
      Returns:
      the result of biasing the z vector
    • getY

      protected double[] getY(double[] x)
      Normalizes the decision variables.
      Parameters:
      x - the raw, unnormalized decision variable values
      Returns:
      the normalized decision variables values scaled between [0, 1]
    • getZ

      protected double[] getZ(double[] y, int m, org.moeaframework.problem.ZCAT.PSShapeFunction G)
      Applies the Pareto shape function to the decision variables.
      Parameters:
      y - the normalized decision variables
      m - the dimension of the Pareto front / set
      G - the Pareto shape function
      Returns:
      the resulting vector z
    • Zbias

      protected double Zbias(double z)
      Calculates the bias for a single element of the z vector.
      Parameters:
      z - the single element of the z vector
      Returns:
      the value with bias applied
    • evaluateZ

      protected double evaluateZ(double[] w, int i)
      Applies imbalance / the difficulty level to the intermediate vector w.
      Parameters:
      w - the intermediate vector w
      i - the index
      Returns:
      the result of applying the imbalance / difficulty level function
    • evaluateF

      protected double[] evaluateF(double[] alpha, double[] beta)
      Evaluates the final objective values by combining the position and distance values.
      Parameters:
      alpha - the position values
      beta - the distance values
      Returns:
      the final objective values
    • generate

      public Solution generate()
      Description copied from interface: AnalyticalProblem
      Returns a randomly-generated solution using the analytical solution to this problem. Note however that discontinuous Pareto surfaces may result in some solutions generated by this method being dominated by other generated solutions. It is therefore recommended using a NondominatedPopulation to remove dominated solutions prior to using the generated reference set.

      The generated solutions should be spread uniformly across the entire Pareto frontier; however, this is a suggestion and is not a requirement of this interface.

      Specified by:
      generate in interface AnalyticalProblem
      Returns:
      a randomly-generated Pareto optimal solution to this problem