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.
    Returns the user-friendly name for this problem.
    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, 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, 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

    • getName

      public String getName()
      Description copied from interface: Problem
      Returns the user-friendly name for this problem.
      Specified by:
      getName in interface Problem
      Overrides:
      getName in class AbstractProblem
      Returns:
      the user-friendly name for this problem
    • 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. The exact behavior of this method depends on the implementation, but in general (1) the solutions should be non-dominated and (2) spread uniformly across the Pareto front.

      It is not always possible to guarantee these conditions. For example, a discontinuous / disconnected Pareto surface could generate dominated solutions, and a biased problem could result in non-uniform distributions. Therefore, we recommend callers filter solutions through a NondominatedPopulation, in particular one that maintains a spread of solutions.

      Furthermore, some implementations may not provide the corresponding decision variables for the solution. These implementations should indicate this by returning a solution with 0 decision variables.

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