Theme: production lifecycle. heuropt becomes deployable for long-
running, real-world workloads. No breaking changes — Optimizer trait
gains a default-impl run_with method that falls back to run.
Adds:
- src/observer/ module: Snapshot, Observer trait, ControlFlow, plus
built-in MaxTime / MaxIterations / TargetFitness / Stagnation /
Periodic / AnyOf / AllOf and a closure impl.
- Optimizer::run_with(problem, observer): default-impl on the trait,
overridden for full per-gen visibility on Nsga2, RandomSearch, and
DifferentialEvolution. Other algorithms inherit a final-only
notification — full per-gen support follows incrementally.
- New 'tracing' optional feature plus TracingObserver that emits
structured debug! events per generation.
- src/metrics/igd.rs: IGD + IGD+ performance indicators against a
reference set.
- src/metrics/r2.rs: R2 indicator using the weighted Tchebycheff
utility; pair with das_dennis for the canonical weight set.
- examples/constrained.rs: BNH constrained 2-objective problem
solved with NSGA-II + observer composition (MaxTime.or(Periodic)).
Bumps Cargo.toml to 0.6.0; CHANGELOG entry consolidates the above.
Existing 247 unit + 38 doctest + 32 algorithm-property + property /
metric / numerical-stability tests all pass; bit-identical compare
output verified post-DE refactor.
Exact 2D dominated hypervolume against a fixed reference point. Sorts
points by the first minimization-oriented objective ascending, then
sweeps and accumulates the dominated rectangle area against the
reference. Points that don't strictly dominate the reference are
ignored. Panics with a clear message if the objective space does not
have exactly two objectives (spec §14.2).
Tests cover a known-area front, the no-coverage case, and the panic on
non-2D problems.
Standard Schott spacing: for each front point compute the Manhattan
distance to its nearest neighbor on minimization-oriented objective
values; the spacing metric is the population standard deviation of
those nearest-neighbor distances.
Returns 0.0 for empty or single-point fronts (spec §14.1).