Skip to main content

ConstructionForager

Trait ConstructionForager 

Source
pub trait ConstructionForager<S, M>: Send + Debug
where S: PlanningSolution, M: Move<S>,
{ // Required method fn pick_move_index<D: Director<S>>( &self, placement: &Placement<S, M>, score_director: &mut D, ) -> ConstructionChoice; // Provided method fn select_move_index<D, BestCb>( &self, placement: &Placement<S, M>, _construction_obligation: ConstructionObligation, step_scope: &mut StepScope<'_, '_, '_, S, D, BestCb>, ) -> Option<ConstructionChoice> where D: Director<S>, BestCb: ProgressCallback<S> { ... } }
Expand description

Trait for selecting a move during construction.

Foragers evaluate candidate moves and pick one based on their strategy.

§Type Parameters

  • S - The planning solution type
  • M - The move type

Required Methods§

Source

fn pick_move_index<D: Director<S>>( &self, placement: &Placement<S, M>, score_director: &mut D, ) -> ConstructionChoice

Provided Methods§

Source

fn select_move_index<D, BestCb>( &self, placement: &Placement<S, M>, _construction_obligation: ConstructionObligation, step_scope: &mut StepScope<'_, '_, '_, S, D, BestCb>, ) -> Option<ConstructionChoice>
where D: Director<S>, BestCb: ProgressCallback<S>,

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<S, M> ConstructionForager<S, M> for BestFitForager<S, M>
where S: PlanningSolution, M: Move<S>,

Source§

impl<S, M> ConstructionForager<S, M> for FirstFeasibleForager<S, M>
where S: PlanningSolution, M: Move<S>,

Source§

impl<S, M> ConstructionForager<S, M> for FirstFitForager<S, M>
where S: PlanningSolution, M: Move<S>,

Source§

impl<S, M> ConstructionForager<S, M> for StrongestFitForager<S, M>
where S: PlanningSolution, S::Score: Score, M: Move<S>,

Source§

impl<S, M> ConstructionForager<S, M> for WeakestFitForager<S, M>
where S: PlanningSolution, S::Score: Score, M: Move<S>,