Comprehensive reference for benchmark optimization problems in pymoo.
Characteristics: - Highly multimodal - Many local optima - Tests algorithm's ability to escape local minima - Continuous variables
Characteristics: - Multimodal with regularly distributed local minima - Product term introduces interdependencies between variables - Global minimum at origin
Characteristics: - Highly multimodal with regularly spaced local minima - Challenging for gradient-based methods - Tests global search capability
Characteristics: - Unimodal but narrow valley to global optimum - Tests algorithm's convergence in difficult landscape - Classic benchmark for continuous optimization
Characteristics: - Unimodal - Single global minimum - Tests basic convergence capability
Purpose: Standard benchmark for bi-objective optimization Construction: f₂(x) = g(x) · h(f₁(x), g(x)) where g(x) = 1 at Pareto-optimal solutions
Usage:
from pymoo.problems.multi import ZDT1, ZDT2, ZDT3, ZDT4, ZDT5, ZDT6
problem = ZDT1() # or ZDT2(), ZDT3(), etc.
Characteristics: - 2 objectives - 2 variables - Constrained problem - Tests constraint handling in multi-objective context
Characteristics: - 6 objectives - 6 variables - Multiple constraints - Real-world inspired
Characteristics: - 2 objectives - 2 variables - Disconnected feasible region - Tests handling of disjoint search spaces
Characteristics: - Structural engineering problem - Bi-objective (weight vs displacement) - Practical application test
Characteristics: - Engineering design problem - Multiple constraints - Practical optimization scenario
Characteristics: - Configurable test problem - Various difficulty levels - Systematic testing
Characteristics: - Symmetric problem structure - Tests specific algorithmic behaviors
Purpose: Scalable many-objective benchmarks Objectives: Configurable (typically 3-15) Variables: Scalable
Usage:
from pymoo.problems.many import DTLZ1, DTLZ2
problem = DTLZ1(n_var=7, n_obj=3) # 7 variables, 3 objectives
Purpose: Walking Fish Group scalable benchmarks Features: More complex than DTLZ, various front shapes and difficulties
Variants: WFG1-WFG9 with different characteristics - Non-separable - Deceptive - Multimodal - Biased - Scaled fronts
Purpose: Multi-objective problems with various constraint types Features: Different constraint difficulty levels
Purpose: Difficulty-adjustable and scalable constrained multi-objective problems Features: Tunable constraint difficulty
Purpose: Multi-objective optimization with active constraints Features: Realistic constraint scenarios
Purpose: CEC2018 Competition dynamic multi-objective benchmarks Features: - Time-varying objectives - Changing Pareto fronts - Tests algorithm adaptability
Variants: DF1-DF14 with different dynamics
Define custom problems by extending base classes:
from pymoo.core.problem import ElementwiseProblem
import numpy as np
class MyProblem(ElementwiseProblem):
def __init__(self):
super().__init__(
n_var=2, # number of variables
n_obj=2, # number of objectives
n_ieq_constr=0, # inequality constraints
n_eq_constr=0, # equality constraints
xl=np.array([0, 0]), # lower bounds
xu=np.array([1, 1]) # upper bounds
)
def _evaluate(self, x, out, *args, **kwargs):
# Define objectives
f1 = x[0]**2 + x[1]**2
f2 = (x[0]-1)**2 + x[1]**2
out["F"] = [f1, f2]
# Optional: constraints
# out["G"] = constraint_values # <= 0
# out["H"] = equality_constraints # == 0
For algorithm development: - Simple convergence: DTLZ2, ZDT1 - Multimodal: ZDT4, DTLZ1, DTLZ3 - Non-convex: ZDT2 - Disconnected: ZDT3, DTLZ7
For comprehensive testing: - ZDT suite for bi-objective - DTLZ suite for many-objective - WFG for complex landscapes - MW/DAS-CMOP for constraints
For real-world validation: - Engineering problems (Truss2D, Welded Beam) - Match problem characteristics to application domain
Variable types: - Continuous: Most problems - Discrete: ZDT5 - Mixed: Define custom problem