Skip to content

fix(como_cmaes): reject constrained problems instead of ignoring constraints - #810

Open
sean-from-japan wants to merge 1 commit into
anyoptimization:mainfrom
sean-from-japan:fix/como-cmaes-reject-constraints
Open

sean-from-japan wants to merge 1 commit into
anyoptimization:mainfrom
sean-from-japan:fix/como-cmaes-reject-constraints

Conversation

@sean-from-japan

Copy link
Copy Markdown

Fixes #809

Changes

  • COMOCMAES._setup now raises a ValueError for constrained problems, next to the existing bi-objective check. This follows MOEAD, DNSGA2 and KGB, which reject constrained problems the same way.
  • The class docstring now says that only unconstrained bi-objective problems are supported.
  • Added test_como_cmaes_rejects_constrained_problems.

Testing

  • pytest tests/algorithms/test_como_cmaes.py tests/algorithms/test_mocmaes.py: 8 passed.
  • The new test fails on main, where the constraints are silently ignored, and passes with this change.
  • This change adds no new ruff check or ruff format --check findings.

…traints

comocma is only told F, so G/H were silently ignored and every returned
solution was reported with CV = 0 (e.g. all solutions infeasible on TNK and
OSY). Raise a ValueError in _setup, like MOEAD, DNSGA2 and KGB do, and add a
regression test.

This branch has not been deployed

No deployments
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.

[BUG] COMOCMAES ignores constraints and reports infeasible solutions with CV = 0

1 participant