pub enum PhaseConfig {
ConstructionHeuristic {
construction_type: ConstructionType,
},
LocalSearch {
search_type: LocalSearchType,
step_limit: Option<u64>,
},
}Expand description
Configuration for a phase.
This enum represents the configuration for different types of solver phases. Use this with the builder to configure your solving strategy.
§Examples
use solverforge_solver::manager::{PhaseConfig, ConstructionType, LocalSearchType};
// Construction phase configuration
let construction = PhaseConfig::ConstructionHeuristic {
construction_type: ConstructionType::BestFit,
};
// Local search phase with step limit
let local_search = PhaseConfig::LocalSearch {
search_type: LocalSearchType::TabuSearch { tabu_size: 7 },
step_limit: Some(1000),
};Variants§
ConstructionHeuristic
Construction heuristic phase.
Builds an initial solution by assigning values to uninitialized planning variables.
§Example
use solverforge_solver::manager::{PhaseConfig, ConstructionType};
let config = PhaseConfig::ConstructionHeuristic {
construction_type: ConstructionType::FirstFit,
};Fields
§
construction_type: ConstructionTypeType of construction.
LocalSearch
Local search phase.
Improves an existing solution by exploring neighboring solutions.
§Example
use solverforge_solver::manager::{PhaseConfig, LocalSearchType};
let config = PhaseConfig::LocalSearch {
search_type: LocalSearchType::HillClimbing,
step_limit: Some(500),
};Fields
§
search_type: LocalSearchTypeType of local search.
Trait Implementations§
Source§impl Clone for PhaseConfig
impl Clone for PhaseConfig
Source§fn clone(&self) -> PhaseConfig
fn clone(&self) -> PhaseConfig
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 PhaseConfig
impl RefUnwindSafe for PhaseConfig
impl Send for PhaseConfig
impl Sync for PhaseConfig
impl Unpin for PhaseConfig
impl UnwindSafe for PhaseConfig
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