Skip to content
Skills Library
Science & research · Analysis

alterlab-pymoo

/alterlab-pymoo

Multi-objective optimization with pymoo — NSGA-II, NSGA-III, MOEA/D, Pareto-front computation, constraint handling, and standard benchmarks (ZDT, DTLZ). Use when solving multi-objective or constrained optimization problems, computing Pareto-optimal trade-offs, or tackling engineering design problems with competing objectives. Part of the AlterLab Academic Skills suite.

Licence
MIT
Last repository change
23.09.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
14
Scripts
5
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 23.09.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 5 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/custom_problem_example.py, scripts/decision_making_example.py, scripts/many_objective_example.py, scripts/multi_objective_example.py, scripts/single_objective_example.py

What it does and when to use it

Multi-objective optimization with pymoo — NSGA-II, NSGA-III, MOEA/D, Pareto-front computation, constraint handling, and standard benchmarks (ZDT, DTLZ). Use when solving multi-objective or constrained optimization problems, computing Pareto-optimal trade-offs, or tackling engineering design problems with competing objectives. Part of the AlterLab Academic Skills suite.

Original author description

Multi-objective optimization with pymoo — NSGA-II, NSGA-III, MOEA/D, Pareto-front computation, constraint handling, and standard benchmarks (ZDT, DTLZ). Use when solving multi-objective or constrained optimization problems, computing Pareto-optimal trade-offs, or tackling engineering design problems with competing objectives. Part of the AlterLab Academic Skills suite.

How it works

  1. Overview
  2. When to Use This Skill
  3. Core Concepts
  4. Core Workflow
  5. Routing — where to look
  6. Install
Original SKILL.md headings · 97 lines, 602 words
SKILL.md preview
---
name: alterlab-pymoo
description: Multi-objective optimization with pymoo — NSGA-II, NSGA-III, MOEA/D, Pareto-front computation, constraint handling, and standard benchmarks (ZDT, DTLZ). Use when solving multi-objective or constrained optimization problems, computing Pareto-optimal trade-offs, or tackling engineering design problems with competing objectives. Part of the AlterLab Academic Skills suite.
license: Apache-2.0
allowed-tools: Read Write Edit Bash(python:*) Bash(uv:*)
compatibility: No API key required. Runs locally via `uv run python`; requires pymoo 0.6.x (current 0.6.2 as of 2026-09).
metadata:
    skill-author: AlterLab
    version: "1.0.1"
    last_updated: "2026-09-23"
---

# Pymoo - Multi-Objective Optimization in Python

## Overview

Pymoo is a comprehensive Python framework for optimization with emphasis on multi-objective problems. Solve single and multi-objective optimization using state-of-the-art algorithms (NSGA-II/III, MOEA/D), benchmark problems (ZDT, DTLZ), customizable genetic operators, and multi-criteria decision making methods. Excels at finding trade-off solutions (Pareto fronts) for problems with conflicting objectives.

## When to Use This Skill

This skill should be used when:
- Solving optimization problems with one or multiple objectives
- Finding Pareto-optimal solutions and analyzing trade-offs
- Implementing evolutionary algorithms (GA, DE, PSO, NSGA-II/III)
- Working with constrained optimization problems
- Benchmarking algorithms on standard test problems (ZDT, DTLZ, WFG)
- Customizing genetic operators (crossover, mutation, selection)
- Visualizing high-dimensional optimization results
- Making decisions from multiple competing solutions
- Handling binary, discrete, continuous, or mixed-variable problems

### Does NOT Trigger

| Scenario | Use Instead |
|----------|-------------|
| Simulating queues or shared resources over time (discrete-event simulation) | `alterlab-simpy` |
| Hyperparameter search for a machine-learning model (grid/random search, CV) | `alterlab-scikit-learn` |
| Closed-form optimum of a formula via derivatives or symbolic solving | `alterlab-sympy` |

## Core Concepts

### The Unified Interface

Pymoo uses a consistent `minimize()` function for all optimization tasks:

```python
from pymoo.optimize import minimize

result = minimize(
    problem,        # What to optimize
    algorithm,      # How to optimize
    termination,    # When to stop
    seed=1,
    verbose=True
)
```

**Result object contains:**
- `result.X`: Decision variables of optimal solution(s)
- `result.F`: Objective values of optimal solution(s)
- `result.G`: Constraint violations (if constrained)
- `result.algorithm`: Algorithm object with history

### Problem Types

**Single-objective:** One objective to minimize/maximize
**Multi-objective:** 2-3 conflicting objectives → Pareto front
**Many-objective:** 4+ objectives → High-dimensional Pareto front
**Constrained:** Objectives + inequality/equality constraints
**Dynamic:** Time-varying objectives or constraints

## Core Workflow

1. **Pick problem type** — single, multi (2-3 obj), many (4+ obj), or constrained.
2. **Define or select the problem** — built-in via `get_problem(...)`, or subclass `ElementwiseProblem` for custom (objectives in `out["F"]`, inequality constraints `g(x) <= 0` in `out["G"]`, equality `h(x) = 0` in `out["H"]`).
3. **Choose the algorithm** — NSGA-II for 2-3 objectives, NSGA-III (with reference directions) for 4+, GA/DE/PSO/CMA-ES for single-objective. See the selection tables in `references/quick_reference.md`.
4. **Set termination** — `('n_gen', N)`, `('n_evals', N)`, or tolerance-based `get_termination("moo", ftol=1e-3, n_max_gen=500)` (`"soo"` for single-objective; there is no `"f_tol"` key).
5. **Run** with `minimize(problem, algorithm, termination, seed=1, verbose=True)`.
6. **Inspect** `result.X` / `result.F` / `result.G` (or `result.CV` for constraint violation).
7. **Decide & visualize** — apply MCDM to pick a preferred Pareto solution, plot with `Scatter`/`PCP`/`Petal`.

Always set `seed` for reproducibility, normalize objectives when scales differ, and provide reference directions for NSGA-III.

## Routing — where to look

| You need… | Go to |
|-----------|-------|
| Complete copy-paste examples for all 7 workflows (single/multi/many-objective, custom problems, constraint handling, MCDM decision making, visualization) | `references/workflows.md` |
| Algorithm-selection tables, benchmark problem list, operator config, troubleshooting, best practices, install | `references/quick_reference.md` |
| Deep algorithm reference (parameters, usage, selection) | `references/algorithms.md` |
| Benchmark test problems (ZDT, DTLZ, WFG) with characteristics | `references/problems.md` |
| Genetic operators (sampling, selection, crossover, mutation) | `references/operators.md` |
| All visualization types with examples | `references/visualization.md` |
| Constraint handling + multi-criteria decision making | `references/constraints_mcdm.md` |

**Runnable scripts** (`scripts/`): `single_objective_example.py`, `multi_objective_example.py`, `many_objective_example.py`, `custom_problem_example.py`, `decision_making_example.py`. Run with `uv run python scripts/<name>.py`.

**Search references:** `grep -r "NSGA-II\|NSGA-III\|MOEA/D" references/` · `grep -r "Feasibility First\|Penalty\|Repair" references/` · `grep -r "Scatter\|PCP\|Petal" references/`

## Install

```bash
uv pip install pymoo
```

Dependencies (installed automatically): NumPy, SciPy, matplotlib, autograd, cma, moocore. Docs: https://pymoo.org/ — this skill targets pymoo 0.6.x (current 0.6.2, June 2026, which restored CMA-ES under NumPy 2).

Files in this package (14)
  • SKILL.md 6 KB
  • evals/evals.json 4 KB
  • references/algorithms.md 6 KB
  • references/constraints_mcdm.md 12 KB
  • references/operators.md 9 KB
  • references/problems.md 7 KB
  • references/quick_reference.md 5 KB
  • references/visualization.md 9 KB
  • references/workflows.md 8 KB
  • scripts/custom_problem_example.py 5 KB
  • scripts/decision_making_example.py 4 KB
  • scripts/many_objective_example.py 2 KB
  • scripts/multi_objective_example.py 2 KB
  • scripts/single_objective_example.py 2 KB

Versions

The database has no other skills named alterlab-pymoo.

Database snapshot: 13.11.2026 · package version f38323383403 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95multi-objective-optimization
    When the user wants to optimize two or more conflicting objectives and reason about Pareto trade-offs — Pareto dominance and efficient sets, exact front generation with weighted-sum and epsilon-constraint scalarizations in Gurobi, NSGA-II mechanics (fast non-dominated sorting,…
  • 100multi-objective-optimization
    When the user wants to optimize multiple conflicting objectives, find Pareto-optimal solutions, or balance trade-offs between cost, service, quality, and sustainability. Also use when the user mentions "multi-objective," "Pareto optimization," "NSGA-II," "trade-off analysis,"…
  • 95pareto-frontier-optimization
    Compute the Pareto frontier for multi-objective optimization. Use this skill whenever a task requires finding optimal trade-offs between conflicting metrics (e.g., maximize F1, minimize distance).
  • 100pareto-frontier
    Multi-objective optimization visualization for MCM/ICM competitions. Use when problems involve trade-offs (economic vs environmental, cost vs benefit, efficiency vs equity). Generates Pareto frontier plots showing non-dominated solution sets, demonstrating multiple optimal…
  • 100pareto-optimization
    Multi-objective optimization with Pareto frontiers. Use when optimizing multiple conflicting objectives simultaneously, finding trade-off solutions, or computing Pareto-optimal points.
  • 100pareto-optimization
    Multi-objective optimization with Pareto frontiers. Use when optimizing multiple conflicting objectives simultaneously, finding trade-off solutions, or computing Pareto-optimal points.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.