pub trait Phase<S: PlanningSolution, D: ScoreDirector<S>>: Send + Debug {
// Required methods
fn solve(&mut self, solver_scope: &mut SolverScope<'_, S, D>);
fn phase_type_name(&self) -> &'static str;
}Expand description
A phase of the solving process.
Phases are executed in sequence by the solver. Each phase has its own strategy for exploring or constructing solutions.
§Type Parameters
S- The planning solution typeD- The score director type
Required Methods§
Sourcefn solve(&mut self, solver_scope: &mut SolverScope<'_, S, D>)
fn solve(&mut self, solver_scope: &mut SolverScope<'_, S, D>)
Executes this phase.
The phase should modify the working solution in the solver scope and update the best solution when improvements are found.
Sourcefn phase_type_name(&self) -> &'static str
fn phase_type_name(&self) -> &'static str
Returns the name of this phase type.
Implementations on Foreign Types§
Source§impl<S, D, P1> Phase<S, D> for ((), P1)
impl<S, D, P1> Phase<S, D> for ((), P1)
fn solve(&mut self, solver_scope: &mut SolverScope<'_, S, D>)
fn phase_type_name(&self) -> &'static str
Source§impl<S, D, P1, P2> Phase<S, D> for (((), P1), P2)
impl<S, D, P1, P2> Phase<S, D> for (((), P1), P2)
fn solve(&mut self, solver_scope: &mut SolverScope<'_, S, D>)
fn phase_type_name(&self) -> &'static str
Source§impl<S, D, P1, P2, P3> Phase<S, D> for ((((), P1), P2), P3)
impl<S, D, P1, P2, P3> Phase<S, D> for ((((), P1), P2), P3)
fn solve(&mut self, solver_scope: &mut SolverScope<'_, S, D>)
fn phase_type_name(&self) -> &'static str
Source§impl<S, D, P1, P2, P3, P4> Phase<S, D> for (((((), P1), P2), P3), P4)where
S: PlanningSolution,
D: ScoreDirector<S>,
P1: Phase<S, D>,
P2: Phase<S, D>,
P3: Phase<S, D>,
P4: Phase<S, D>,
impl<S, D, P1, P2, P3, P4> Phase<S, D> for (((((), P1), P2), P3), P4)where
S: PlanningSolution,
D: ScoreDirector<S>,
P1: Phase<S, D>,
P2: Phase<S, D>,
P3: Phase<S, D>,
P4: Phase<S, D>,
fn solve(&mut self, solver_scope: &mut SolverScope<'_, S, D>)
fn phase_type_name(&self) -> &'static str
Source§impl<S: PlanningSolution, D: ScoreDirector<S>> Phase<S, D> for ()
Unit type implements Phase as a no-op (empty phase list).
impl<S: PlanningSolution, D: ScoreDirector<S>> Phase<S, D> for ()
Unit type implements Phase as a no-op (empty phase list).