use crate::cumulative::time_table::CumulativeExplanationType;
#[derive(Debug, Default, Clone, Copy)]
pub struct CumulativePropagatorOptions {
pub allow_holes_in_domain: bool,
pub explanation_type: CumulativeExplanationType,
pub generate_sequence: bool,
pub incremental_backtracking: bool,
}
#[derive(Debug, Copy, Clone, Default)]
pub struct CumulativeOptions {
pub propagation_method: CumulativePropagationMethod,
pub propagator_options: CumulativePropagatorOptions,
}
impl CumulativeOptions {
pub fn new(
allow_holes_in_domain: bool,
explanation_type: CumulativeExplanationType,
generate_sequence: bool,
propagation_method: CumulativePropagationMethod,
incremental_backtracking: bool,
) -> Self {
Self {
propagation_method,
propagator_options: CumulativePropagatorOptions {
allow_holes_in_domain,
explanation_type,
generate_sequence,
incremental_backtracking,
},
}
}
}
#[derive(Debug, Default, Clone, Copy)]
#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
pub enum CumulativePropagationMethod {
TimeTablePerPoint,
TimeTablePerPointIncremental,
TimeTablePerPointIncrementalSynchronised,
TimeTableOverInterval,
#[default]
TimeTableOverIntervalIncremental,
TimeTableOverIntervalIncrementalSynchronised,
}