Skip to content

Commit

Permalink
chore(branching): Phase saving should not erase from any solution.
Browse files Browse the repository at this point in the history
  • Loading branch information
arbimo committed Oct 9, 2024
1 parent 8537a84 commit c07f446
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions solver/src/solver/search/conflicts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ impl PreferredValues {
/// Record the value as preferred, unless it already as a value from the current solution.
pub fn set_from_phase(&mut self, var: VarRef, value: IntCst) {
match self.values.get(var) {
Some((_, origin)) if origin.0 == self.last_solution_id => {
// do not erase a value from the last solution
// Some((_, origin)) if origin.0 == self.last_solution_id => { // do not erase a value from the last solution
Some((_, origin)) if origin.0 > 0 => { // do not erase from solution
}
_ => self.values.insert(var, (value, PreferredValueOrigin::PHASE)),
}
Expand Down

0 comments on commit c07f446

Please sign in to comment.