fn for_entire_constraint(
        &mut self,
        constraint: usize,
        direction: BoundDirection, // Activity bound that can be calculated
    ) -> Result<Change, LinearProgramType<OF>> {
        debug_assert_eq!(
            match direction {
                BoundDirection::Lower => self.counters.activity[constraint].0,
                BoundDirection::Upper => self.counters.activity[constraint].1,
            },
            0,
        );
        // In this variable we collect the most change made by the function, upgrading when needed.
        let mut most_meaningful_change = Change::None;

        // TODO(ARCHITECTURE): Try to avoid this clone
        let activity_bound = self.compute_activity_bound_if_needed(constraint, direction).clone();

        let (remove_constraint, apply_variable_part) = self.constraint_part(
            constraint,
            &activity_bound,
            direction,
            &mut most_meaningful_change,
        )?;

        if apply_variable_part {
            if let Some(right_hand_side) = self.can_variable_rule_be_applied(constraint, direction) {
                self.variable_part(
                    constraint,
                    right_hand_side,
                    &activity_bound,
                    direction,
                    &mut most_meaningful_change,
                );
            }
        }

        if remove_constraint {
            self.remove_constraint_values(constraint)?;
            self.remove_constraint(constraint);
        }

        Ok(most_meaningful_change)
    }
/// Apply domain propagation through activation bounds for a constraint where all relevant
/// variable bounds are known.
///
/// Attempts to both prove infeasibility and removal of the entire constraint. Afterwards, it
/// attempts to add any missing "opposite" bounds.
///
/// # Arguments
///
/// * `constraint`: Index of the constraint under consideration.
/// * `direction`: Whether the activity lower- or upperbound should be used.
Apply domain propagation through activation bounds for a constraint where all relevant
variable bounds are known.

Attempts to both prove infeasibility and removal of the entire constraint. Afterwards, it
attempts to add any missing "opposite" bounds.
Apply domain propagation through activation bounds for a constraint where all relevant variable bounds are known . Attempts to both prove infeasibility and removal of the entire constraint . Afterwards it attempts to add any missing " opposite " bounds .
fn for_entire_constraint(
        &mut self,
        constraint: usize,
        direction: BoundDirection, // Activity bound that can be calculated
    ) -> Result<Change, LinearProgramType<OF>> {
        debug_assert_eq!(
            match direction {
                BoundDirection::Lower => self.counters.activity[constraint].0,
                BoundDirection::Upper => self.counters.activity[constraint].1,
            },
            0,
        );
        // In this variable we collect the most change made by the function, upgrading when needed.
        let mut most_meaningful_change = Change::None;
        // TODO(ARCHITECTURE): Try to avoid this clone
        let activity_bound = self.compute_activity_bound_if_needed(constraint, direction).clone();
        let (remove_constraint, apply_variable_part) = self.constraint_part(
            constraint,
            &activity_bound,
            direction,
            &mut most_meaningful_change,
        )?;
        if apply_variable_part {
            if let Some(right_hand_side) = self.can_variable_rule_be_applied(constraint, direction) {
                self.variable_part(
                    constraint,
                    right_hand_side,
                    &activity_bound,
                    direction,
                    &mut most_meaningful_change,
                );
            }
        }
        if remove_constraint {
            self.remove_constraint_values(constraint)?;
            self.remove_constraint(constraint);
        }
        Ok(most_meaningful_change)
    }
fn for_entire_constraint ( & mut self , constraint : usize , direction : BoundDirection , // Activity bound that can be calculated ) -> Result < Change , LinearProgramType < OF > > { debug_assert_eq ! ( match direction { BoundDirection Lower self counters activity [ constraint ] 0 BoundDirection Upper self counters activity [ constraint ] 1 } 0 ) ; // In this variable we collect the most change made by the function, upgrading when needed. let mut most_meaningful_change = Change :: None ; // TODO(ARCHITECTURE): Try to avoid this clone let activity_bound = self . compute_activity_bound_if_needed ( constraint , direction ) . clone ( ) ; let ( remove_constraint , apply_variable_part ) = self . constraint_part ( constraint , & activity_bound , direction , & mut most_meaningful_change , ) ? ; if apply_variable_part { if let Some ( right_hand_side ) = self . can_variable_rule_be_applied ( constraint , direction ) { self . variable_part ( constraint , right_hand_side , & activity_bound , direction , & mut most_meaningful_change , ) ; } } if remove_constraint { self . remove_constraint_values ( constraint ) ? ; self . remove_constraint ( constraint ) ; } Ok ( most_meaningful_change ) }
Apply domain propagation through activation bounds for a constraint where all relevant
variable bounds are known.
Apply domain propagation through activation bounds for a constraint where all relevant variable bounds are known .
&mut self
constraint
usize
direction
BoundDirection
&mut self
constraint
usize
direction
BoundDirection