Skip to main content

constrained_dominates

Function constrained_dominates 

pub fn constrained_dominates(
    a: Point<'_>,
    b: Point<'_>,
    directions: &[Direction],
) -> bool
Expand description

Feasibility-first dominance (Deb 2000), the relation a constrained multi-objective study ranks by.

a constrained-dominates b iff any of:

  1. a is feasible and b is not;
  2. both are infeasible and a’s total violation is strictly smaller;
  3. both are feasible and a dominates b.

A constraint value is satisfied at ≤ 0 and violated above it (is_feasible, total_violation); a NaN constraint counts as infinitely violated, so it can never look satisfied.

Objective comparability is checked before any constraint branch. A NaN or wrong-arity objective therefore never wins by being feasible or by having a smaller violation. If both points declare constraint vectors with different widths, neither direction is comparable: this pure relation has no study schema from which to infer what a missing dimension means.

§A solution that declared no constraints

In a study where constraints are in play, a solution that recorded none is dominated by every solution that recorded some — even an infeasible one — and dominates nothing. This is Optuna’s rule, and it is the safe one: a trial that never reported its constraints has not been shown to satisfy them, and treating silence as feasibility would let an unchecked configuration win the front. When neither side declared constraints (the ordinary unconstrained study) the relation is exactly dominates, so nothing changes for a study that never uses the feature.

use atune_core::pareto::{Point, constrained_dominates};
use atune_core::study::Direction::Minimize;

let dirs = [Minimize];
let feasible = Point::new(&[10.0], &[-1.0]);    // bad objective, satisfied
let infeasible = Point::new(&[0.0], &[3.0]);    // great objective, violated
assert!(constrained_dominates(feasible, infeasible, &dirs));
assert!(!constrained_dominates(infeasible, feasible, &dirs));

// Two infeasible solutions compare by how badly they violate.
let less_bad = Point::new(&[9.0], &[1.0]);
assert!(constrained_dominates(less_bad, infeasible, &dirs));