pub trait MaybeTermination<S: PlanningSolution, D: ScoreDirector<S>>: Send {
// Required method
fn should_terminate(&self, solver_scope: &SolverScope<'_, S, D>) -> bool;
// Provided method
fn install_inphase_limits(&self, _solver_scope: &mut SolverScope<'_, S, D>) { ... }
}Expand description
Marker trait for termination types that can be used in Solver.
Required Methods§
Sourcefn should_terminate(&self, solver_scope: &SolverScope<'_, S, D>) -> bool
fn should_terminate(&self, solver_scope: &SolverScope<'_, S, D>) -> bool
Checks if the solver should terminate.
Provided Methods§
Sourcefn install_inphase_limits(&self, _solver_scope: &mut SolverScope<'_, S, D>)
fn install_inphase_limits(&self, _solver_scope: &mut SolverScope<'_, S, D>)
Installs in-phase termination limits on the solver scope.
This allows Termination conditions (step count, move count, etc.) to fire
inside the phase step loop, not only between phases (T1 fix).
The default implementation is a no-op. Override for terminations that express a concrete limit via a scope field.