Skip to content
Back to skills

Problem Modeling

ASecurity

"Define, validate, and troubleshoot pymoo optimization problems,

  • 247 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 8, 2026
code-qualitygodebuggingapibackendperformance

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill problem-modeling --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Problem Modeling?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Problem Modeling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-problem-modeling/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-problem-modeling)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: problem-modeling
description: "Define, validate, and troubleshoot pymoo optimization problems,
  built-in test problems, constraints, bounds, and evaluation output shapes."
metadata:
  disco-role: operating
disable-model-invocation: true
license: Apache 2.0
---

# problem-modeling

Use this sub-skill when a task asks how to represent an optimization problem in
pymoo: built-in benchmark problems, custom vectorized or elementwise objectives,
functional objectives, bounds, constraint signs, equality constraints, Pareto
front/set methods, evaluation shape validation, or confusing `Problem` warnings.

## Route first

- Algorithm choice, `minimize`, termination, ask-and-tell, callbacks, and result
  interpretation belong to `optimization-workflows`.
- Mixed variables, sampling/crossover/mutation/repair, duplicate elimination,
  initialization, and custom operators belong to `operators-and-variables`.
- Vectorization vs parallel runners and optional joblib/dask/ray backends belong
  to `performance-and-parallelization`.
- Indicators, reference directions, decomposition, MCDM, convergence, and plots
  belong to `analysis-and-visualization`.
- Stay here for problem metadata, `_evaluate` contracts, objective/constraint
  sign conventions, built-in `get_problem`, and validation of `F`/`G`/`H`.

## Fast operating checklist

1. **Convert the math to pymoo conventions**: every objective is minimized.
   Negate objectives that the source problem describes as maximized. Inequality
   constraints belong in `out["G"]` and are feasible when `G <= 0`; equality
   constraints belong in `out["H"]` and should be near zero.
2. **Pick the problem style**: use vectorized `Problem` for matrix-friendly
   NumPy/SciPy objectives; use `ElementwiseProblem` for one-candidate black-box
   calls; use `FunctionalProblem` for concise objective/constraint functions.
3. **Set metadata in `__init__`**: `n_var`, `n_obj`, `n_ieq_constr`,
   `n_eq_constr`, `xl`, `xu`, and optional `vtype`/`vars` must match the search
   space and outputs.
4. **Return stable shapes**: for vectorized multi-objective outputs, make
   `out["F"]` a 2-D matrix with one row per candidate and one column per
   objective. For constraints, align rows with `F`.
5. **Validate before optimizing**: call `problem.evaluate(...)` on tiny sample
   inputs, request `F`, `G`, and `H`, assert finite values, and inspect signs.
6. **Use built-in problems for smoke tests**: `get_problem("zdt1")`,
   `get_problem("dtlz2", n_obj=3)`, `Sphere(n_var=...)`, and constrained
   families are useful baselines before debugging custom code.
7. **Treat deprecated `n_constr` carefully**: this version maps it to
   `n_ieq_constr` with a warning; new problem code should use `n_ieq_constr`
   and `n_eq_constr` explicitly.

## Open the bundled references

- [API reference](references/api-reference.md): signatures and output contracts
  for `Problem`, `ElementwiseProblem`, `FunctionalProblem`, `get_problem`, and
  `evaluate`.
- [Problem definition workflows](references/problem-definition-workflows.md):
  built-in problems, vectorized/elementwise/functional definitions, constraints,
  Pareto fronts, bounds, and validation recipes.
- [Troubleshooting](references/troubleshooting.md): fixes for wrong constraint
  sign, objective maximization, shape errors, bounds warnings, NaNs, deprecated
  arguments, and missing Pareto fronts.

## Bundled script

- [scripts/validate_problem_shapes.py](scripts/validate_problem_shapes.py): safe
  CPU-only assertions for a vectorized constrained problem and an elementwise
  constrained problem.

Files in this skill

  • SKILL.md3.5 KB
  • references/api-reference.md6.4 KB
  • references/problem-definition-workflows.md5.5 KB
  • references/troubleshooting.md4.2 KB
  • scripts/validate_problem_shapes.py3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.