ZDT test suite#

class zdt#

ZDT problem test suite.

This widespread test suite was conceived for two-objective problems and takes its name from its authors Zitzler, Deb and Thiele.

In their paper the authors propose a set of 6 different scalable problems all originating from a well thought combination of functions allowing, by construction, to measure the distance of any point to the Pareto front while creating interesting problems. They also suggest some dimensions for instantiating the problems, namely \(m = [30, 30, 30, 10, 11, 10]\).

See also

Zitzler, Eckart, Kalyanmoy Deb, and Lothar Thiele. “Comparison of multiobjective evolutionary algorithms: Empirical results.” Evolutionary computation 8.2 (2000): 173-195. doi: 10.1.1.30.5848

ZDT1:

This is a box-constrained continuous \(n\)-dimensional ( \(n\)>1) multi-objective problem.

\[\begin{split} \begin{array}{l} g\left(x\right) = 1 + 9 \left(\sum_{i=2}^{n} x_i \right) / \left( n-1 \right) \\ F_1 \left(x\right) = x_1 \\ F_2 \left(x\right) = g(x) \left[ 1 - \sqrt{x_1 / g(x)} \right] x \in \left[ 0,1 \right]. \end{array} \end{split}\]

ZDT2:

This is a box-constrained continuous \(n\)-dimension multi-objective problem.

\[\begin{split} \begin{array}{l} g\left(x\right) = 1 + 9 \left(\sum_{i=2}^{n} x_i \right) / \left( n-1 \right) \\ F_1 \left(x\right) = x_1 \\ F_2 \left(x\right) = g(x) \left[ 1 - \left(x_1 / g(x)\right)^2 \right] x \in \left[ 0,1 \right]. \end{array} \end{split}\]

ZDT3:

This is a box-constrained continuous \(n\)-dimension multi-objective problem.

\[\begin{split} \begin{array}{l} g\left(x\right) = 1 + 9 \left(\sum_{i=2}^{n} x_i \right) / \left( n-1 \right) \\ F_1 \left(x\right) = x_1 \\ F_2 \left(x\right) = g(x) \left[ 1 - \sqrt{x_1 / g(x)} - x_1/g(x) \sin(10 \pi x_1) \right] x \in \left[ 0,1 \right]. \end{array} \end{split}\]

ZDT4:

This is a box-constrained continuous \(n\)-dimension multi-objective problem.

\[\begin{split} \begin{array}{l} g\left(x\right) = 91 + \sum_{i=2}^{n} \left[x_i^2 - 10 \cos \left(4\pi x_i \right) \right] \\ F_1 \left(x\right) = x_1 \\ F_2 \left(x\right) = g(x) \left[ 1 - \sqrt{x_1 / g(x)} \right] x_1 \in [0,1], x_i \in \left[ -5,5 \right] i=2, \cdots, 10. \end{array} \end{split}\]

ZDT5

This is a box-constrained integer \(n\)-dimension multi-objective problem. The chromosome is a bitstring so that \(x_i \in \left\{0,1\right\}\). Refer to the original paper for the formal definition.

ZDT6

This is a box-constrained continuous \(n\)—dimension multi-objective problem.

\[\begin{split} \begin{array}{l} g\left(x\right) = 1 + 9 \left[\left(\sum_{i=2}^{n} x_i \right) / \left( n-1 \right)\right]^{0.25} \\ F_1 \left(x\right) = 1 - \exp(-4 x_1) \sin^6(6 \pi \ x_1) \\ F_2 \left(x\right) = g(x) \left[ 1 - (f_1(x) / g(x))^2 \right] x \in \left[ 0,1 \right]. \end{array} \end{split}\]

Note

The ZDT5 problem is an integer problem, its fitness is computed rounding all the chromosome values, so that [1,0,1] or [0.97, 0.23, 0.57] will have the same fitness. Integer relaxation techniques are thus not appropriate fot this type of fitness.

Public Functions

zdt(unsigned prob_id = 1u, unsigned param = 30u)#

Constructor

Will construct one problem from the ZDT test-suite.

Parameters
  • prob_id – problem number. Must be in [1, .., 6]

  • param – problem parameter, representing the problem dimension except for ZDT5 where it represents the number of binary strings

Throws
  • std::invalid_argument – if id is not in [1,..,6]

  • std::invalid_argument – if param is not at least 2.

vector_double fitness(const vector_double&) const#

Fitness computation.

Computes the fitness for this UDP

Parameters

x – the decision vector.

Returns

the fitness of x.

inline vector_double::size_type get_nobj() const#

Number of objectives.

It returns the number of objectives.

Returns

the number of objectives

std::pair<vector_double, vector_double> get_bounds() const#

Box-bounds.

It returns the box-bounds for this UDP.

Returns

the lower and upper bounds for each of the decision vector components

vector_double::size_type get_nix() const#

Integer dimension.

It returns the integer dimension for this UDP.

Returns

the integer dimension of the UDP

std::string get_name() const#

Problem name.

Returns

a string containing the problem name

double p_distance(const population&) const#

Distance from the Pareto front (of a population)

Convergence metric for a given population (0 = on the optimal front)

Takes the average across the input population of the p_distance

Parameters

pop – population to be assigned a pareto distance

Returns

the p_distance

double p_distance(const vector_double&) const#

Distance from the Pareto front.

Convergence metric for a given decision_vector (0 = on the optimal front)

Introduced by Martens and Izzo, this metric is able to measure “a distance” of any point from the pareto front of any ZDT problem analytically without the need to precompute the front.

See: Märtens, Marcus, and Dario Izzo. “The asynchronous island model

and NSGA-II: study of a new migration operator and its performance.” Proceedings of the 15th annual conference on Genetic and evolutionary computation. ACM, 2013.

Parameters

x – input decision vector

Returns

the p_distance