pub struct MultiObjectiveSolution {
pub variables: Array1<f32>,
pub objectives: Vec<f32>,
pub violations: Vec<f32>,
pub total_violation: f32,
pub rank: usize,
pub crowding_distance: f32,
}Expand description
Multi-objective solution point
Fields§
§variables: Array1<f32>Decision variables
objectives: Vec<f32>Objective values (one per objective)
violations: Vec<f32>Constraint violations
total_violation: f32Total constraint violation
rank: usizePareto rank (0 = non-dominated front)
crowding_distance: f32Crowding distance (for diversity)
Implementations§
Source§impl MultiObjectiveSolution
impl MultiObjectiveSolution
Sourcepub fn dominates(&self, other: &Self, minimize: &[bool]) -> bool
pub fn dominates(&self, other: &Self, minimize: &[bool]) -> bool
Check if this solution dominates another
Solution A dominates B if:
- A is feasible and B is not, OR
- Both are feasible, A is no worse in all objectives, and better in at least one
Sourcepub fn is_feasible(&self) -> bool
pub fn is_feasible(&self) -> bool
Check if solution is feasible
Sourcepub fn objective_distance(&self, other: &Self) -> f32
pub fn objective_distance(&self, other: &Self) -> f32
Compute Euclidean distance in objective space
Trait Implementations§
Source§impl Clone for MultiObjectiveSolution
impl Clone for MultiObjectiveSolution
Source§fn clone(&self) -> MultiObjectiveSolution
fn clone(&self) -> MultiObjectiveSolution
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MultiObjectiveSolution
impl RefUnwindSafe for MultiObjectiveSolution
impl Send for MultiObjectiveSolution
impl Sync for MultiObjectiveSolution
impl Unpin for MultiObjectiveSolution
impl UnwindSafe for MultiObjectiveSolution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more