pub trait Termination<S: PlanningSolution, D: ScoreDirector<S>>: Send + Debug {
// Required method
fn is_terminated(&self, solver_scope: &SolverScope<'_, S, D>) -> bool;
// Provided method
fn install_inphase_limits(&self, _solver_scope: &mut SolverScope<'_, S, D>) { ... }
}Expand description
Trait for determining when to stop solving.
§Type Parameters
S- The planning solution typeD- The score director type
Required Methods§
Sourcefn is_terminated(&self, solver_scope: &SolverScope<'_, S, D>) -> bool
fn is_terminated(&self, solver_scope: &SolverScope<'_, S, D>) -> bool
Returns true if solving 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 this termination’s limit as an in-phase limit on the solver scope.
This allows the termination to fire inside the phase step loop (T1 fix). The default implementation is a no-op.