48 std::function<void()>
GenerateTask(int64_t task_id)
override;
54 bool ResetModel(int64_t task_id);
57 SatParameters local_params_;
63 std::atomic<bool> stop_current_chunk_;
66 std::unique_ptr<Model> local_sat_model_;
67 CpModelProto local_proto_;
70 std::vector<int> postsolve_mapping_;
71 CpModelProto mapping_proto_;
74 IntegerValue objective_lb_ ABSL_GUARDED_BY(mutex_);
75 IntegerValue objective_ub_ ABSL_GUARDED_BY(mutex_);
76 IntegerValue current_objective_target_ub_ ABSL_GUARDED_BY(mutex_);
77 bool task_in_flight_ ABSL_GUARDED_BY(mutex_) =
false;
98 std::function<void()>
GenerateTask(int64_t task_id)
override;
105 int64_t DomainSize(
int var)
const ABSL_SHARED_LOCKS_REQUIRED(mutex_);
107 bool VarIsFixed(
int int_var)
const ABSL_SHARED_LOCKS_REQUIRED(mutex_);
109 bool ConstraintIsInactive(
int c)
const ABSL_SHARED_LOCKS_REQUIRED(mutex_);
111 bool FindNextVar(
State* state) ABSL_SHARED_LOCKS_REQUIRED(mutex_);
113 void CopyModelConnectedToVar(
State* state,
Model* local_sat_model,
114 CpModelProto* shaving_proto)
115 ABSL_SHARED_LOCKS_REQUIRED(mutex_);
117 bool ResetModel(int64_t task_id,
State* state,
Model* local_sat_model,
118 CpModelProto* shaving_proto);
121 SatParameters local_params_;
123 int shared_bounds_id_ = -1;
127 std::atomic<bool> stop_current_chunk_;
129 const CpModelProto& model_proto_;
132 int current_index_ = -1;
133 std::vector<Domain> var_domains_ ABSL_GUARDED_BY(mutex_);
136 int num_vars_tried_ ABSL_GUARDED_BY(mutex_) = 0;
137 int num_vars_shaved_ ABSL_GUARDED_BY(mutex_) = 0;
138 int num_infeasible_found_ ABSL_GUARDED_BY(mutex_) = 0;