68 void Untrail(
int target_trail_index);
84 maybe_enable_phase_saving_ = save_phase;
114 return best_partial_assignment_;
120 void InitializeVariableOrdering();
123 void RescaleVariableActivities(
double scaling_factor);
127 void ResetInitialPolarity(
int from,
bool inverted =
false);
131 void RephaseIfNeeded();
132 void UseLongestAssignmentAsInitialPolarity();
133 void FlipCurrentPolarity();
134 void RandomizeCurrentPolarity();
138 void PqInsertOrUpdate(BooleanVariable
var);
141 const SatParameters& parameters_;
151 struct WeightedVarQueueElement {
153 int Index()
const {
return var.value(); }
170 bool operator<(
const WeightedVarQueueElement& other)
const {
171 return weight < other.weight ||
172 (weight == other.weight && (tie_breaker < other.tie_breaker));
183 static_assert(
sizeof(WeightedVarQueueElement) == 16,
184 "ERROR_WeightedVarQueueElement_is_not_well_compacted");
186 bool var_ordering_is_initialized_ =
false;
187 IntegerPriorityQueue<WeightedVarQueueElement> var_ordering_;
196 struct NumConflictsStackEntry {
200 int64_t num_conflicts_ = 0;
201 std::vector<NumConflictsStackEntry> num_conflicts_stack_;
209 BitQueue64 pq_need_update_for_var_at_trail_index_;
212 double variable_activity_increment_ = 1.0;
225 bool in_stable_phase_ =
false;
226 int target_length_ = 0;
234 bool maybe_enable_phase_saving_ =
true;
235 int64_t polarity_phase_ = 0;
236 int64_t num_conflicts_until_rephase_ = 1000;
239 std::vector<Literal> best_partial_assignment_;
242 std::vector<BooleanVariable> tmp_variables_;