solverforge_solver/
model_support.rs1use solverforge_core::domain::{PlanningSolution, SolutionDescriptor};
2
3use crate::builder::{CoverageGroupBinding, ScalarGroupBinding, ScalarVariableSlot};
4
5pub trait PlanningModelSupport: PlanningSolution + Sized + 'static {
6 fn attach_descriptor_hooks(descriptor: &mut SolutionDescriptor);
7
8 fn attach_runtime_scalar_hooks(slot: ScalarVariableSlot<Self>) -> ScalarVariableSlot<Self>;
9
10 fn attach_scalar_groups(
11 _scalar_variables: &[ScalarVariableSlot<Self>],
12 ) -> Vec<ScalarGroupBinding<Self>> {
13 Vec::new()
14 }
15
16 fn attach_coverage_groups(
17 scalar_variables: &[ScalarVariableSlot<Self>],
18 ) -> Vec<CoverageGroupBinding<Self>>;
19
20 fn validate_model(descriptor: &SolutionDescriptor);
21
22 fn update_entity_shadows(
23 solution: &mut Self,
24 descriptor_index: usize,
25 entity_index: usize,
26 ) -> bool;
27
28 fn update_all_shadows(solution: &mut Self) -> bool;
29}