21#ifndef OR_TOOLS_SAT_SAT_INPROCESSING_H_
22#define OR_TOOLS_SAT_SAT_INPROCESSING_H_
47 absl::Span<const Literal> clause);
100 blocked_clause_simplifier_(
102 bounded_variable_elimination_(
148 double total_dtime_ = 0.0;
157 int64_t last_num_redundant_literals_ = 0;
158 int64_t last_num_fixed_variables_ = 0;
201 return first_stamps_[
a.Index()] < first_stamps_[
b.Index()] &&
202 last_stamps_[
b.Index()] < last_stamps_[
a.Index()];
215 bool stamps_are_already_computed_ =
false;
219 int64_t num_subsumed_clauses_ = 0;
220 int64_t num_removed_literals_ = 0;
221 int64_t num_fixed_ = 0;
229 std::vector<LiteralIndex> children_;
233 std::vector<LiteralIndex> dfs_stack_;
263 void InitializeForNewRound();
264 void ProcessLiteral(
Literal current_literal);
265 bool ClauseIsBlocked(
Literal current_literal,
266 absl::Span<const Literal> clause);
275 int32_t num_blocked_clauses_ = 0;
276 int64_t num_inspected_literals_ = 0;
284 std::deque<Literal> queue_;
288 DEFINE_INT_TYPE(ClauseIndex, int32_t);
308 int NumClausesContaining(
Literal l);
309 void UpdatePriorityQueue(BooleanVariable
var);
310 bool CrossProduct(BooleanVariable
var);
311 void DeleteClause(
SatClause* sat_clause);
313 void AddClause(absl::Span<const Literal> clause);
322 template <
bool score_only,
bool with_binary_only>
323 bool ResolveAllClauseContaining(
Literal lit);
333 int propagation_index_;
336 int64_t num_inspected_literals_ = 0;
337 int64_t num_simplifications_ = 0;
338 int64_t num_blocked_clauses_ = 0;
339 int64_t num_eliminated_variables_ = 0;
340 int64_t num_literals_diff_ = 0;
341 int64_t num_clauses_diff_ = 0;
344 int64_t score_threshold_;
348 std::vector<Literal> resolvant_;
352 struct VariableWithPriority {
357 int Index()
const {
return var.value(); }
358 bool operator<(
const VariableWithPriority& o)
const {
359 return priority < o.priority;
362 IntegerPriorityQueue<VariableWithPriority> queue_;
366 std::vector<BooleanVariable> need_to_be_updated_;
371 DEFINE_INT_TYPE(ClauseIndex, int32_t);
An Assignment is a variable -> domains mapping, used to report solutions to the user.
A simple class to enforce both an elapsed time limit and a deterministic time limit in the same threa...
BlockedClauseSimplifier(Model *model)
void DoOneRound(bool log_info)
bool DoOneRound(bool log_info)
BoundedVariableElimination(Model *model)
bool PresolveLoop(SatPresolveOptions options)
bool MoreFixedVariableToClean() const
bool RemoveFixedAndEquivalentVariables(bool log_info)
bool LevelZeroPropagate()
Inprocessing(Model *model)
bool MoreRedundantVariableToClean() const
bool SubsumeAndStrenghtenRound(bool log_info)
bool DetectEquivalencesAndStamp(bool use_transitive_reduction, bool log_info)
Class that owns everything related to a particular optimization model.
bool DoOneRound(bool log_info)
bool ComputeStampsForNextRound(bool log_info)
bool ImplicationIsInTree(Literal a, Literal b) const
StampingSimplifier(Model *model)
void SampleTreeAndFillParent()
Collection of objects used to extend the Constraint Solver library.
std::deque< std::vector< Literal > > clauses
void AddClauseWithSpecialLiteral(Literal literal, absl::Span< const Literal > clause)
bool use_transitive_reduction
bool extract_binary_clauses_in_probing
double deterministic_time_limit