Skip to content

feat(rvea): the authors' PlatEMO/jMetal reading of the survival as variant "platemo" (A10) - #367

Merged
NicolasRodriguezUribe merged 7 commits into
mainfrom
feat/rvea-platemo-variant
Nov 19, 2026
Merged

NicolasRodriguezUribe merged 7 commits into
mainfrom
feat/rvea-platemo-variant

Conversation

@NicolasRodriguezUribe

@NicolasRodriguezUribe NicolasRodriguezUribe commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Builds on #365 (feat/reference-vector-files), which builds on #361: this branch starts from their commits, because RVEAConfig's new field must follow #365's reference_vectors. Review the last commit.

Problem

Item A10 of the VAMOS-Studio change requests (Part 2, information from a calibration study). VAMOS's RVEA follows pymoo's reading of the survival, not the authors' code in PlatEMO nor jMetal:

VAMOS 1.4.0 and pymoo PlatEMO (RVEA/EnvironmentalSelection.m, ReferenceVectorAdaptation.m) and jMetal (RVEAEnvironmentalSelection)
M in the angle penalty M (t / t_max)^alpha theta / gamma 1 with two objectives, else the number of objectives the number of objectives, two included
Translation of the objectives by the ideal point accumulated across generations by the minimum of the current candidates (PopObj - min(PopObj); jMetal's RVEAGeometry.translate)
Vector adaptation V0 * (nadir - accumulated ideal) V0 * (max - min) of the population after selection (jMetal: ranges(translate(survivors)))

With two objectives VAMOS's penalty is therefore half the published one.

Change

RVEAConfig.variant (new last field, and builder method variant(...)): "pymoo", the default, runs exactly what VAMOS ran (results checked bitwise against the parent branch on ZDT1, DTLZ2 and C1-DTLZ1), and "platemo" runs the authors' reading in the three rows above. Both keep VAMOS's progress t / t_max in generations, its feasibility-first constrained survival and its parent selection, so "platemo" reproduces PlatEMO's selection on unconstrained problems; PlatEMO measures progress in evaluations and picks the least violated solution per vector under constraints, which this PR does not change. to_dict() leaves out the default, so existing configurations keep their resolved specs and task ids. survival.angle_penalized_distances factors out the penalty so that it can be tested.

The name: variant, as AGEMOEAConfig.variant ("agemoea"/"agemoea_ii") names a reading of the same algorithm; the values name the code each reading follows. The default stays pymoo's, as asked: changing it would change every RVEA result.

Docs, with Development after 1.4.0:: the RVEAConfig docstring and builder method, the RVEA tutorial, the RVEA configuration reference, and "Where the variants depart from their references" in the algorithms reference.

Sources

  • PlatEMO, BIMK/PlatEMO on GitHub, PlatEMO/Algorithms/Multi-objective optimization/RVEA/: EnvironmentalSelection.m (PopObj - repmat(min(PopObj,[],1),N,1), APD = (1+M*theta*Angle/gamma).*norm), RVEA.m (theta = (FE/maxFE)^alpha, adaptation every fr), ReferenceVectorAdaptation.m (V .* (max(PopObj) - min(PopObj))).
  • jMetal (C:/tmp/jmetal-pr, local/integration 9b6734c12): jmetal-component/.../replacement/impl/rvea/RVEAEnvironmentalSelection.java (numberOfObjectives * progress * angle / gamma, adaptReferenceVectors with ranges(translate(survivors))) and RVEAGeometry.java.

Tests

tests/engine/test_rvea_variant.py (new):

  • With two objectives the penalty equals 2 (t / t_max)^alpha theta / gamma with "platemo" and 1 (t / t_max)^alpha theta / gamma with "pymoo"; with three objectives both use M = 3.
  • "platemo" translates by the candidates' minimum (its survivors are those of the smallest APD per niche from that origin), "pymoo" by the accumulated ideal, and both return the accumulated ideal.
  • The default is "pymoo", leaves to_dict() unchanged, and gives the same results as an explicit "pymoo"; "platemo" runs the exact budget and gives other results.
  • An unknown variant raises ConfigurationError; the builder, to_dict/from_dict and exact replay (save_result, verify_run, reproduce) handle "platemo".
  • test_constraint_handling_follows_the_fields_of_1_0 lists variant after reference_vectors.

Compatibility

Additive: the default is unchanged, bitwise, and so are the serialized configuration and resolved spec of every configuration that does not set variant.

Validation

All on Windows 11, Python 3.12, with PYTHONPATH set to the worktree's src (checked with vamos.__file__).

Command Result
pytest -q -n 4 tests/engine/test_rvea_variant.py tests/engine/test_agemoea_rvea_constraints.py tests/engine/test_agemoea_rvea_ask_tell.py tests/engine/test_rvea_partitions.py tests/engine/test_reference_vector_sources.py tests/engine/test_constraint_handling_algorithms.py 240 passed (after updating the field list of the last one)
Default RVEA on ZDT1, DTLZ2 and C1-DTLZ1 (3000 evaluations, seed 5) against the parent branch identical F, bitwise
ruff check and ruff format --check on the changed Python passed
python tools/typecheck.py --scope strict / --scope full 0 diagnostics / 0 diagnostics, ratchet new=0, increased=0
python -m compileall on the changed Python; git diff --check passed
python tools/check_agent_docs.py passed
pytest -m "not slow" -n 4 -p no:cacheprovider -rfE 10967 passed, 253 skipped, 9 xfailed, 1 failed: the known tests/experiment/test_cli_ablation.py::test_cli_ablation_runs_and_writes_variants, which fails under xdist on Windows on untouched main too and passes alone
python tools/health.py all health checks passed
mkdocs build --strict built, no warnings

Update after review

This branch is rebased on #365 after its review fixes.

Validation of the rebased branch:

  • pytest -m "not slow" -n 4: 10977 passed, 2 failed. One is the known test_cli_ablation_runs_and_writes_variants. The other is tests/docs/test_site_polish.py::test_nested_404_keeps_theme_resources_on_the_preview_origin[/docs/1.0.1/], which hit a MemoryError while copying files; its file passes alone, 12 passed.
  • tools/health.py: passed. mkdocs build --strict: no warnings.
  • Strict and full typecheck: 0 diagnostics, no ratchet increase.
  • check_agent_docs: passed.

Changelog entry

Added

  • RVEA's variant: "platemo" runs the authors' reading of the survival, that of PlatEMO's RVEA/EnvironmentalSelection.m and of jMetal (M equal to the number of objectives in the angle penalty also with two objectives, translation by each generation's minimum, vector adaptation to the population's range); the default "pymoo" keeps VAMOS's results.

🤖 Generated with Claude Code

…, with two-layer lattices

MOEA/D's weight_vectors, NSGA-III's reference_directions and RVEA's new
reference_vectors (the last field, default None) take the same input, as jMetal
and Evolver configure the three from the same weight files: a file with
whitespace or commas, or a directory with jMetal's W<m>D_<n>.dat names (new
for NSGA-III and RVEA); divisions, the complete Das-Dennis lattice (for RVEA the
lattice of n_partitions); and, new, inner_divisions with divisions, Deb and
Jain's two-layer lattice, the inside layer shrunk by half towards the centre
as in pymoo and PlatEMO (156 vectors with eight objectives, 3 and 2
divisions). All go through load_or_generate_weight_vectors, and vector_source
checks the options when a configuration is built.

The vectors are the population: RVEA runs 100 individuals with three
objectives from W3D_100.dat. A path that does not exist raises
ConfigurationError for all three (MOEA/D created it as a directory); a
directory without the file raises for NSGA-III and RVEA, while MOEA/D keeps
saving the lattice in an existing directory.

to_dict() leaves out reference_vectors while it is None and inner_divisions
while unset, so configurations without them keep their 1.4.0 resolved specs
and task ids. The resolved spec records MOEA/D's two-layer lattice and the
file of NSGA-III and RVEA (lattices are already in their configuration).
RVEA's command-line block takes reference_vectors; study planning rejects
its path, as NSGA-III's, checks two-layer counts, and moves these checks to
study/reference_planning.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… vectors

vamos.algorithms.moead_populations(n_obj, *, max_pop_size=1000) returns the
populations MOEA/D runs without weight options, as MOEADConfig.default and
optimize build them: every size from 2 with one or two objectives, and with
more the complete Das-Dennis lattices and the packaged jMetal files (100 with
three or four objectives, 156 with eight). Other sizes need a file or a
two-layer lattice, which the docstring and the MOEA/D reference explain.

The tests run MOEA/D for 4 to 20 objectives with the populations it lists, and
with a 10-objective two-layer lattice that no single lattice has. The public
API snapshot is regenerated with tools/update_public_api_snapshot.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

VAMOS documentation preview

https://pr-367-vamos-docs-preview.vamos-optimization.workers.dev

Built from cdde42f. Canonical metadata points to the production .org domain; the preview itself remains isolated.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f72e6a440

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/vamos/engine/algorithm/rvea/rvea.py Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T00:29:03.841707Z 9f72e6a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…ions

Settings such as two objectives with divisions=4 and inner_divisions=2 gave
eight vectors but five directions: the three inside directions lie on the
boundary lattice. RVEA accepted them as an eight-vector population, although a
repeated niche never gets its own survivor and its zero angle to the nearest
vector is clamped to 1e-64 in the penalty. two_layer_shared counts the shared
directions exactly on the grid of both layers; two_layer_lattice raises
ValueError, and MOEA/D, NSGA-III and RVEA raise ConfigurationError, for any
overlap; study planning rejects it as INVALID_REFERENCE_DIRECTIONS. With
inner_divisions < n_obj and divisions < 2 n_obj the layers never overlap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ther vectors

A path in MOEA/D's weight_vectors, NSGA-III's reference_directions or RVEA's
reference_vectors was replayed with whatever the file held when replay ran,
while the resolved spec recorded only its name: a file replaced by other valid
vectors of the same shape still verified as exact and reproduce() ran another
experiment. MOEA/D's and NSGA-III's files had this gap on main too. The record
of NSGA-III's and RVEA's files was also rebuilt with os.path.isfile, so a run
whose file was moved, or verified on another machine, no longer matched it.

When a run starts (optimize, the command-line builders, build_algorithm with a
configuration, and study planning for MOEA/D), bind_config_vector_files
resolves the path to the file the run reads (a directory becomes its
W<m>D_<n>.dat) and records sha256, the digest of its vectors' shape and float64
values, in the resolved configuration. The run checks the digest before any
evaluation, so replay refuses a changed file. The file records are rebuilt
from the stored configuration alone; a MOEA/D record with sha256 is das_dennis
when the digest is that of the lattice. A MOEA/D directory without the file,
whose run generates the lattice, stays unbound, and runs stored without a
digest keep their 1.4.0 description. The helpers move to
components/vector_files.py, as weight_vectors.py reached its size budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…platemo"

VAMOS's RVEA follows pymoo: with two objectives the angle penalty uses M = 1,
half of the published M (t/t_max)^alpha theta/gamma, the objectives are
translated by the ideal point accumulated across generations, and the vectors
adapt to the nadir point minus that ideal. RVEAConfig.variant (new last field
and builder method) keeps this as "pymoo", the default, whose results are
unchanged bitwise, and adds "platemo": the code of PlatEMO's
RVEA/EnvironmentalSelection.m and ReferenceVectorAdaptation.m, which jMetal's
RVEAEnvironmentalSelection follows, with M equal to the number of objectives,
translation by the minimum of each generation's candidates and adaptation to
the population's range. to_dict() leaves out the default.

angle_penalized_distances factors out the penalty, which the tests check
against 2 (t/t_max)^alpha theta/gamma with two objectives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NSGAIIIConfig.__post_init__ keeps both checks: the reference-direction source
of this branch and the selection of #364.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #365's merge of main (NSGA-III selection of #364 and the other pull
requests since), so this branch no longer conflicts with main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NicolasRodriguezUribe
NicolasRodriguezUribe added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 460f13e Nov 19, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant