Skip to content

Fix NOMAD lower constraint bounds - #1418

Open
lowgame wants to merge 1 commit into
SciML:masterfrom
lowgame:fix-nomad-lower-constraints-393646e
Open

lowgame wants to merge 1 commit into
SciML:masterfrom
lowgame:fix-nomad-lower-constraints-393646e

Conversation

@lowgame

@lowgame lowgame commented Oct 11, 2026

Copy link
Copy Markdown

Summary

OptimizationNOMAD translated every nonlinear constraint as c(x) - ucons <= 0, so lower bounds were not passed to NOMAD. A lower-only constraint such as 1 <= x became x - Inf <= 0 and therefore accepted every finite value.

This change represents each interval constraint as:

max(lcons - c(x), c(x) - ucons) <= 0

That enforces both sides while preserving upper-only constraints and reducing equality constraints to an absolute residual.

Reproduction

The added regression minimizes x^2 with 1 <= x. Before the production change, NOMAD returned x = -0.0007, and the new assertion failed (4 passed, 1 failed). With the fix, it returns a value at the lower boundary and all Core tests pass.

Tests

  • OPTIMIZATION_TEST_GROUP=Core julia --project=lib/OptimizationNOMAD -e 'using Pkg; Pkg.test()' — 5 passed
  • OPTIMIZATION_TEST_GROUP=QA julia --project=lib/OptimizationNOMAD -e 'using Pkg; Pkg.test()' — 17 passed, 2 broken
  • julia -e 'using Runic; exit(Runic.main(["--check", "lib/OptimizationNOMAD/src/OptimizationNOMAD.jl", "lib/OptimizationNOMAD/test/core_tests.jl"]))' — passed
  • git diff --check — passed

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.

1 participant