Skip to main content

CustomSearchPhase

Trait CustomSearchPhase 

Source
pub trait CustomSearchPhase<S>: Debug + Send{
    // Required method
    fn solve<D, ProgressCb>(
        &mut self,
        solver_scope: &mut SolverScope<'_, S, D, ProgressCb>,
    )
       where D: Director<S>,
             ProgressCb: ProgressCallback<S>;

    // Provided methods
    fn on_solver_terminal<D, ProgressCb>(
        &mut self,
        _solver_scope: &mut SolverScope<'_, S, D, ProgressCb>,
    )
       where D: Director<S>,
             ProgressCb: ProgressCallback<S> { ... }
    fn phase_type_name(&self) -> &'static str { ... }
}

Required Methods§

Source

fn solve<D, ProgressCb>( &mut self, solver_scope: &mut SolverScope<'_, S, D, ProgressCb>, )
where D: Director<S>, ProgressCb: ProgressCallback<S>,

Provided Methods§

Source

fn on_solver_terminal<D, ProgressCb>( &mut self, _solver_scope: &mut SolverScope<'_, S, D, ProgressCb>, )
where D: Director<S>, ProgressCb: ProgressCallback<S>,

Runs once at the enclosing solver’s terminal boundary.

This mirrors Phase::on_solver_terminal for custom phases. The configured runtime dispatches it after instantiating the registered extension; implementations remain CustomSearchPhase rather than directly implementing Phase.

Source

fn phase_type_name(&self) -> &'static str

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<S, M, Source, A, Fo> CustomSearchPhase<S> for LocalSearchPhase<S, M, Source, A, Fo>
where S: PlanningSolution, M: Move<S>, Source: MoveCursorSource<S, M> + Debug + Send, A: Acceptor<S> + Debug, Fo: LocalSearchForager<S, M> + Debug,

Source§

impl<S, PD, Part, SDF, PF, CP> CustomSearchPhase<S> for PartitionedSearchPhase<S, PD, Part, SDF, PF, CP>
where S: PlanningSolution + 'static, PD: Director<S> + 'static, Part: SolutionPartitioner<S>, SDF: Fn(S) -> PD + Send + Sync, PF: Fn() -> CP + Send + Sync, CP: ChildPhases<S, PD> + Send,

Source§

impl<S> CustomSearchPhase<S> for NoRuntimeExtensionPhase