Skip to main content

MultiProblem

Trait MultiProblem 

Source
pub trait MultiProblem {
    // Required methods
    fn dim(&self) -> usize;
    fn bounds(&self) -> &[Bound] ;
    fn n_objectives(&self) -> usize;
    fn objectives(&self, x: &[f64]) -> Vec<f64>;
}
Expand description

A box-constrained, real-valued multi-objective minimization problem.

All objectives are minimized (negate any to be maximized). The multi-objective optimizers (NsgaII, NsgaIII, SmsEmoa) return a Pareto front rather than a single solution. As with Problem, a non-finite objective value marks a point as infeasible — it is dominated by every feasible point.

Required Methods§

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§