pub enum ConstructionType {
FirstFit,
BestFit,
}Expand description
Type of construction heuristic to use.
Construction heuristics build an initial solution by assigning values to uninitialized planning variables. The type determines how values are selected:
§Examples
use solverforge_solver::manager::ConstructionType;
// First fit - faster but may produce lower quality initial solution
let fast = ConstructionType::FirstFit;
assert_eq!(fast, ConstructionType::default());
// Best fit - slower but produces better initial solution
let best = ConstructionType::BestFit;Variants§
FirstFit
First fit: accept first valid assignment.
Assigns the first value that produces a feasible solution. Fast but may not produce an optimal initial solution.
§Example
use solverforge_solver::manager::ConstructionType;
let construction = ConstructionType::FirstFit;BestFit
Best fit: evaluate all options, pick best score.
Evaluates all possible values and selects the one that produces the best score. Slower but produces a higher quality initial solution.
§Example
use solverforge_solver::manager::ConstructionType;
let construction = ConstructionType::BestFit;Trait Implementations§
Source§impl Clone for ConstructionType
impl Clone for ConstructionType
Source§fn clone(&self) -> ConstructionType
fn clone(&self) -> ConstructionType
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 moreSource§impl Debug for ConstructionType
impl Debug for ConstructionType
Source§impl Default for ConstructionType
impl Default for ConstructionType
Source§fn default() -> ConstructionType
fn default() -> ConstructionType
Returns the “default value” for a type. Read more
Source§impl PartialEq for ConstructionType
impl PartialEq for ConstructionType
impl Copy for ConstructionType
impl Eq for ConstructionType
impl StructuralPartialEq for ConstructionType
Auto Trait Implementations§
impl Freeze for ConstructionType
impl RefUnwindSafe for ConstructionType
impl Send for ConstructionType
impl Sync for ConstructionType
impl Unpin for ConstructionType
impl UnwindSafe for ConstructionType
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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