def nn_obj

unified-nsga-iii@0.2.2.0 · problems.bend:362

import unified-nsga-iii@0.2.2.0/problems.bend as Problems
import Base

362# F32 cos(π/2) is -4.371139e-8, not 0. The DTLZ2 map multiplies that
363# factor by (1+g). DTLZ3's g stays large on local fronts, so an in-bound
364# x=1 (SBX / polynomial mutation clamp to the box) gets a strictly
365# negative objective. Every feasible point has f≥0, so nothing dominates
366# that row. It stays on the ND front and pins an ASF extreme at (1+g).
367# DTLZ2's (1+g) is ~1, so the same raw trig is left alone (published
368# fronts). Clamp only this map back to the mathematical range f≥0.
369def nn_obj(+v: F32) -> F32:
370  Bool.pick(F32, F32.is_lt(v, 0.0), 0.0, v)

Uses (3)

Used by (1)