Skip to main content

Zdt1

Struct Zdt1 

Source
pub struct Zdt1 { /* private fields */ }
Expand description

ZDT1 (Zitzler, Deb & Thiele 2000): a two-objective benchmark with a known, convex Pareto front. On [0, 1]^n,

f1 = x1
g  = 1 + 9 · (Σ_{i≥2} xi) / (n − 1)
f2 = g · (1 − √(f1 / g))

The Pareto-optimal set has x2 … xn = 0 (so g = 1), giving the analytical front f2 = 1 − √f1 for f1 ∈ [0, 1] — the ground truth the NSGA-II test measures distance to.

Implementations§

Source§

impl Zdt1

Source

pub fn new(dim: usize) -> Self

dim-dimensional ZDT1 (dim >= 2) on [0, 1]^dim.

Source

pub fn front_f2(f1: f64) -> f64

The analytical Pareto front value f2 = 1 − √f1 for a given f1.

Trait Implementations§

Source§

impl MultiProblem for Zdt1

Source§

fn dim(&self) -> usize

Number of decision variables.
Source§

fn bounds(&self) -> &[Bound]

Per-variable inclusive bounds, length MultiProblem::dim.
Source§

fn n_objectives(&self) -> usize

Number of objectives (≥ 2 for a genuine multi-objective problem).
Source§

fn objectives(&self, x: &[f64]) -> Vec<f64>

The objective vector to minimize, length MultiProblem::n_objectives.

Auto Trait Implementations§

§

impl Freeze for Zdt1

§

impl RefUnwindSafe for Zdt1

§

impl Send for Zdt1

§

impl Sync for Zdt1

§

impl Unpin for Zdt1

§

impl UnsafeUnpin for Zdt1

§

impl UnwindSafe for Zdt1

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.