49 std::function<void()>
GenerateTask(int64_t task_id)
override;
56 bool ResetAndSolveModel(int64_t task_id);
65 std::atomic<bool> stop_current_chunk_;
68 std::unique_ptr<Model> local_sat_model_;
69 std::unique_ptr<google::protobuf::Arena> arena_;
73 std::vector<int> postsolve_mapping_;
77 IntegerValue objective_lb_ ABSL_GUARDED_BY(mutex_);
78 IntegerValue objective_ub_ ABSL_GUARDED_BY(mutex_);
79 IntegerValue current_objective_target_ub_ ABSL_GUARDED_BY(mutex_);
80 bool task_in_flight_ ABSL_GUARDED_BY(mutex_) =
false;
108 std::function<void()>
GenerateTask(int64_t task_id)
override;
115 int64_t DomainSize(
int var)
const ABSL_SHARED_LOCKS_REQUIRED(mutex_);
117 bool VarIsFixed(
int int_var)
const ABSL_SHARED_LOCKS_REQUIRED(mutex_);
119 bool ConstraintIsInactive(
int c)
const ABSL_SHARED_LOCKS_REQUIRED(mutex_);
121 bool FindNextVar(
State* state) ABSL_SHARED_LOCKS_REQUIRED(mutex_);
123 void CopyModelConnectedToVar(
State* state,
Model* local_model,
125 bool* has_no_overlap_2d)
126 ABSL_SHARED_LOCKS_REQUIRED(mutex_);
128 bool ResetAndSolveModel(int64_t task_id,
State* state,
Model* local_model,
134 int shared_bounds_id_ = -1;
138 std::atomic<bool> stop_current_chunk_;
143 int64_t current_index_ = -1;
144 std::vector<Domain> var_domains_ ABSL_GUARDED_BY(mutex_);
147 int num_vars_tried_ ABSL_GUARDED_BY(mutex_) = 0;
148 int num_vars_shaved_ ABSL_GUARDED_BY(mutex_) = 0;
149 int num_infeasible_found_ ABSL_GUARDED_BY(mutex_) = 0;