pumpkin_core/propagators/cumulative/
options.rs1use super::CumulativeExplanationType;
2
3#[derive(Debug, Default, Clone, Copy)]
4pub(crate) struct CumulativePropagatorOptions {
5 pub(crate) allow_holes_in_domain: bool,
9 pub(crate) explanation_type: CumulativeExplanationType,
12 pub(crate) generate_sequence: bool,
14 pub(crate) incremental_backtracking: bool,
16}
17
18#[derive(Debug, Copy, Clone, Default)]
19pub struct CumulativeOptions {
20 pub(crate) propagation_method: CumulativePropagationMethod,
24 pub(crate) propagator_options: CumulativePropagatorOptions,
26}
27
28impl CumulativeOptions {
29 pub fn new(
30 allow_holes_in_domain: bool,
31 explanation_type: CumulativeExplanationType,
32 generate_sequence: bool,
33 propagation_method: CumulativePropagationMethod,
34 incremental_backtracking: bool,
35 ) -> Self {
36 Self {
37 propagation_method,
38 propagator_options: CumulativePropagatorOptions {
39 allow_holes_in_domain,
40 explanation_type,
41 generate_sequence,
42 incremental_backtracking,
43 },
44 }
45 }
46}
47
48#[derive(Debug, Default, Clone, Copy)]
49#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
50pub enum CumulativePropagationMethod {
51 TimeTablePerPoint,
52 TimeTablePerPointIncremental,
53 TimeTablePerPointIncrementalSynchronised,
54 TimeTableOverInterval,
55 #[default]
56 TimeTableOverIntervalIncremental,
57 TimeTableOverIntervalIncrementalSynchronised,
58}