function.mo.zdt1

function.mo.zdt1(X)

ZDT1 multi-objective test function (2 objectives).

ZDT1 is a classical bi-objective test problem with a convex Pareto front. It is one of the most widely used benchmark functions for multi-objective optimization.

Mathematical formulation

f1(X) = x1 f2(X) = g(X) * [1 - sqrt(x1 / g(X))] g(X) = 1 + 9 * sum(x_i for i=2 to n) / (n - 1)

Parameters

Name Type Description Default
X array - like Input points with shape (n_samples, n_features) or (n_features,). Can be a 1D array for a single point or 2D array for multiple points. Must have at least 2 dimensions. required

Returns

Name Type Description
np.ndarray np.ndarray: Objective values with shape (n_samples, 2) where: - Column 0: f1 values - Column 1: f2 values

Raises

Name Type Description
ValueError If X has fewer than 2 dimensions.

Note

  • Number of objectives: 2
  • Typical number of variables: 30
  • Search domain: [0, 1]^n
  • Pareto front: Convex, f1 ∈ [0, 1], f2 = 1 - sqrt(f1)
  • Characteristics: Convex, unimodal

Examples

Single point evaluation:

>>> from spotoptim.function.mo import zdt1
>>> import numpy as np
>>> X = np.array([0.0, 0.0, 0.0])
>>> result = zdt1(X)
>>> result.shape
(1, 2)
>>> result[0, 0]  # f1
0.0
>>> result[0, 1]  # f2
1.0

Multiple points evaluation:

>>> X = np.array([[0.0, 0.0], [0.5, 0.5], [1.0, 1.0]])
>>> result = zdt1(X)
>>> result.shape
(3, 2)

References

Zitzler, E., Deb, K., & Thiele, L. (2000). “Comparison of multiobjective evolutionary algorithms: Empirical results.” Evolutionary computation, 8(2), 173-195.