Skip to content

Commit

Permalink
fix(plan): Re-enable boolean values in table constraints.
Browse files Browse the repository at this point in the history
  • Loading branch information
arbimo committed Feb 29, 2024
1 parent 3a16853 commit 01f1628
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion planning/planners/src/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,15 @@ pub fn encode(pb: &FiniteProblem, metric: Option<Metric>) -> std::result::Result
supported_by_this_line.push(solver.reify(leq(var, val)));
supported_by_this_line.push(solver.reify(geq(var, val)));
}
Atom::Bool(_) | Atom::Fixed(_) => unimplemented!(),
Atom::Bool(l) => {
let DiscreteValue::Bool(val) = val else { panic!() };
if val {
supported_by_this_line.push(l);
} else {
supported_by_this_line.push(!l);
}
}
Atom::Fixed(_) => unimplemented!(),
}
}
supported_by_a_line.push(solver.reify(and(supported_by_this_line)));
Expand Down

0 comments on commit 01f1628

Please sign in to comment.