103 const int kMaxReasonableParallelism = 10'000;
105 TEST_IN_RANGE(num_search_workers, 0, kMaxReasonableParallelism);
106 TEST_IN_RANGE(shared_tree_num_workers, 0, kMaxReasonableParallelism);
107 TEST_IN_RANGE(interleave_batch_size, 0, kMaxReasonableParallelism);
109 kMaxReasonableParallelism);
115 TEST_IN_RANGE(solution_pool_size, 1, std::numeric_limits<int32_t>::max());
116 TEST_IN_RANGE(shared_tree_worker_objective_split_probability, 0.0, 1.0);
120 TEST_NOT_NAN(feasibility_jump_var_randomization_probability);
121 TEST_NOT_NAN(feasibility_jump_var_perburbation_range_ratio);
123 TEST_IN_RANGE(feasibility_jump_var_randomization_probability, 0.0, 1.0);
124 TEST_IN_RANGE(feasibility_jump_var_perburbation_range_ratio, 0.0, 1.0);
128 TEST_IN_RANGE(num_violation_ls, 0, kMaxReasonableParallelism);
129 TEST_IN_RANGE(violation_ls_perturbation_period, 1, 1'000'000'000);
130 TEST_IN_RANGE(violation_ls_compound_move_probability, 0.0, 1.0);
151 if (params.enumerate_all_solutions() &&
152 (params.num_search_workers() > 1 || params.num_workers() > 1)) {
153 return "Enumerating all solutions does not work in parallel";
156 if (params.enumerate_all_solutions() &&
157 (!params.subsolvers().empty() || !params.extra_subsolvers().empty() ||
158 !params.ignore_subsolvers().empty())) {
159 return "Enumerating all solutions does not work with custom subsolvers";
162 if (params.num_search_workers() >= 1 && params.num_workers() >= 1) {
163 return "Do not specify both num_search_workers and num_workers";
166 if (params.use_shared_tree_search()) {
167 return "use_shared_tree_search must only be set on workers' parameters";
170 if (params.enumerate_all_solutions() && params.interleave_search()) {
171 return "Enumerating all solutions does not work with interleaved search";
174 for (
const SatParameters& new_subsolver : params.subsolver_params()) {
175 if (new_subsolver.name().empty()) {
176 return "New subsolver parameter defined without a name";
181 for (
const std::string& subsolver : params.subsolvers()) {
182 if (subsolver ==
"core_or_no_lp")
continue;
183 if (!strategies.contains(subsolver)) {
184 return absl::StrCat(
"subsolver \'", subsolver,
"\' is not valid");
188 for (
const std::string& subsolver : params.extra_subsolvers()) {
189 if (!strategies.contains(subsolver)) {
190 return absl::StrCat(
"subsolver \'", subsolver,
"\' is not valid");