pub struct StochasticRanking {
pub p_f: f64,
/* private fields */
}Expand description
Stochastic ranking for constrained evolutionary optimization.
A bubble-sort-based ranking that probabilistically compares solutions.
With probability p_f, feasible-feasible comparisons are based on
the objective; with probability 1 - p_f, the violation is used.
Infeasible-infeasible comparisons always use the violation.
This balances exploration of infeasible regions (large p_f → more weight
on objectives even for infeasible solutions) against driving toward
feasibility (small p_f). p_f = 0.45 is a commonly recommended value.
§References
Runarsson, T.P. & Yao, X. (2000). Stochastic ranking for constrained evolutionary optimization. IEEE Transactions on Evolutionary Computation, 4(3), 284–294.
Fields§
§p_f: f64Probability of using objective comparison between feasible-feasible pairs.
Implementations§
Source§impl StochasticRanking
impl StochasticRanking
Sourcepub fn new(p_f: f64, seed: u64) -> OptimizeResult<Self>
pub fn new(p_f: f64, seed: u64) -> OptimizeResult<Self>
Create a new stochastic ranking instance.
§Arguments
p_f— Probability of objective-based comparison for feasible pairs. Typical range: 0.3–0.5.seed— RNG seed.
Sourcepub fn rank(
&self,
objectives: &[f64],
violations: &[ViolationSummary],
n_passes: usize,
) -> OptimizeResult<Vec<usize>>
pub fn rank( &self, objectives: &[f64], violations: &[ViolationSummary], n_passes: usize, ) -> OptimizeResult<Vec<usize>>
Trait Implementations§
Source§impl Clone for StochasticRanking
impl Clone for StochasticRanking
Source§fn clone(&self) -> StochasticRanking
fn clone(&self) -> StochasticRanking
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for StochasticRanking
impl RefUnwindSafe for StochasticRanking
impl Send for StochasticRanking
impl Sync for StochasticRanking
impl Unpin for StochasticRanking
impl UnsafeUnpin for StochasticRanking
impl UnwindSafe for StochasticRanking
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
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.