This class is used to ease the connection with the SAT solver.
- Todo
- (user): remove? the meat of the logic is used in just one place, so I am not sure having this extra layer improve the readability.
Definition at line 63 of file bop_ls.h.
int operations_research::bop::SatWrapper::ApplyDecision |
( |
sat::Literal | decision_literal, |
|
|
std::vector< sat::Literal > * | propagated_literals ) |
Applies the decision that makes the given literal true and returns the number of decisions to backtrack due to conflicts if any. Two cases:
- No conflicts: Returns 0 and fills the propagated_literals with the literals that have been propagated due to the decision including the the decision itself.
- Conflicts: Returns the number of decisions to backtrack (the current decision included, i.e. returned value > 0) and fills the propagated_literals with the literals that the conflicts propagated.
- Note
- the decision variable should not be already assigned in SAT.
Return the propagated literals, whenever there is a conflict or not. In case of conflict, these literals will have to be added to the last decision point after backtrack.
Definition at line 668 of file bop_ls.cc.