OR-Tools  9.2
bop_parameters.pb.cc
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: ortools/bop/bop_parameters.proto
3
5
6#include <algorithm>
7
8#include <google/protobuf/io/coded_stream.h>
9#include <google/protobuf/extension_set.h>
10#include <google/protobuf/wire_format_lite.h>
11#include <google/protobuf/descriptor.h>
12#include <google/protobuf/generated_message_reflection.h>
13#include <google/protobuf/reflection_ops.h>
14#include <google/protobuf/wire_format.h>
15// @@protoc_insertion_point(includes)
16#include <google/protobuf/port_def.inc>
17
18PROTOBUF_PRAGMA_INIT_SEG
19namespace operations_research {
20namespace bop {
22 ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
23 : type_(0)
24{}
27 : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
29 union {
31 };
32};
35 ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
36 : methods_(){}
39 : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
41 union {
43 };
44};
47 ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
48 : solver_optimizer_sets_()
49 , default_solver_optimizer_sets_(nullptr)
50 , log_search_progress_(false)
51 , prune_search_tree_(false)
52 , sort_constraints_by_num_terms_(false)
53 , use_symmetry_(false)
54 , synchronization_type_(0)
55
56 , max_number_of_consecutive_failing_optimizer_calls_(0)
57 , exploit_symmetry_in_sat_first_solution_(false)
58 , use_potential_one_flip_repairs_in_ls_(false)
59 , use_lp_strong_branching_(false)
60 , decomposed_problem_min_time_in_seconds_(0)
61 , max_lp_solve_for_feasibility_problems_(0)
62 , max_time_in_seconds_(std::numeric_limits<double>::infinity())
63 , max_num_decisions_in_ls_(4)
64 , random_seed_(8)
65 , num_relaxed_vars_(10)
66 , max_number_of_conflicts_in_random_lns_(2500)
67 , compute_estimated_impact_(true)
68 , use_random_lns_(true)
69 , use_lp_lns_(true)
70 , use_sat_to_choose_lns_neighbourhood_(true)
71 , num_random_lns_tries_(1)
72 , max_number_of_backtracks_in_ls_(int64_t{100000000})
73 , max_number_of_conflicts_for_quick_check_(10)
74 , max_number_of_conflicts_in_random_solution_generation_(500)
75 , max_number_of_explored_assignments_per_try_in_ls_(int64_t{10000})
76 , use_transposition_table_in_ls_(true)
77 , use_learned_binary_clauses_in_lp_(true)
78 , number_of_solvers_(1)
79 , max_deterministic_time_(std::numeric_limits<double>::infinity())
80 , relative_gap_limit_(0.0001)
81 , decomposer_num_variables_threshold_(50)
82 , num_bop_solvers_used_by_decomposition_(1)
83 , guided_sat_conflicts_chunk_(1000)
84 , max_num_broken_constraints_in_ls_(2147483647)
85 , lp_max_deterministic_time_(1){}
88 : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
90 union {
92 };
93};
94PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BopParametersDefaultTypeInternal _BopParameters_default_instance_;
95} // namespace bop
96} // namespace operations_research
97static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_ortools_2fbop_2fbop_5fparameters_2eproto[3];
98static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_ortools_2fbop_2fbop_5fparameters_2eproto[2];
99static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_ortools_2fbop_2fbop_5fparameters_2eproto = nullptr;
100
102 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopOptimizerMethod, _has_bits_),
103 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopOptimizerMethod, _internal_metadata_),
104 ~0u, // no _extensions_
105 ~0u, // no _oneof_case_
106 ~0u, // no _weak_field_map_
107 ~0u, // no _inlined_string_donated_
108 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopOptimizerMethod, type_),
109 0,
110 ~0u, // no _has_bits_
111 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopSolverOptimizerSet, _internal_metadata_),
112 ~0u, // no _extensions_
113 ~0u, // no _oneof_case_
114 ~0u, // no _weak_field_map_
115 ~0u, // no _inlined_string_donated_
116 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopSolverOptimizerSet, methods_),
117 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, _has_bits_),
118 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, _internal_metadata_),
119 ~0u, // no _extensions_
120 ~0u, // no _oneof_case_
121 ~0u, // no _weak_field_map_
122 ~0u, // no _inlined_string_donated_
123 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_time_in_seconds_),
124 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_deterministic_time_),
125 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, lp_max_deterministic_time_),
126 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_number_of_consecutive_failing_optimizer_calls_),
127 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, relative_gap_limit_),
128 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_num_decisions_in_ls_),
129 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_num_broken_constraints_in_ls_),
130 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, log_search_progress_),
131 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, compute_estimated_impact_),
132 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, prune_search_tree_),
133 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, sort_constraints_by_num_terms_),
134 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_random_lns_),
135 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, random_seed_),
136 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, num_relaxed_vars_),
137 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_number_of_conflicts_in_random_lns_),
138 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, num_random_lns_tries_),
139 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_number_of_backtracks_in_ls_),
140 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_lp_lns_),
141 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_sat_to_choose_lns_neighbourhood_),
142 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_number_of_conflicts_for_quick_check_),
143 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_symmetry_),
144 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, exploit_symmetry_in_sat_first_solution_),
145 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_number_of_conflicts_in_random_solution_generation_),
146 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_number_of_explored_assignments_per_try_in_ls_),
147 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_transposition_table_in_ls_),
148 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_potential_one_flip_repairs_in_ls_),
149 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_learned_binary_clauses_in_lp_),
150 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, number_of_solvers_),
151 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, synchronization_type_),
152 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, solver_optimizer_sets_),
153 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, default_solver_optimizer_sets_),
154 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_lp_strong_branching_),
155 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, decomposer_num_variables_threshold_),
156 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, num_bop_solvers_used_by_decomposition_),
157 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, decomposed_problem_min_time_in_seconds_),
158 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, guided_sat_conflicts_chunk_),
159 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_lp_solve_for_feasibility_problems_),
160 12,
161 29,
162 35,
163 6,
164 30,
165 13,
166 34,
167 1,
168 17,
169 2,
170 3,
171 18,
172 14,
173 15,
174 16,
175 21,
176 22,
177 19,
178 20,
179 23,
180 4,
181 7,
182 24,
183 25,
184 26,
185 8,
186 27,
187 28,
188 5,
189 ~0u,
190 0,
191 9,
192 31,
193 32,
194 10,
195 33,
196 11,
197};
198static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
201 { 15, 58, -1, sizeof(::operations_research::bop::BopParameters)},
202};
203
204static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
205 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::bop::_BopOptimizerMethod_default_instance_),
206 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::bop::_BopSolverOptimizerSet_default_instance_),
207 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::bop::_BopParameters_default_instance_),
208};
209
210const char descriptor_table_protodef_ortools_2fbop_2fbop_5fparameters_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
211 "\n ortools/bop/bop_parameters.proto\022\027oper"
212 "ations_research.bop\"\204\004\n\022BopOptimizerMeth"
213 "od\022G\n\004type\030\001 \001(\01629.operations_research.b"
214 "op.BopOptimizerMethod.OptimizerType\"\244\003\n\r"
215 "OptimizerType\022\022\n\016SAT_CORE_BASED\020\000\022\025\n\021SAT"
216 "_LINEAR_SEARCH\020\017\022\025\n\021LINEAR_RELAXATION\020\001\022"
217 "\020\n\014LOCAL_SEARCH\020\002\022\031\n\025RANDOM_FIRST_SOLUTI"
218 "ON\020\003\022\031\n\025RANDOM_CONSTRAINT_LNS\020\004\022\027\n\023RANDO"
219 "M_VARIABLE_LNS\020\005\022\020\n\014COMPLETE_LNS\020\007\022\025\n\021LP"
220 "_FIRST_SOLUTION\020\010\022\034\n\030OBJECTIVE_FIRST_SOL"
221 "UTION\020\t\022\036\n\032USER_GUIDED_FIRST_SOLUTION\020\016\022"
222 "&\n\"RANDOM_CONSTRAINT_LNS_GUIDED_BY_LP\020\013\022"
223 "$\n RANDOM_VARIABLE_LNS_GUIDED_BY_LP\020\014\022\026\n"
224 "\022RELATION_GRAPH_LNS\020\020\022#\n\037RELATION_GRAPH_"
225 "LNS_GUIDED_BY_LP\020\021\"U\n\025BopSolverOptimizer"
226 "Set\022<\n\007methods\030\001 \003(\0132+.operations_resear"
227 "ch.bop.BopOptimizerMethod\"\356\023\n\rBopParamet"
228 "ers\022 \n\023max_time_in_seconds\030\001 \001(\001:\003inf\022#\n"
229 "\026max_deterministic_time\030\033 \001(\001:\003inf\022$\n\031lp"
230 "_max_deterministic_time\030% \001(\001:\0011\0229\n1max_"
231 "number_of_consecutive_failing_optimizer_"
232 "calls\030# \001(\005\022\"\n\022relative_gap_limit\030\034 \001(\001:"
233 "\0060.0001\022\"\n\027max_num_decisions_in_ls\030\002 \001(\005"
234 ":\0014\0224\n max_num_broken_constraints_in_ls\030"
235 "& \001(\005:\n2147483647\022\"\n\023log_search_progress"
236 "\030\016 \001(\010:\005false\022&\n\030compute_estimated_impac"
237 "t\030\003 \001(\010:\004true\022 \n\021prune_search_tree\030\004 \001(\010"
238 ":\005false\022,\n\035sort_constraints_by_num_terms"
239 "\030\005 \001(\010:\005false\022\034\n\016use_random_lns\030\006 \001(\010:\004t"
240 "rue\022\026\n\013random_seed\030\007 \001(\005:\0018\022\034\n\020num_relax"
241 "ed_vars\030\010 \001(\005:\00210\0223\n%max_number_of_confl"
242 "icts_in_random_lns\030\t \001(\005:\0042500\022\037\n\024num_ra"
243 "ndom_lns_tries\030\n \001(\005:\0011\0221\n\036max_number_of"
244 "_backtracks_in_ls\030\013 \001(\003:\t100000000\022\030\n\nus"
245 "e_lp_lns\030\014 \001(\010:\004true\0221\n#use_sat_to_choos"
246 "e_lns_neighbourhood\030\017 \001(\010:\004true\0223\n\'max_n"
247 "umber_of_conflicts_for_quick_check\030\020 \001(\005"
248 ":\00210\022\033\n\014use_symmetry\030\021 \001(\010:\005false\0225\n&exp"
249 "loit_symmetry_in_sat_first_solution\030( \001("
250 "\010:\005false\022B\n5max_number_of_conflicts_in_r"
251 "andom_solution_generation\030\024 \001(\005:\003500\022\?\n0"
252 "max_number_of_explored_assignments_per_t"
253 "ry_in_ls\030\025 \001(\003:\00510000\022+\n\035use_transpositi"
254 "on_table_in_ls\030\026 \001(\010:\004true\0223\n$use_potent"
255 "ial_one_flip_repairs_in_ls\030\' \001(\010:\005false\022"
256 ".\n use_learned_binary_clauses_in_lp\030\027 \001("
257 "\010:\004true\022\034\n\021number_of_solvers\030\030 \001(\005:\0011\022r\n"
258 "\024synchronization_type\030\031 \001(\0162@.operations"
259 "_research.bop.BopParameters.ThreadSynchr"
260 "onizationType:\022NO_SYNCHRONIZATION\022M\n\025sol"
261 "ver_optimizer_sets\030\032 \003(\0132..operations_re"
262 "search.bop.BopSolverOptimizerSet\022\362\005\n\035def"
263 "ault_solver_optimizer_sets\030! \001(\t:\312\005metho"
264 "ds:{type:LOCAL_SEARCH } "
265 " methods:{type:RANDOM_FIRST_SOLUTIO"
266 "N } methods:{type:LINEAR_RE"
267 "LAXATION } methods:{typ"
268 "e:LP_FIRST_SOLUTION } m"
269 "ethods:{type:OBJECTIVE_FIRST_SOLUTION } "
270 " methods:{type:USER_GUIDED_FIRS"
271 "T_SOLUTION } methods:{type:RANDO"
272 "M_CONSTRAINT_LNS_GUIDED_BY_LP } methods:"
273 "{type:RANDOM_VARIABLE_LNS_GUIDED_BY_LP }"
274 " methods:{type:RELATION_GRAPH_LNS } "
275 " methods:{type:RELATION_GRA"
276 "PH_LNS_GUIDED_BY_LP } methods:{type:R"
277 "ANDOM_CONSTRAINT_LNS } meth"
278 "ods:{type:RANDOM_VARIABLE_LNS } "
279 " methods:{type:SAT_CORE_BASED } "
280 " methods:{type:COMPLETE"
281 "_LNS } \022&\n\027use_lp_"
282 "strong_branching\030\035 \001(\010:\005false\022.\n\"decompo"
283 "ser_num_variables_threshold\030\036 \001(\005:\00250\0220\n"
284 "%num_bop_solvers_used_by_decomposition\030\037"
285 " \001(\005:\0011\0221\n&decomposed_problem_min_time_i"
286 "n_seconds\030$ \001(\001:\0010\022(\n\032guided_sat_conflic"
287 "ts_chunk\030\" \001(\005:\0041000\0220\n%max_lp_solve_for"
288 "_feasibility_problems\030) \001(\005:\0010\"b\n\031Thread"
289 "SynchronizationType\022\026\n\022NO_SYNCHRONIZATIO"
290 "N\020\000\022\023\n\017SYNCHRONIZE_ALL\020\001\022\030\n\024SYNCHRONIZE_"
291 "ON_RIGHT\020\002"
292 ;
293static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ortools_2fbop_2fbop_5fparameters_2eproto_once;
294const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ortools_2fbop_2fbop_5fparameters_2eproto = {
295 false, false, 3210, descriptor_table_protodef_ortools_2fbop_2fbop_5fparameters_2eproto, "ortools/bop/bop_parameters.proto",
299};
300PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_ortools_2fbop_2fbop_5fparameters_2eproto_getter() {
302}
303
304// Force running AddDescriptors() at dynamic initialization time.
305PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_ortools_2fbop_2fbop_5fparameters_2eproto(&descriptor_table_ortools_2fbop_2fbop_5fparameters_2eproto);
306namespace operations_research {
307namespace bop {
308const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BopOptimizerMethod_OptimizerType_descriptor() {
309 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_ortools_2fbop_2fbop_5fparameters_2eproto);
311}
313 switch (value) {
314 case 0:
315 case 1:
316 case 2:
317 case 3:
318 case 4:
319 case 5:
320 case 7:
321 case 8:
322 case 9:
323 case 11:
324 case 12:
325 case 14:
326 case 15:
327 case 16:
328 case 17:
329 return true;
330 default:
331 return false;
332 }
333}
334
335#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
354#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
355const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BopParameters_ThreadSynchronizationType_descriptor() {
356 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_ortools_2fbop_2fbop_5fparameters_2eproto);
358}
360 switch (value) {
361 case 0:
362 case 1:
363 case 2:
364 return true;
365 default:
366 return false;
367 }
368}
369
370#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
377#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
378
379// ===================================================================
380
382 public:
383 using HasBits = decltype(std::declval<BopOptimizerMethod>()._has_bits_);
384 static void set_has_type(HasBits* has_bits) {
385 (*has_bits)[0] |= 1u;
386 }
387};
388
389BopOptimizerMethod::BopOptimizerMethod(::PROTOBUF_NAMESPACE_ID::Arena* arena,
390 bool is_message_owned)
391 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
392 SharedCtor();
393 if (!is_message_owned) {
394 RegisterArenaDtor(arena);
395 }
396 // @@protoc_insertion_point(arena_constructor:operations_research.bop.BopOptimizerMethod)
397}
399 : ::PROTOBUF_NAMESPACE_ID::Message(),
400 _has_bits_(from._has_bits_) {
401 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
402 type_ = from.type_;
403 // @@protoc_insertion_point(copy_constructor:operations_research.bop.BopOptimizerMethod)
404}
405
406inline void BopOptimizerMethod::SharedCtor() {
407type_ = 0;
408}
409
411 // @@protoc_insertion_point(destructor:operations_research.bop.BopOptimizerMethod)
412 if (GetArenaForAllocation() != nullptr) return;
413 SharedDtor();
414 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
415}
416
417inline void BopOptimizerMethod::SharedDtor() {
418 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
419}
420
421void BopOptimizerMethod::ArenaDtor(void* object) {
422 BopOptimizerMethod* _this = reinterpret_cast< BopOptimizerMethod* >(object);
423 (void)_this;
424}
425void BopOptimizerMethod::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
426}
427void BopOptimizerMethod::SetCachedSize(int size) const {
428 _cached_size_.Set(size);
429}
430
432// @@protoc_insertion_point(message_clear_start:operations_research.bop.BopOptimizerMethod)
433 uint32_t cached_has_bits = 0;
434 // Prevent compiler warnings about cached_has_bits being unused
435 (void) cached_has_bits;
436
437 type_ = 0;
438 _has_bits_.Clear();
439 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
440}
441
442const char* BopOptimizerMethod::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
443#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
444 _Internal::HasBits has_bits{};
445 while (!ctx->Done(&ptr)) {
446 uint32_t tag;
447 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
448 switch (tag >> 3) {
449 // optional .operations_research.bop.BopOptimizerMethod.OptimizerType type = 1;
450 case 1:
451 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
452 uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
453 CHK_(ptr);
455 _internal_set_type(static_cast<::operations_research::bop::BopOptimizerMethod_OptimizerType>(val));
456 } else {
457 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
458 }
459 } else
460 goto handle_unusual;
461 continue;
462 default:
463 goto handle_unusual;
464 } // switch
465 handle_unusual:
466 if ((tag == 0) || ((tag & 7) == 4)) {
467 CHK_(ptr);
468 ctx->SetLastTag(tag);
469 goto message_done;
470 }
471 ptr = UnknownFieldParse(
472 tag,
473 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
474 ptr, ctx);
475 CHK_(ptr != nullptr);
476 } // while
477message_done:
478 _has_bits_.Or(has_bits);
479 return ptr;
480failure:
481 ptr = nullptr;
482 goto message_done;
483#undef CHK_
484}
485
487 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
488 // @@protoc_insertion_point(serialize_to_array_start:operations_research.bop.BopOptimizerMethod)
489 uint32_t cached_has_bits = 0;
490 (void) cached_has_bits;
491
492 cached_has_bits = _has_bits_[0];
493 // optional .operations_research.bop.BopOptimizerMethod.OptimizerType type = 1;
494 if (cached_has_bits & 0x00000001u) {
495 target = stream->EnsureSpace(target);
496 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
497 1, this->_internal_type(), target);
498 }
499
500 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
501 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
502 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
503 }
504 // @@protoc_insertion_point(serialize_to_array_end:operations_research.bop.BopOptimizerMethod)
505 return target;
506}
507
509// @@protoc_insertion_point(message_byte_size_start:operations_research.bop.BopOptimizerMethod)
510 size_t total_size = 0;
511
512 uint32_t cached_has_bits = 0;
513 // Prevent compiler warnings about cached_has_bits being unused
514 (void) cached_has_bits;
515
516 // optional .operations_research.bop.BopOptimizerMethod.OptimizerType type = 1;
517 cached_has_bits = _has_bits_[0];
518 if (cached_has_bits & 0x00000001u) {
519 total_size += 1 +
520 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type());
521 }
522
523 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
524}
525
526const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BopOptimizerMethod::_class_data_ = {
527 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
528 BopOptimizerMethod::MergeImpl
529};
530const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BopOptimizerMethod::GetClassData() const { return &_class_data_; }
531
532void BopOptimizerMethod::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
533 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
534 static_cast<BopOptimizerMethod *>(to)->MergeFrom(
535 static_cast<const BopOptimizerMethod &>(from));
536}
537
538
540// @@protoc_insertion_point(class_specific_merge_from_start:operations_research.bop.BopOptimizerMethod)
541 GOOGLE_DCHECK_NE(&from, this);
542 uint32_t cached_has_bits = 0;
543 (void) cached_has_bits;
544
545 if (from._internal_has_type()) {
546 _internal_set_type(from._internal_type());
547 }
548 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
549}
550
552// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.bop.BopOptimizerMethod)
553 if (&from == this) return;
554 Clear();
555 MergeFrom(from);
556}
557
559 return true;
560}
561
562void BopOptimizerMethod::InternalSwap(BopOptimizerMethod* other) {
563 using std::swap;
564 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
565 swap(_has_bits_[0], other->_has_bits_[0]);
566 swap(type_, other->type_);
567}
568
569::PROTOBUF_NAMESPACE_ID::Metadata BopOptimizerMethod::GetMetadata() const {
570 return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
573}
574
575// ===================================================================
576
578 public:
579};
580
581BopSolverOptimizerSet::BopSolverOptimizerSet(::PROTOBUF_NAMESPACE_ID::Arena* arena,
582 bool is_message_owned)
583 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
584 methods_(arena) {
585 SharedCtor();
586 if (!is_message_owned) {
587 RegisterArenaDtor(arena);
588 }
589 // @@protoc_insertion_point(arena_constructor:operations_research.bop.BopSolverOptimizerSet)
590}
592 : ::PROTOBUF_NAMESPACE_ID::Message(),
593 methods_(from.methods_) {
594 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
595 // @@protoc_insertion_point(copy_constructor:operations_research.bop.BopSolverOptimizerSet)
596}
597
598inline void BopSolverOptimizerSet::SharedCtor() {
599}
600
602 // @@protoc_insertion_point(destructor:operations_research.bop.BopSolverOptimizerSet)
603 if (GetArenaForAllocation() != nullptr) return;
604 SharedDtor();
605 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
606}
607
608inline void BopSolverOptimizerSet::SharedDtor() {
609 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
610}
611
612void BopSolverOptimizerSet::ArenaDtor(void* object) {
613 BopSolverOptimizerSet* _this = reinterpret_cast< BopSolverOptimizerSet* >(object);
614 (void)_this;
615}
616void BopSolverOptimizerSet::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
617}
618void BopSolverOptimizerSet::SetCachedSize(int size) const {
619 _cached_size_.Set(size);
620}
621
623// @@protoc_insertion_point(message_clear_start:operations_research.bop.BopSolverOptimizerSet)
624 uint32_t cached_has_bits = 0;
625 // Prevent compiler warnings about cached_has_bits being unused
626 (void) cached_has_bits;
627
628 methods_.Clear();
629 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
630}
631
632const char* BopSolverOptimizerSet::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
633#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
634 while (!ctx->Done(&ptr)) {
635 uint32_t tag;
636 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
637 switch (tag >> 3) {
638 // repeated .operations_research.bop.BopOptimizerMethod methods = 1;
639 case 1:
640 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
641 ptr -= 1;
642 do {
643 ptr += 1;
644 ptr = ctx->ParseMessage(_internal_add_methods(), ptr);
645 CHK_(ptr);
646 if (!ctx->DataAvailable(ptr)) break;
647 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
648 } else
649 goto handle_unusual;
650 continue;
651 default:
652 goto handle_unusual;
653 } // switch
654 handle_unusual:
655 if ((tag == 0) || ((tag & 7) == 4)) {
656 CHK_(ptr);
657 ctx->SetLastTag(tag);
658 goto message_done;
659 }
660 ptr = UnknownFieldParse(
661 tag,
662 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
663 ptr, ctx);
664 CHK_(ptr != nullptr);
665 } // while
666message_done:
667 return ptr;
668failure:
669 ptr = nullptr;
670 goto message_done;
671#undef CHK_
672}
673
675 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
676 // @@protoc_insertion_point(serialize_to_array_start:operations_research.bop.BopSolverOptimizerSet)
677 uint32_t cached_has_bits = 0;
678 (void) cached_has_bits;
679
680 // repeated .operations_research.bop.BopOptimizerMethod methods = 1;
681 for (unsigned int i = 0,
682 n = static_cast<unsigned int>(this->_internal_methods_size()); i < n; i++) {
683 target = stream->EnsureSpace(target);
684 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
685 InternalWriteMessage(1, this->_internal_methods(i), target, stream);
686 }
687
688 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
689 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
690 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
691 }
692 // @@protoc_insertion_point(serialize_to_array_end:operations_research.bop.BopSolverOptimizerSet)
693 return target;
694}
695
697// @@protoc_insertion_point(message_byte_size_start:operations_research.bop.BopSolverOptimizerSet)
698 size_t total_size = 0;
699
700 uint32_t cached_has_bits = 0;
701 // Prevent compiler warnings about cached_has_bits being unused
702 (void) cached_has_bits;
703
704 // repeated .operations_research.bop.BopOptimizerMethod methods = 1;
705 total_size += 1UL * this->_internal_methods_size();
706 for (const auto& msg : this->methods_) {
707 total_size +=
708 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
709 }
710
711 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
712}
713
714const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BopSolverOptimizerSet::_class_data_ = {
715 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
716 BopSolverOptimizerSet::MergeImpl
717};
718const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BopSolverOptimizerSet::GetClassData() const { return &_class_data_; }
719
720void BopSolverOptimizerSet::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
721 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
722 static_cast<BopSolverOptimizerSet *>(to)->MergeFrom(
723 static_cast<const BopSolverOptimizerSet &>(from));
724}
725
726
728// @@protoc_insertion_point(class_specific_merge_from_start:operations_research.bop.BopSolverOptimizerSet)
729 GOOGLE_DCHECK_NE(&from, this);
730 uint32_t cached_has_bits = 0;
731 (void) cached_has_bits;
732
733 methods_.MergeFrom(from.methods_);
734 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
735}
736
738// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.bop.BopSolverOptimizerSet)
739 if (&from == this) return;
740 Clear();
741 MergeFrom(from);
742}
743
745 return true;
746}
747
748void BopSolverOptimizerSet::InternalSwap(BopSolverOptimizerSet* other) {
749 using std::swap;
750 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
751 methods_.InternalSwap(&other->methods_);
752}
753
754::PROTOBUF_NAMESPACE_ID::Metadata BopSolverOptimizerSet::GetMetadata() const {
755 return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
758}
759
760// ===================================================================
761
763 public:
764 using HasBits = decltype(std::declval<BopParameters>()._has_bits_);
765 static void set_has_max_time_in_seconds(HasBits* has_bits) {
766 (*has_bits)[0] |= 4096u;
767 }
769 (*has_bits)[0] |= 536870912u;
770 }
772 (*has_bits)[1] |= 8u;
773 }
775 (*has_bits)[0] |= 64u;
776 }
777 static void set_has_relative_gap_limit(HasBits* has_bits) {
778 (*has_bits)[0] |= 1073741824u;
779 }
781 (*has_bits)[0] |= 8192u;
782 }
784 (*has_bits)[1] |= 4u;
785 }
786 static void set_has_log_search_progress(HasBits* has_bits) {
787 (*has_bits)[0] |= 2u;
788 }
790 (*has_bits)[0] |= 131072u;
791 }
792 static void set_has_prune_search_tree(HasBits* has_bits) {
793 (*has_bits)[0] |= 4u;
794 }
796 (*has_bits)[0] |= 8u;
797 }
798 static void set_has_use_random_lns(HasBits* has_bits) {
799 (*has_bits)[0] |= 262144u;
800 }
801 static void set_has_random_seed(HasBits* has_bits) {
802 (*has_bits)[0] |= 16384u;
803 }
804 static void set_has_num_relaxed_vars(HasBits* has_bits) {
805 (*has_bits)[0] |= 32768u;
806 }
808 (*has_bits)[0] |= 65536u;
809 }
810 static void set_has_num_random_lns_tries(HasBits* has_bits) {
811 (*has_bits)[0] |= 2097152u;
812 }
814 (*has_bits)[0] |= 4194304u;
815 }
816 static void set_has_use_lp_lns(HasBits* has_bits) {
817 (*has_bits)[0] |= 524288u;
818 }
820 (*has_bits)[0] |= 1048576u;
821 }
823 (*has_bits)[0] |= 8388608u;
824 }
825 static void set_has_use_symmetry(HasBits* has_bits) {
826 (*has_bits)[0] |= 16u;
827 }
829 (*has_bits)[0] |= 128u;
830 }
832 (*has_bits)[0] |= 16777216u;
833 }
835 (*has_bits)[0] |= 33554432u;
836 }
838 (*has_bits)[0] |= 67108864u;
839 }
841 (*has_bits)[0] |= 256u;
842 }
844 (*has_bits)[0] |= 134217728u;
845 }
846 static void set_has_number_of_solvers(HasBits* has_bits) {
847 (*has_bits)[0] |= 268435456u;
848 }
849 static void set_has_synchronization_type(HasBits* has_bits) {
850 (*has_bits)[0] |= 32u;
851 }
853 (*has_bits)[0] |= 1u;
854 }
856 (*has_bits)[0] |= 512u;
857 }
859 (*has_bits)[0] |= 2147483648u;
860 }
862 (*has_bits)[1] |= 1u;
863 }
865 (*has_bits)[0] |= 1024u;
866 }
868 (*has_bits)[1] |= 2u;
869 }
871 (*has_bits)[0] |= 2048u;
872 }
873};
874
875const ::PROTOBUF_NAMESPACE_ID::internal::LazyString BopParameters::_i_give_permission_to_break_this_code_default_default_solver_optimizer_sets_{{{"methods:{type:LOCAL_SEARCH } methods:{type:RANDOM_FIRST_SOLUTION } methods:{type:LINEAR_RELAXATION } methods:{type:LP_FIRST_SOLUTION } methods:{type:OBJECTIVE_FIRST_SOLUTION } methods:{type:USER_GUIDED_FIRST_SOLUTION } methods:{type:RANDOM_CONSTRAINT_LNS_GUIDED_BY_LP } methods:{type:RANDOM_VARIABLE_LNS_GUIDED_BY_LP } methods:{type:RELATION_GRAPH_LNS } methods:{type:RELATION_GRAPH_LNS_GUIDED_BY_LP } methods:{type:RANDOM_CONSTRAINT_LNS } methods:{type:RANDOM_VARIABLE_LNS } methods:{type:SAT_CORE_BASED } methods:{type:COMPLETE_LNS } ", 714}}, {nullptr}};
876BopParameters::BopParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena,
877 bool is_message_owned)
878 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
879 solver_optimizer_sets_(arena) {
880 SharedCtor();
881 if (!is_message_owned) {
882 RegisterArenaDtor(arena);
883 }
884 // @@protoc_insertion_point(arena_constructor:operations_research.bop.BopParameters)
885}
887 : ::PROTOBUF_NAMESPACE_ID::Message(),
888 _has_bits_(from._has_bits_),
889 solver_optimizer_sets_(from.solver_optimizer_sets_) {
890 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
891 default_solver_optimizer_sets_.UnsafeSetDefault(nullptr);
892 if (from._internal_has_default_solver_optimizer_sets()) {
893 default_solver_optimizer_sets_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_default_solver_optimizer_sets(),
894 GetArenaForAllocation());
895 }
896 ::memcpy(&log_search_progress_, &from.log_search_progress_,
897 static_cast<size_t>(reinterpret_cast<char*>(&lp_max_deterministic_time_) -
898 reinterpret_cast<char*>(&log_search_progress_)) + sizeof(lp_max_deterministic_time_));
899 // @@protoc_insertion_point(copy_constructor:operations_research.bop.BopParameters)
900}
901
902inline void BopParameters::SharedCtor() {
903default_solver_optimizer_sets_.UnsafeSetDefault(nullptr);
904::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
905 reinterpret_cast<char*>(&log_search_progress_) - reinterpret_cast<char*>(this)),
906 0, static_cast<size_t>(reinterpret_cast<char*>(&max_lp_solve_for_feasibility_problems_) -
907 reinterpret_cast<char*>(&log_search_progress_)) + sizeof(max_lp_solve_for_feasibility_problems_));
908max_time_in_seconds_ = std::numeric_limits<double>::infinity();
909max_num_decisions_in_ls_ = 4;
910random_seed_ = 8;
911num_relaxed_vars_ = 10;
912max_number_of_conflicts_in_random_lns_ = 2500;
913compute_estimated_impact_ = true;
914use_random_lns_ = true;
915use_lp_lns_ = true;
916use_sat_to_choose_lns_neighbourhood_ = true;
917num_random_lns_tries_ = 1;
918max_number_of_backtracks_in_ls_ = int64_t{100000000};
919max_number_of_conflicts_for_quick_check_ = 10;
920max_number_of_conflicts_in_random_solution_generation_ = 500;
921max_number_of_explored_assignments_per_try_in_ls_ = int64_t{10000};
922use_transposition_table_in_ls_ = true;
923use_learned_binary_clauses_in_lp_ = true;
924number_of_solvers_ = 1;
925max_deterministic_time_ = std::numeric_limits<double>::infinity();
926relative_gap_limit_ = 0.0001;
927decomposer_num_variables_threshold_ = 50;
928num_bop_solvers_used_by_decomposition_ = 1;
929guided_sat_conflicts_chunk_ = 1000;
930max_num_broken_constraints_in_ls_ = 2147483647;
931lp_max_deterministic_time_ = 1;
932}
933
935 // @@protoc_insertion_point(destructor:operations_research.bop.BopParameters)
936 if (GetArenaForAllocation() != nullptr) return;
937 SharedDtor();
938 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
939}
940
941inline void BopParameters::SharedDtor() {
942 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
943 default_solver_optimizer_sets_.DestroyNoArena(nullptr);
944}
945
946void BopParameters::ArenaDtor(void* object) {
947 BopParameters* _this = reinterpret_cast< BopParameters* >(object);
948 (void)_this;
949}
950void BopParameters::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
951}
952void BopParameters::SetCachedSize(int size) const {
953 _cached_size_.Set(size);
954}
955
957// @@protoc_insertion_point(message_clear_start:operations_research.bop.BopParameters)
958 uint32_t cached_has_bits = 0;
959 // Prevent compiler warnings about cached_has_bits being unused
960 (void) cached_has_bits;
961
962 solver_optimizer_sets_.Clear();
963 cached_has_bits = _has_bits_[0];
964 if (cached_has_bits & 0x00000001u) {
965 default_solver_optimizer_sets_.ClearToDefault(::operations_research::bop::BopParameters::_i_give_permission_to_break_this_code_default_default_solver_optimizer_sets_, GetArenaForAllocation());
966 }
967 if (cached_has_bits & 0x000000feu) {
968 ::memset(&log_search_progress_, 0, static_cast<size_t>(
969 reinterpret_cast<char*>(&exploit_symmetry_in_sat_first_solution_) -
970 reinterpret_cast<char*>(&log_search_progress_)) + sizeof(exploit_symmetry_in_sat_first_solution_));
971 }
972 if (cached_has_bits & 0x0000ff00u) {
973 ::memset(&use_potential_one_flip_repairs_in_ls_, 0, static_cast<size_t>(
974 reinterpret_cast<char*>(&max_lp_solve_for_feasibility_problems_) -
975 reinterpret_cast<char*>(&use_potential_one_flip_repairs_in_ls_)) + sizeof(max_lp_solve_for_feasibility_problems_));
976 max_time_in_seconds_ = std::numeric_limits<double>::infinity();
977 max_num_decisions_in_ls_ = 4;
978 random_seed_ = 8;
979 num_relaxed_vars_ = 10;
980 }
981 if (cached_has_bits & 0x00ff0000u) {
982 max_number_of_conflicts_in_random_lns_ = 2500;
983 compute_estimated_impact_ = true;
984 use_random_lns_ = true;
985 use_lp_lns_ = true;
986 use_sat_to_choose_lns_neighbourhood_ = true;
987 num_random_lns_tries_ = 1;
988 max_number_of_backtracks_in_ls_ = int64_t{100000000};
989 max_number_of_conflicts_for_quick_check_ = 10;
990 }
991 if (cached_has_bits & 0xff000000u) {
992 max_number_of_conflicts_in_random_solution_generation_ = 500;
993 max_number_of_explored_assignments_per_try_in_ls_ = int64_t{10000};
994 use_transposition_table_in_ls_ = true;
995 use_learned_binary_clauses_in_lp_ = true;
996 number_of_solvers_ = 1;
997 max_deterministic_time_ = std::numeric_limits<double>::infinity();
998 relative_gap_limit_ = 0.0001;
999 decomposer_num_variables_threshold_ = 50;
1000 }
1001 cached_has_bits = _has_bits_[1];
1002 if (cached_has_bits & 0x0000000fu) {
1003 num_bop_solvers_used_by_decomposition_ = 1;
1004 guided_sat_conflicts_chunk_ = 1000;
1005 max_num_broken_constraints_in_ls_ = 2147483647;
1006 lp_max_deterministic_time_ = 1;
1007 }
1008 _has_bits_.Clear();
1009 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1010}
1011
1012const char* BopParameters::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1013#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1014 while (!ctx->Done(&ptr)) {
1015 uint32_t tag;
1016 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1017 switch (tag >> 3) {
1018 // optional double max_time_in_seconds = 1 [default = inf];
1019 case 1:
1020 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 9)) {
1022 max_time_in_seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
1023 ptr += sizeof(double);
1024 } else
1025 goto handle_unusual;
1026 continue;
1027 // optional int32 max_num_decisions_in_ls = 2 [default = 4];
1028 case 2:
1029 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
1031 max_num_decisions_in_ls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1032 CHK_(ptr);
1033 } else
1034 goto handle_unusual;
1035 continue;
1036 // optional bool compute_estimated_impact = 3 [default = true];
1037 case 3:
1038 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
1040 compute_estimated_impact_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1041 CHK_(ptr);
1042 } else
1043 goto handle_unusual;
1044 continue;
1045 // optional bool prune_search_tree = 4 [default = false];
1046 case 4:
1047 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
1049 prune_search_tree_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1050 CHK_(ptr);
1051 } else
1052 goto handle_unusual;
1053 continue;
1054 // optional bool sort_constraints_by_num_terms = 5 [default = false];
1055 case 5:
1056 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
1058 sort_constraints_by_num_terms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1059 CHK_(ptr);
1060 } else
1061 goto handle_unusual;
1062 continue;
1063 // optional bool use_random_lns = 6 [default = true];
1064 case 6:
1065 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
1067 use_random_lns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1068 CHK_(ptr);
1069 } else
1070 goto handle_unusual;
1071 continue;
1072 // optional int32 random_seed = 7 [default = 8];
1073 case 7:
1074 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
1075 _Internal::set_has_random_seed(&_has_bits_);
1076 random_seed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1077 CHK_(ptr);
1078 } else
1079 goto handle_unusual;
1080 continue;
1081 // optional int32 num_relaxed_vars = 8 [default = 10];
1082 case 8:
1083 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
1085 num_relaxed_vars_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1086 CHK_(ptr);
1087 } else
1088 goto handle_unusual;
1089 continue;
1090 // optional int32 max_number_of_conflicts_in_random_lns = 9 [default = 2500];
1091 case 9:
1092 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
1094 max_number_of_conflicts_in_random_lns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1095 CHK_(ptr);
1096 } else
1097 goto handle_unusual;
1098 continue;
1099 // optional int32 num_random_lns_tries = 10 [default = 1];
1100 case 10:
1101 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
1103 num_random_lns_tries_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1104 CHK_(ptr);
1105 } else
1106 goto handle_unusual;
1107 continue;
1108 // optional int64 max_number_of_backtracks_in_ls = 11 [default = 100000000];
1109 case 11:
1110 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
1112 max_number_of_backtracks_in_ls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1113 CHK_(ptr);
1114 } else
1115 goto handle_unusual;
1116 continue;
1117 // optional bool use_lp_lns = 12 [default = true];
1118 case 12:
1119 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
1120 _Internal::set_has_use_lp_lns(&_has_bits_);
1121 use_lp_lns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1122 CHK_(ptr);
1123 } else
1124 goto handle_unusual;
1125 continue;
1126 // optional bool log_search_progress = 14 [default = false];
1127 case 14:
1128 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
1130 log_search_progress_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1131 CHK_(ptr);
1132 } else
1133 goto handle_unusual;
1134 continue;
1135 // optional bool use_sat_to_choose_lns_neighbourhood = 15 [default = true];
1136 case 15:
1137 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 120)) {
1139 use_sat_to_choose_lns_neighbourhood_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1140 CHK_(ptr);
1141 } else
1142 goto handle_unusual;
1143 continue;
1144 // optional int32 max_number_of_conflicts_for_quick_check = 16 [default = 10];
1145 case 16:
1146 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) {
1148 max_number_of_conflicts_for_quick_check_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1149 CHK_(ptr);
1150 } else
1151 goto handle_unusual;
1152 continue;
1153 // optional bool use_symmetry = 17 [default = false];
1154 case 17:
1155 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
1157 use_symmetry_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1158 CHK_(ptr);
1159 } else
1160 goto handle_unusual;
1161 continue;
1162 // optional int32 max_number_of_conflicts_in_random_solution_generation = 20 [default = 500];
1163 case 20:
1164 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
1166 max_number_of_conflicts_in_random_solution_generation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1167 CHK_(ptr);
1168 } else
1169 goto handle_unusual;
1170 continue;
1171 // optional int64 max_number_of_explored_assignments_per_try_in_ls = 21 [default = 10000];
1172 case 21:
1173 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 168)) {
1175 max_number_of_explored_assignments_per_try_in_ls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1176 CHK_(ptr);
1177 } else
1178 goto handle_unusual;
1179 continue;
1180 // optional bool use_transposition_table_in_ls = 22 [default = true];
1181 case 22:
1182 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 176)) {
1184 use_transposition_table_in_ls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1185 CHK_(ptr);
1186 } else
1187 goto handle_unusual;
1188 continue;
1189 // optional bool use_learned_binary_clauses_in_lp = 23 [default = true];
1190 case 23:
1191 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 184)) {
1193 use_learned_binary_clauses_in_lp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1194 CHK_(ptr);
1195 } else
1196 goto handle_unusual;
1197 continue;
1198 // optional int32 number_of_solvers = 24 [default = 1];
1199 case 24:
1200 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 192)) {
1202 number_of_solvers_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1203 CHK_(ptr);
1204 } else
1205 goto handle_unusual;
1206 continue;
1207 // optional .operations_research.bop.BopParameters.ThreadSynchronizationType synchronization_type = 25 [default = NO_SYNCHRONIZATION];
1208 case 25:
1209 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 200)) {
1210 uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1211 CHK_(ptr);
1213 _internal_set_synchronization_type(static_cast<::operations_research::bop::BopParameters_ThreadSynchronizationType>(val));
1214 } else {
1215 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(25, val, mutable_unknown_fields());
1216 }
1217 } else
1218 goto handle_unusual;
1219 continue;
1220 // repeated .operations_research.bop.BopSolverOptimizerSet solver_optimizer_sets = 26;
1221 case 26:
1222 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 210)) {
1223 ptr -= 2;
1224 do {
1225 ptr += 2;
1226 ptr = ctx->ParseMessage(_internal_add_solver_optimizer_sets(), ptr);
1227 CHK_(ptr);
1228 if (!ctx->DataAvailable(ptr)) break;
1229 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<210>(ptr));
1230 } else
1231 goto handle_unusual;
1232 continue;
1233 // optional double max_deterministic_time = 27 [default = inf];
1234 case 27:
1235 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 217)) {
1237 max_deterministic_time_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
1238 ptr += sizeof(double);
1239 } else
1240 goto handle_unusual;
1241 continue;
1242 // optional double relative_gap_limit = 28 [default = 0.0001];
1243 case 28:
1244 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 225)) {
1246 relative_gap_limit_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
1247 ptr += sizeof(double);
1248 } else
1249 goto handle_unusual;
1250 continue;
1251 // optional bool use_lp_strong_branching = 29 [default = false];
1252 case 29:
1253 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 232)) {
1255 use_lp_strong_branching_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1256 CHK_(ptr);
1257 } else
1258 goto handle_unusual;
1259 continue;
1260 // optional int32 decomposer_num_variables_threshold = 30 [default = 50];
1261 case 30:
1262 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 240)) {
1264 decomposer_num_variables_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1265 CHK_(ptr);
1266 } else
1267 goto handle_unusual;
1268 continue;
1269 // optional int32 num_bop_solvers_used_by_decomposition = 31 [default = 1];
1270 case 31:
1271 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 248)) {
1273 num_bop_solvers_used_by_decomposition_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1274 CHK_(ptr);
1275 } else
1276 goto handle_unusual;
1277 continue;
1278 // optional string default_solver_optimizer_sets = 33 [default = "methods:{type:LOCAL_SEARCH } methods:{type:RANDOM_FIRST_SOLUTION } methods:{type:LINEAR_RELAXATION } methods:{type:LP_FIRST_SOLUTION } methods:{type:OBJECTIVE_FIRST_SOLUTION } methods:{type:USER_GUIDED_FIRST_SOLUTION } methods:{type:RANDOM_CONSTRAINT_LNS_GUIDED_BY_LP } methods:{type:RANDOM_VARIABLE_LNS_GUIDED_BY_LP } methods:{type:RELATION_GRAPH_LNS } methods:{type:RELATION_GRAPH_LNS_GUIDED_BY_LP } methods:{type:RANDOM_CONSTRAINT_LNS } methods:{type:RANDOM_VARIABLE_LNS } methods:{type:SAT_CORE_BASED } methods:{type:COMPLETE_LNS } "];
1279 case 33:
1280 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
1281 auto str = _internal_mutable_default_solver_optimizer_sets();
1282 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
1283 #ifndef NDEBUG
1284 ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "operations_research.bop.BopParameters.default_solver_optimizer_sets");
1285 #endif // !NDEBUG
1286 CHK_(ptr);
1287 } else
1288 goto handle_unusual;
1289 continue;
1290 // optional int32 guided_sat_conflicts_chunk = 34 [default = 1000];
1291 case 34:
1292 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
1294 guided_sat_conflicts_chunk_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1295 CHK_(ptr);
1296 } else
1297 goto handle_unusual;
1298 continue;
1299 // optional int32 max_number_of_consecutive_failing_optimizer_calls = 35;
1300 case 35:
1301 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
1303 max_number_of_consecutive_failing_optimizer_calls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1304 CHK_(ptr);
1305 } else
1306 goto handle_unusual;
1307 continue;
1308 // optional double decomposed_problem_min_time_in_seconds = 36 [default = 0];
1309 case 36:
1310 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 33)) {
1312 decomposed_problem_min_time_in_seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
1313 ptr += sizeof(double);
1314 } else
1315 goto handle_unusual;
1316 continue;
1317 // optional double lp_max_deterministic_time = 37 [default = 1];
1318 case 37:
1319 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 41)) {
1321 lp_max_deterministic_time_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
1322 ptr += sizeof(double);
1323 } else
1324 goto handle_unusual;
1325 continue;
1326 // optional int32 max_num_broken_constraints_in_ls = 38 [default = 2147483647];
1327 case 38:
1328 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
1330 max_num_broken_constraints_in_ls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1331 CHK_(ptr);
1332 } else
1333 goto handle_unusual;
1334 continue;
1335 // optional bool use_potential_one_flip_repairs_in_ls = 39 [default = false];
1336 case 39:
1337 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
1339 use_potential_one_flip_repairs_in_ls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1340 CHK_(ptr);
1341 } else
1342 goto handle_unusual;
1343 continue;
1344 // optional bool exploit_symmetry_in_sat_first_solution = 40 [default = false];
1345 case 40:
1346 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
1348 exploit_symmetry_in_sat_first_solution_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1349 CHK_(ptr);
1350 } else
1351 goto handle_unusual;
1352 continue;
1353 // optional int32 max_lp_solve_for_feasibility_problems = 41 [default = 0];
1354 case 41:
1355 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
1357 max_lp_solve_for_feasibility_problems_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1358 CHK_(ptr);
1359 } else
1360 goto handle_unusual;
1361 continue;
1362 default:
1363 goto handle_unusual;
1364 } // switch
1365 handle_unusual:
1366 if ((tag == 0) || ((tag & 7) == 4)) {
1367 CHK_(ptr);
1368 ctx->SetLastTag(tag);
1369 goto message_done;
1370 }
1371 ptr = UnknownFieldParse(
1372 tag,
1373 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
1374 ptr, ctx);
1375 CHK_(ptr != nullptr);
1376 } // while
1377message_done:
1378 return ptr;
1379failure:
1380 ptr = nullptr;
1381 goto message_done;
1382#undef CHK_
1383}
1384
1386 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1387 // @@protoc_insertion_point(serialize_to_array_start:operations_research.bop.BopParameters)
1388 uint32_t cached_has_bits = 0;
1389 (void) cached_has_bits;
1390
1391 cached_has_bits = _has_bits_[0];
1392 // optional double max_time_in_seconds = 1 [default = inf];
1393 if (cached_has_bits & 0x00001000u) {
1394 target = stream->EnsureSpace(target);
1395 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(1, this->_internal_max_time_in_seconds(), target);
1396 }
1397
1398 // optional int32 max_num_decisions_in_ls = 2 [default = 4];
1399 if (cached_has_bits & 0x00002000u) {
1400 target = stream->EnsureSpace(target);
1401 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_max_num_decisions_in_ls(), target);
1402 }
1403
1404 // optional bool compute_estimated_impact = 3 [default = true];
1405 if (cached_has_bits & 0x00020000u) {
1406 target = stream->EnsureSpace(target);
1407 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_compute_estimated_impact(), target);
1408 }
1409
1410 // optional bool prune_search_tree = 4 [default = false];
1411 if (cached_has_bits & 0x00000004u) {
1412 target = stream->EnsureSpace(target);
1413 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_prune_search_tree(), target);
1414 }
1415
1416 // optional bool sort_constraints_by_num_terms = 5 [default = false];
1417 if (cached_has_bits & 0x00000008u) {
1418 target = stream->EnsureSpace(target);
1419 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_sort_constraints_by_num_terms(), target);
1420 }
1421
1422 // optional bool use_random_lns = 6 [default = true];
1423 if (cached_has_bits & 0x00040000u) {
1424 target = stream->EnsureSpace(target);
1425 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_use_random_lns(), target);
1426 }
1427
1428 // optional int32 random_seed = 7 [default = 8];
1429 if (cached_has_bits & 0x00004000u) {
1430 target = stream->EnsureSpace(target);
1431 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_random_seed(), target);
1432 }
1433
1434 // optional int32 num_relaxed_vars = 8 [default = 10];
1435 if (cached_has_bits & 0x00008000u) {
1436 target = stream->EnsureSpace(target);
1437 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(8, this->_internal_num_relaxed_vars(), target);
1438 }
1439
1440 // optional int32 max_number_of_conflicts_in_random_lns = 9 [default = 2500];
1441 if (cached_has_bits & 0x00010000u) {
1442 target = stream->EnsureSpace(target);
1443 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(9, this->_internal_max_number_of_conflicts_in_random_lns(), target);
1444 }
1445
1446 // optional int32 num_random_lns_tries = 10 [default = 1];
1447 if (cached_has_bits & 0x00200000u) {
1448 target = stream->EnsureSpace(target);
1449 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(10, this->_internal_num_random_lns_tries(), target);
1450 }
1451
1452 // optional int64 max_number_of_backtracks_in_ls = 11 [default = 100000000];
1453 if (cached_has_bits & 0x00400000u) {
1454 target = stream->EnsureSpace(target);
1455 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(11, this->_internal_max_number_of_backtracks_in_ls(), target);
1456 }
1457
1458 // optional bool use_lp_lns = 12 [default = true];
1459 if (cached_has_bits & 0x00080000u) {
1460 target = stream->EnsureSpace(target);
1461 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_use_lp_lns(), target);
1462 }
1463
1464 // optional bool log_search_progress = 14 [default = false];
1465 if (cached_has_bits & 0x00000002u) {
1466 target = stream->EnsureSpace(target);
1467 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->_internal_log_search_progress(), target);
1468 }
1469
1470 // optional bool use_sat_to_choose_lns_neighbourhood = 15 [default = true];
1471 if (cached_has_bits & 0x00100000u) {
1472 target = stream->EnsureSpace(target);
1473 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(15, this->_internal_use_sat_to_choose_lns_neighbourhood(), target);
1474 }
1475
1476 // optional int32 max_number_of_conflicts_for_quick_check = 16 [default = 10];
1477 if (cached_has_bits & 0x00800000u) {
1478 target = stream->EnsureSpace(target);
1479 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(16, this->_internal_max_number_of_conflicts_for_quick_check(), target);
1480 }
1481
1482 // optional bool use_symmetry = 17 [default = false];
1483 if (cached_has_bits & 0x00000010u) {
1484 target = stream->EnsureSpace(target);
1485 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_use_symmetry(), target);
1486 }
1487
1488 // optional int32 max_number_of_conflicts_in_random_solution_generation = 20 [default = 500];
1489 if (cached_has_bits & 0x01000000u) {
1490 target = stream->EnsureSpace(target);
1491 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(20, this->_internal_max_number_of_conflicts_in_random_solution_generation(), target);
1492 }
1493
1494 // optional int64 max_number_of_explored_assignments_per_try_in_ls = 21 [default = 10000];
1495 if (cached_has_bits & 0x02000000u) {
1496 target = stream->EnsureSpace(target);
1497 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(21, this->_internal_max_number_of_explored_assignments_per_try_in_ls(), target);
1498 }
1499
1500 // optional bool use_transposition_table_in_ls = 22 [default = true];
1501 if (cached_has_bits & 0x04000000u) {
1502 target = stream->EnsureSpace(target);
1503 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(22, this->_internal_use_transposition_table_in_ls(), target);
1504 }
1505
1506 // optional bool use_learned_binary_clauses_in_lp = 23 [default = true];
1507 if (cached_has_bits & 0x08000000u) {
1508 target = stream->EnsureSpace(target);
1509 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_use_learned_binary_clauses_in_lp(), target);
1510 }
1511
1512 // optional int32 number_of_solvers = 24 [default = 1];
1513 if (cached_has_bits & 0x10000000u) {
1514 target = stream->EnsureSpace(target);
1515 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(24, this->_internal_number_of_solvers(), target);
1516 }
1517
1518 // optional .operations_research.bop.BopParameters.ThreadSynchronizationType synchronization_type = 25 [default = NO_SYNCHRONIZATION];
1519 if (cached_has_bits & 0x00000020u) {
1520 target = stream->EnsureSpace(target);
1521 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1522 25, this->_internal_synchronization_type(), target);
1523 }
1524
1525 // repeated .operations_research.bop.BopSolverOptimizerSet solver_optimizer_sets = 26;
1526 for (unsigned int i = 0,
1527 n = static_cast<unsigned int>(this->_internal_solver_optimizer_sets_size()); i < n; i++) {
1528 target = stream->EnsureSpace(target);
1529 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1530 InternalWriteMessage(26, this->_internal_solver_optimizer_sets(i), target, stream);
1531 }
1532
1533 // optional double max_deterministic_time = 27 [default = inf];
1534 if (cached_has_bits & 0x20000000u) {
1535 target = stream->EnsureSpace(target);
1536 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(27, this->_internal_max_deterministic_time(), target);
1537 }
1538
1539 // optional double relative_gap_limit = 28 [default = 0.0001];
1540 if (cached_has_bits & 0x40000000u) {
1541 target = stream->EnsureSpace(target);
1542 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(28, this->_internal_relative_gap_limit(), target);
1543 }
1544
1545 // optional bool use_lp_strong_branching = 29 [default = false];
1546 if (cached_has_bits & 0x00000200u) {
1547 target = stream->EnsureSpace(target);
1548 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(29, this->_internal_use_lp_strong_branching(), target);
1549 }
1550
1551 // optional int32 decomposer_num_variables_threshold = 30 [default = 50];
1552 if (cached_has_bits & 0x80000000u) {
1553 target = stream->EnsureSpace(target);
1554 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(30, this->_internal_decomposer_num_variables_threshold(), target);
1555 }
1556
1557 cached_has_bits = _has_bits_[1];
1558 // optional int32 num_bop_solvers_used_by_decomposition = 31 [default = 1];
1559 if (cached_has_bits & 0x00000001u) {
1560 target = stream->EnsureSpace(target);
1561 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(31, this->_internal_num_bop_solvers_used_by_decomposition(), target);
1562 }
1563
1564 cached_has_bits = _has_bits_[0];
1565 // optional string default_solver_optimizer_sets = 33 [default = "methods:{type:LOCAL_SEARCH } methods:{type:RANDOM_FIRST_SOLUTION } methods:{type:LINEAR_RELAXATION } methods:{type:LP_FIRST_SOLUTION } methods:{type:OBJECTIVE_FIRST_SOLUTION } methods:{type:USER_GUIDED_FIRST_SOLUTION } methods:{type:RANDOM_CONSTRAINT_LNS_GUIDED_BY_LP } methods:{type:RANDOM_VARIABLE_LNS_GUIDED_BY_LP } methods:{type:RELATION_GRAPH_LNS } methods:{type:RELATION_GRAPH_LNS_GUIDED_BY_LP } methods:{type:RANDOM_CONSTRAINT_LNS } methods:{type:RANDOM_VARIABLE_LNS } methods:{type:SAT_CORE_BASED } methods:{type:COMPLETE_LNS } "];
1566 if (cached_has_bits & 0x00000001u) {
1567 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1568 this->_internal_default_solver_optimizer_sets().data(), static_cast<int>(this->_internal_default_solver_optimizer_sets().length()),
1569 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
1570 "operations_research.bop.BopParameters.default_solver_optimizer_sets");
1571 target = stream->WriteStringMaybeAliased(
1572 33, this->_internal_default_solver_optimizer_sets(), target);
1573 }
1574
1575 cached_has_bits = _has_bits_[1];
1576 // optional int32 guided_sat_conflicts_chunk = 34 [default = 1000];
1577 if (cached_has_bits & 0x00000002u) {
1578 target = stream->EnsureSpace(target);
1579 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(34, this->_internal_guided_sat_conflicts_chunk(), target);
1580 }
1581
1582 cached_has_bits = _has_bits_[0];
1583 // optional int32 max_number_of_consecutive_failing_optimizer_calls = 35;
1584 if (cached_has_bits & 0x00000040u) {
1585 target = stream->EnsureSpace(target);
1586 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(35, this->_internal_max_number_of_consecutive_failing_optimizer_calls(), target);
1587 }
1588
1589 // optional double decomposed_problem_min_time_in_seconds = 36 [default = 0];
1590 if (cached_has_bits & 0x00000400u) {
1591 target = stream->EnsureSpace(target);
1592 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(36, this->_internal_decomposed_problem_min_time_in_seconds(), target);
1593 }
1594
1595 cached_has_bits = _has_bits_[1];
1596 // optional double lp_max_deterministic_time = 37 [default = 1];
1597 if (cached_has_bits & 0x00000008u) {
1598 target = stream->EnsureSpace(target);
1599 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(37, this->_internal_lp_max_deterministic_time(), target);
1600 }
1601
1602 // optional int32 max_num_broken_constraints_in_ls = 38 [default = 2147483647];
1603 if (cached_has_bits & 0x00000004u) {
1604 target = stream->EnsureSpace(target);
1605 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(38, this->_internal_max_num_broken_constraints_in_ls(), target);
1606 }
1607
1608 cached_has_bits = _has_bits_[0];
1609 // optional bool use_potential_one_flip_repairs_in_ls = 39 [default = false];
1610 if (cached_has_bits & 0x00000100u) {
1611 target = stream->EnsureSpace(target);
1612 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(39, this->_internal_use_potential_one_flip_repairs_in_ls(), target);
1613 }
1614
1615 // optional bool exploit_symmetry_in_sat_first_solution = 40 [default = false];
1616 if (cached_has_bits & 0x00000080u) {
1617 target = stream->EnsureSpace(target);
1618 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(40, this->_internal_exploit_symmetry_in_sat_first_solution(), target);
1619 }
1620
1621 // optional int32 max_lp_solve_for_feasibility_problems = 41 [default = 0];
1622 if (cached_has_bits & 0x00000800u) {
1623 target = stream->EnsureSpace(target);
1624 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(41, this->_internal_max_lp_solve_for_feasibility_problems(), target);
1625 }
1626
1627 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1628 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
1629 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
1630 }
1631 // @@protoc_insertion_point(serialize_to_array_end:operations_research.bop.BopParameters)
1632 return target;
1633}
1634
1636// @@protoc_insertion_point(message_byte_size_start:operations_research.bop.BopParameters)
1637 size_t total_size = 0;
1638
1639 uint32_t cached_has_bits = 0;
1640 // Prevent compiler warnings about cached_has_bits being unused
1641 (void) cached_has_bits;
1642
1643 // repeated .operations_research.bop.BopSolverOptimizerSet solver_optimizer_sets = 26;
1644 total_size += 2UL * this->_internal_solver_optimizer_sets_size();
1645 for (const auto& msg : this->solver_optimizer_sets_) {
1646 total_size +=
1647 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1648 }
1649
1650 cached_has_bits = _has_bits_[0];
1651 if (cached_has_bits & 0x000000ffu) {
1652 // optional string default_solver_optimizer_sets = 33 [default = "methods:{type:LOCAL_SEARCH } methods:{type:RANDOM_FIRST_SOLUTION } methods:{type:LINEAR_RELAXATION } methods:{type:LP_FIRST_SOLUTION } methods:{type:OBJECTIVE_FIRST_SOLUTION } methods:{type:USER_GUIDED_FIRST_SOLUTION } methods:{type:RANDOM_CONSTRAINT_LNS_GUIDED_BY_LP } methods:{type:RANDOM_VARIABLE_LNS_GUIDED_BY_LP } methods:{type:RELATION_GRAPH_LNS } methods:{type:RELATION_GRAPH_LNS_GUIDED_BY_LP } methods:{type:RANDOM_CONSTRAINT_LNS } methods:{type:RANDOM_VARIABLE_LNS } methods:{type:SAT_CORE_BASED } methods:{type:COMPLETE_LNS } "];
1653 if (cached_has_bits & 0x00000001u) {
1654 total_size += 2 +
1655 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1656 this->_internal_default_solver_optimizer_sets());
1657 }
1658
1659 // optional bool log_search_progress = 14 [default = false];
1660 if (cached_has_bits & 0x00000002u) {
1661 total_size += 1 + 1;
1662 }
1663
1664 // optional bool prune_search_tree = 4 [default = false];
1665 if (cached_has_bits & 0x00000004u) {
1666 total_size += 1 + 1;
1667 }
1668
1669 // optional bool sort_constraints_by_num_terms = 5 [default = false];
1670 if (cached_has_bits & 0x00000008u) {
1671 total_size += 1 + 1;
1672 }
1673
1674 // optional bool use_symmetry = 17 [default = false];
1675 if (cached_has_bits & 0x00000010u) {
1676 total_size += 2 + 1;
1677 }
1678
1679 // optional .operations_research.bop.BopParameters.ThreadSynchronizationType synchronization_type = 25 [default = NO_SYNCHRONIZATION];
1680 if (cached_has_bits & 0x00000020u) {
1681 total_size += 2 +
1682 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_synchronization_type());
1683 }
1684
1685 // optional int32 max_number_of_consecutive_failing_optimizer_calls = 35;
1686 if (cached_has_bits & 0x00000040u) {
1687 total_size += 2 +
1688 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1689 this->_internal_max_number_of_consecutive_failing_optimizer_calls());
1690 }
1691
1692 // optional bool exploit_symmetry_in_sat_first_solution = 40 [default = false];
1693 if (cached_has_bits & 0x00000080u) {
1694 total_size += 2 + 1;
1695 }
1696
1697 }
1698 if (cached_has_bits & 0x0000ff00u) {
1699 // optional bool use_potential_one_flip_repairs_in_ls = 39 [default = false];
1700 if (cached_has_bits & 0x00000100u) {
1701 total_size += 2 + 1;
1702 }
1703
1704 // optional bool use_lp_strong_branching = 29 [default = false];
1705 if (cached_has_bits & 0x00000200u) {
1706 total_size += 2 + 1;
1707 }
1708
1709 // optional double decomposed_problem_min_time_in_seconds = 36 [default = 0];
1710 if (cached_has_bits & 0x00000400u) {
1711 total_size += 2 + 8;
1712 }
1713
1714 // optional int32 max_lp_solve_for_feasibility_problems = 41 [default = 0];
1715 if (cached_has_bits & 0x00000800u) {
1716 total_size += 2 +
1717 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1718 this->_internal_max_lp_solve_for_feasibility_problems());
1719 }
1720
1721 // optional double max_time_in_seconds = 1 [default = inf];
1722 if (cached_has_bits & 0x00001000u) {
1723 total_size += 1 + 8;
1724 }
1725
1726 // optional int32 max_num_decisions_in_ls = 2 [default = 4];
1727 if (cached_has_bits & 0x00002000u) {
1728 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_max_num_decisions_in_ls());
1729 }
1730
1731 // optional int32 random_seed = 7 [default = 8];
1732 if (cached_has_bits & 0x00004000u) {
1733 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_random_seed());
1734 }
1735
1736 // optional int32 num_relaxed_vars = 8 [default = 10];
1737 if (cached_has_bits & 0x00008000u) {
1738 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_num_relaxed_vars());
1739 }
1740
1741 }
1742 if (cached_has_bits & 0x00ff0000u) {
1743 // optional int32 max_number_of_conflicts_in_random_lns = 9 [default = 2500];
1744 if (cached_has_bits & 0x00010000u) {
1745 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_max_number_of_conflicts_in_random_lns());
1746 }
1747
1748 // optional bool compute_estimated_impact = 3 [default = true];
1749 if (cached_has_bits & 0x00020000u) {
1750 total_size += 1 + 1;
1751 }
1752
1753 // optional bool use_random_lns = 6 [default = true];
1754 if (cached_has_bits & 0x00040000u) {
1755 total_size += 1 + 1;
1756 }
1757
1758 // optional bool use_lp_lns = 12 [default = true];
1759 if (cached_has_bits & 0x00080000u) {
1760 total_size += 1 + 1;
1761 }
1762
1763 // optional bool use_sat_to_choose_lns_neighbourhood = 15 [default = true];
1764 if (cached_has_bits & 0x00100000u) {
1765 total_size += 1 + 1;
1766 }
1767
1768 // optional int32 num_random_lns_tries = 10 [default = 1];
1769 if (cached_has_bits & 0x00200000u) {
1770 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_num_random_lns_tries());
1771 }
1772
1773 // optional int64 max_number_of_backtracks_in_ls = 11 [default = 100000000];
1774 if (cached_has_bits & 0x00400000u) {
1775 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_max_number_of_backtracks_in_ls());
1776 }
1777
1778 // optional int32 max_number_of_conflicts_for_quick_check = 16 [default = 10];
1779 if (cached_has_bits & 0x00800000u) {
1780 total_size += 2 +
1781 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1782 this->_internal_max_number_of_conflicts_for_quick_check());
1783 }
1784
1785 }
1786 if (cached_has_bits & 0xff000000u) {
1787 // optional int32 max_number_of_conflicts_in_random_solution_generation = 20 [default = 500];
1788 if (cached_has_bits & 0x01000000u) {
1789 total_size += 2 +
1790 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1791 this->_internal_max_number_of_conflicts_in_random_solution_generation());
1792 }
1793
1794 // optional int64 max_number_of_explored_assignments_per_try_in_ls = 21 [default = 10000];
1795 if (cached_has_bits & 0x02000000u) {
1796 total_size += 2 +
1797 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1798 this->_internal_max_number_of_explored_assignments_per_try_in_ls());
1799 }
1800
1801 // optional bool use_transposition_table_in_ls = 22 [default = true];
1802 if (cached_has_bits & 0x04000000u) {
1803 total_size += 2 + 1;
1804 }
1805
1806 // optional bool use_learned_binary_clauses_in_lp = 23 [default = true];
1807 if (cached_has_bits & 0x08000000u) {
1808 total_size += 2 + 1;
1809 }
1810
1811 // optional int32 number_of_solvers = 24 [default = 1];
1812 if (cached_has_bits & 0x10000000u) {
1813 total_size += 2 +
1814 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1815 this->_internal_number_of_solvers());
1816 }
1817
1818 // optional double max_deterministic_time = 27 [default = inf];
1819 if (cached_has_bits & 0x20000000u) {
1820 total_size += 2 + 8;
1821 }
1822
1823 // optional double relative_gap_limit = 28 [default = 0.0001];
1824 if (cached_has_bits & 0x40000000u) {
1825 total_size += 2 + 8;
1826 }
1827
1828 // optional int32 decomposer_num_variables_threshold = 30 [default = 50];
1829 if (cached_has_bits & 0x80000000u) {
1830 total_size += 2 +
1831 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1832 this->_internal_decomposer_num_variables_threshold());
1833 }
1834
1835 }
1836 cached_has_bits = _has_bits_[1];
1837 if (cached_has_bits & 0x0000000fu) {
1838 // optional int32 num_bop_solvers_used_by_decomposition = 31 [default = 1];
1839 if (cached_has_bits & 0x00000001u) {
1840 total_size += 2 +
1841 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1842 this->_internal_num_bop_solvers_used_by_decomposition());
1843 }
1844
1845 // optional int32 guided_sat_conflicts_chunk = 34 [default = 1000];
1846 if (cached_has_bits & 0x00000002u) {
1847 total_size += 2 +
1848 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1849 this->_internal_guided_sat_conflicts_chunk());
1850 }
1851
1852 // optional int32 max_num_broken_constraints_in_ls = 38 [default = 2147483647];
1853 if (cached_has_bits & 0x00000004u) {
1854 total_size += 2 +
1855 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1856 this->_internal_max_num_broken_constraints_in_ls());
1857 }
1858
1859 // optional double lp_max_deterministic_time = 37 [default = 1];
1860 if (cached_has_bits & 0x00000008u) {
1861 total_size += 2 + 8;
1862 }
1863
1864 }
1865 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
1866}
1867
1868const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BopParameters::_class_data_ = {
1869 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
1870 BopParameters::MergeImpl
1871};
1872const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BopParameters::GetClassData() const { return &_class_data_; }
1873
1874void BopParameters::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
1875 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1876 static_cast<BopParameters *>(to)->MergeFrom(
1877 static_cast<const BopParameters &>(from));
1878}
1879
1880
1882// @@protoc_insertion_point(class_specific_merge_from_start:operations_research.bop.BopParameters)
1883 GOOGLE_DCHECK_NE(&from, this);
1884 uint32_t cached_has_bits = 0;
1885 (void) cached_has_bits;
1886
1887 solver_optimizer_sets_.MergeFrom(from.solver_optimizer_sets_);
1888 cached_has_bits = from._has_bits_[0];
1889 if (cached_has_bits & 0x000000ffu) {
1890 if (cached_has_bits & 0x00000001u) {
1891 _internal_set_default_solver_optimizer_sets(from._internal_default_solver_optimizer_sets());
1892 }
1893 if (cached_has_bits & 0x00000002u) {
1894 log_search_progress_ = from.log_search_progress_;
1895 }
1896 if (cached_has_bits & 0x00000004u) {
1897 prune_search_tree_ = from.prune_search_tree_;
1898 }
1899 if (cached_has_bits & 0x00000008u) {
1900 sort_constraints_by_num_terms_ = from.sort_constraints_by_num_terms_;
1901 }
1902 if (cached_has_bits & 0x00000010u) {
1903 use_symmetry_ = from.use_symmetry_;
1904 }
1905 if (cached_has_bits & 0x00000020u) {
1906 synchronization_type_ = from.synchronization_type_;
1907 }
1908 if (cached_has_bits & 0x00000040u) {
1909 max_number_of_consecutive_failing_optimizer_calls_ = from.max_number_of_consecutive_failing_optimizer_calls_;
1910 }
1911 if (cached_has_bits & 0x00000080u) {
1912 exploit_symmetry_in_sat_first_solution_ = from.exploit_symmetry_in_sat_first_solution_;
1913 }
1914 _has_bits_[0] |= cached_has_bits;
1915 }
1916 if (cached_has_bits & 0x0000ff00u) {
1917 if (cached_has_bits & 0x00000100u) {
1918 use_potential_one_flip_repairs_in_ls_ = from.use_potential_one_flip_repairs_in_ls_;
1919 }
1920 if (cached_has_bits & 0x00000200u) {
1921 use_lp_strong_branching_ = from.use_lp_strong_branching_;
1922 }
1923 if (cached_has_bits & 0x00000400u) {
1924 decomposed_problem_min_time_in_seconds_ = from.decomposed_problem_min_time_in_seconds_;
1925 }
1926 if (cached_has_bits & 0x00000800u) {
1927 max_lp_solve_for_feasibility_problems_ = from.max_lp_solve_for_feasibility_problems_;
1928 }
1929 if (cached_has_bits & 0x00001000u) {
1930 max_time_in_seconds_ = from.max_time_in_seconds_;
1931 }
1932 if (cached_has_bits & 0x00002000u) {
1933 max_num_decisions_in_ls_ = from.max_num_decisions_in_ls_;
1934 }
1935 if (cached_has_bits & 0x00004000u) {
1936 random_seed_ = from.random_seed_;
1937 }
1938 if (cached_has_bits & 0x00008000u) {
1939 num_relaxed_vars_ = from.num_relaxed_vars_;
1940 }
1941 _has_bits_[0] |= cached_has_bits;
1942 }
1943 if (cached_has_bits & 0x00ff0000u) {
1944 if (cached_has_bits & 0x00010000u) {
1945 max_number_of_conflicts_in_random_lns_ = from.max_number_of_conflicts_in_random_lns_;
1946 }
1947 if (cached_has_bits & 0x00020000u) {
1948 compute_estimated_impact_ = from.compute_estimated_impact_;
1949 }
1950 if (cached_has_bits & 0x00040000u) {
1951 use_random_lns_ = from.use_random_lns_;
1952 }
1953 if (cached_has_bits & 0x00080000u) {
1954 use_lp_lns_ = from.use_lp_lns_;
1955 }
1956 if (cached_has_bits & 0x00100000u) {
1957 use_sat_to_choose_lns_neighbourhood_ = from.use_sat_to_choose_lns_neighbourhood_;
1958 }
1959 if (cached_has_bits & 0x00200000u) {
1960 num_random_lns_tries_ = from.num_random_lns_tries_;
1961 }
1962 if (cached_has_bits & 0x00400000u) {
1963 max_number_of_backtracks_in_ls_ = from.max_number_of_backtracks_in_ls_;
1964 }
1965 if (cached_has_bits & 0x00800000u) {
1966 max_number_of_conflicts_for_quick_check_ = from.max_number_of_conflicts_for_quick_check_;
1967 }
1968 _has_bits_[0] |= cached_has_bits;
1969 }
1970 if (cached_has_bits & 0xff000000u) {
1971 if (cached_has_bits & 0x01000000u) {
1972 max_number_of_conflicts_in_random_solution_generation_ = from.max_number_of_conflicts_in_random_solution_generation_;
1973 }
1974 if (cached_has_bits & 0x02000000u) {
1975 max_number_of_explored_assignments_per_try_in_ls_ = from.max_number_of_explored_assignments_per_try_in_ls_;
1976 }
1977 if (cached_has_bits & 0x04000000u) {
1978 use_transposition_table_in_ls_ = from.use_transposition_table_in_ls_;
1979 }
1980 if (cached_has_bits & 0x08000000u) {
1981 use_learned_binary_clauses_in_lp_ = from.use_learned_binary_clauses_in_lp_;
1982 }
1983 if (cached_has_bits & 0x10000000u) {
1984 number_of_solvers_ = from.number_of_solvers_;
1985 }
1986 if (cached_has_bits & 0x20000000u) {
1987 max_deterministic_time_ = from.max_deterministic_time_;
1988 }
1989 if (cached_has_bits & 0x40000000u) {
1990 relative_gap_limit_ = from.relative_gap_limit_;
1991 }
1992 if (cached_has_bits & 0x80000000u) {
1993 decomposer_num_variables_threshold_ = from.decomposer_num_variables_threshold_;
1994 }
1995 _has_bits_[0] |= cached_has_bits;
1996 }
1997 cached_has_bits = from._has_bits_[1];
1998 if (cached_has_bits & 0x0000000fu) {
1999 if (cached_has_bits & 0x00000001u) {
2000 num_bop_solvers_used_by_decomposition_ = from.num_bop_solvers_used_by_decomposition_;
2001 }
2002 if (cached_has_bits & 0x00000002u) {
2003 guided_sat_conflicts_chunk_ = from.guided_sat_conflicts_chunk_;
2004 }
2005 if (cached_has_bits & 0x00000004u) {
2006 max_num_broken_constraints_in_ls_ = from.max_num_broken_constraints_in_ls_;
2007 }
2008 if (cached_has_bits & 0x00000008u) {
2009 lp_max_deterministic_time_ = from.lp_max_deterministic_time_;
2010 }
2011 _has_bits_[1] |= cached_has_bits;
2012 }
2013 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
2014}
2015
2017// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.bop.BopParameters)
2018 if (&from == this) return;
2019 Clear();
2020 MergeFrom(from);
2021}
2022
2024 return true;
2025}
2026
2027void BopParameters::InternalSwap(BopParameters* other) {
2028 using std::swap;
2029 auto* lhs_arena = GetArenaForAllocation();
2030 auto* rhs_arena = other->GetArenaForAllocation();
2031 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2032 swap(_has_bits_[0], other->_has_bits_[0]);
2033 swap(_has_bits_[1], other->_has_bits_[1]);
2034 solver_optimizer_sets_.InternalSwap(&other->solver_optimizer_sets_);
2035 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2036 nullptr,
2037 &default_solver_optimizer_sets_, lhs_arena,
2038 &other->default_solver_optimizer_sets_, rhs_arena
2039 );
2040 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2041 PROTOBUF_FIELD_OFFSET(BopParameters, max_lp_solve_for_feasibility_problems_)
2042 + sizeof(BopParameters::max_lp_solve_for_feasibility_problems_)
2043 - PROTOBUF_FIELD_OFFSET(BopParameters, log_search_progress_)>(
2044 reinterpret_cast<char*>(&log_search_progress_),
2045 reinterpret_cast<char*>(&other->log_search_progress_));
2046 swap(max_time_in_seconds_, other->max_time_in_seconds_);
2047 swap(max_num_decisions_in_ls_, other->max_num_decisions_in_ls_);
2048 swap(random_seed_, other->random_seed_);
2049 swap(num_relaxed_vars_, other->num_relaxed_vars_);
2050 swap(max_number_of_conflicts_in_random_lns_, other->max_number_of_conflicts_in_random_lns_);
2051 swap(compute_estimated_impact_, other->compute_estimated_impact_);
2052 swap(use_random_lns_, other->use_random_lns_);
2053 swap(use_lp_lns_, other->use_lp_lns_);
2054 swap(use_sat_to_choose_lns_neighbourhood_, other->use_sat_to_choose_lns_neighbourhood_);
2055 swap(num_random_lns_tries_, other->num_random_lns_tries_);
2056 swap(max_number_of_backtracks_in_ls_, other->max_number_of_backtracks_in_ls_);
2057 swap(max_number_of_conflicts_for_quick_check_, other->max_number_of_conflicts_for_quick_check_);
2058 swap(max_number_of_conflicts_in_random_solution_generation_, other->max_number_of_conflicts_in_random_solution_generation_);
2059 swap(max_number_of_explored_assignments_per_try_in_ls_, other->max_number_of_explored_assignments_per_try_in_ls_);
2060 swap(use_transposition_table_in_ls_, other->use_transposition_table_in_ls_);
2061 swap(use_learned_binary_clauses_in_lp_, other->use_learned_binary_clauses_in_lp_);
2062 swap(number_of_solvers_, other->number_of_solvers_);
2063 swap(max_deterministic_time_, other->max_deterministic_time_);
2064 swap(relative_gap_limit_, other->relative_gap_limit_);
2065 swap(decomposer_num_variables_threshold_, other->decomposer_num_variables_threshold_);
2066 swap(num_bop_solvers_used_by_decomposition_, other->num_bop_solvers_used_by_decomposition_);
2067 swap(guided_sat_conflicts_chunk_, other->guided_sat_conflicts_chunk_);
2068 swap(max_num_broken_constraints_in_ls_, other->max_num_broken_constraints_in_ls_);
2069 swap(lp_max_deterministic_time_, other->lp_max_deterministic_time_);
2070}
2071
2072::PROTOBUF_NAMESPACE_ID::Metadata BopParameters::GetMetadata() const {
2073 return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
2076}
2077
2078// @@protoc_insertion_point(namespace_scope)
2079} // namespace bop
2080} // namespace operations_research
2081PROTOBUF_NAMESPACE_OPEN
2082template<> PROTOBUF_NOINLINE ::operations_research::bop::BopOptimizerMethod* Arena::CreateMaybeMessage< ::operations_research::bop::BopOptimizerMethod >(Arena* arena) {
2083 return Arena::CreateMessageInternal< ::operations_research::bop::BopOptimizerMethod >(arena);
2084}
2085template<> PROTOBUF_NOINLINE ::operations_research::bop::BopSolverOptimizerSet* Arena::CreateMaybeMessage< ::operations_research::bop::BopSolverOptimizerSet >(Arena* arena) {
2086 return Arena::CreateMessageInternal< ::operations_research::bop::BopSolverOptimizerSet >(arena);
2087}
2088template<> PROTOBUF_NOINLINE ::operations_research::bop::BopParameters* Arena::CreateMaybeMessage< ::operations_research::bop::BopParameters >(Arena* arena) {
2089 return Arena::CreateMessageInternal< ::operations_research::bop::BopParameters >(arena);
2090}
2091PROTOBUF_NAMESPACE_CLOSE
2092
2093// @@protoc_insertion_point(global_scope)
2094#include <google/protobuf/port_undef.inc>
const uint32_t TableStruct_ortools_2fbop_2fbop_5fparameters_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold)
PROTOBUF_ATTRIBUTE_WEAKconst ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable * descriptor_table_ortools_2fbop_2fbop_5fparameters_2eproto_getter()
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const ** file_level_service_descriptors_ortools_2fbop_2fbop_5fparameters_2eproto
#define CHK_(x)
PROTOBUF_NOINLINE::operations_research::bop::BopParameters * Arena::CreateMaybeMessage< ::operations_research::bop::BopParameters >(Arena *arena)
PROTOBUF_NAMESPACE_OPEN PROTOBUF_NOINLINE::operations_research::bop::BopOptimizerMethod * Arena::CreateMaybeMessage< ::operations_research::bop::BopOptimizerMethod >(Arena *arena)
::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ortools_2fbop_2fbop_5fparameters_2eproto_once
::PROTOBUF_NAMESPACE_ID::Message const *const file_default_instances[]
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ortools_2fbop_2fbop_5fparameters_2eproto
::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_ortools_2fbop_2fbop_5fparameters_2eproto[3]
PROTOBUF_NOINLINE::operations_research::bop::BopSolverOptimizerSet * Arena::CreateMaybeMessage< ::operations_research::bop::BopSolverOptimizerSet >(Arena *arena)
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * file_level_enum_descriptors_ortools_2fbop_2fbop_5fparameters_2eproto[2]
decltype(std::declval< BopOptimizerMethod >()._has_bits_) HasBits
static constexpr OptimizerType USER_GUIDED_FIRST_SOLUTION
static constexpr OptimizerType LP_FIRST_SOLUTION
static constexpr OptimizerType RANDOM_CONSTRAINT_LNS
const char * _InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final
static constexpr OptimizerType OptimizerType_MAX
static constexpr OptimizerType OBJECTIVE_FIRST_SOLUTION
static constexpr OptimizerType RELATION_GRAPH_LNS
static constexpr OptimizerType RANDOM_VARIABLE_LNS
static constexpr OptimizerType RANDOM_CONSTRAINT_LNS_GUIDED_BY_LP
void MergeFrom(const BopOptimizerMethod &from)
static constexpr OptimizerType SAT_CORE_BASED
static constexpr OptimizerType RANDOM_VARIABLE_LNS_GUIDED_BY_LP
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData * GetClassData() const final
static constexpr OptimizerType OptimizerType_MIN
static constexpr OptimizerType LINEAR_RELAXATION
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final
static constexpr OptimizerType COMPLETE_LNS
friend void swap(BopOptimizerMethod &a, BopOptimizerMethod &b)
void CopyFrom(const BopOptimizerMethod &from)
static constexpr OptimizerType SAT_LINEAR_SEARCH
inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet * mutable_unknown_fields()
uint8_t * _InternalSerialize(uint8_t *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final
static constexpr OptimizerType LOCAL_SEARCH
static constexpr OptimizerType RELATION_GRAPH_LNS_GUIDED_BY_LP
static constexpr OptimizerType RANDOM_FIRST_SOLUTION
static void set_has_log_search_progress(HasBits *has_bits)
static void set_has_sort_constraints_by_num_terms(HasBits *has_bits)
decltype(std::declval< BopParameters >()._has_bits_) HasBits
static void set_has_default_solver_optimizer_sets(HasBits *has_bits)
static void set_has_num_bop_solvers_used_by_decomposition(HasBits *has_bits)
static void set_has_use_potential_one_flip_repairs_in_ls(HasBits *has_bits)
static void set_has_max_time_in_seconds(HasBits *has_bits)
static void set_has_max_number_of_conflicts_for_quick_check(HasBits *has_bits)
static void set_has_prune_search_tree(HasBits *has_bits)
static void set_has_max_number_of_consecutive_failing_optimizer_calls(HasBits *has_bits)
static void set_has_max_deterministic_time(HasBits *has_bits)
static void set_has_max_number_of_conflicts_in_random_solution_generation(HasBits *has_bits)
static void set_has_max_num_decisions_in_ls(HasBits *has_bits)
static void set_has_max_number_of_conflicts_in_random_lns(HasBits *has_bits)
static void set_has_max_number_of_backtracks_in_ls(HasBits *has_bits)
static void set_has_decomposer_num_variables_threshold(HasBits *has_bits)
static void set_has_number_of_solvers(HasBits *has_bits)
static void set_has_synchronization_type(HasBits *has_bits)
static void set_has_max_num_broken_constraints_in_ls(HasBits *has_bits)
static void set_has_relative_gap_limit(HasBits *has_bits)
static void set_has_compute_estimated_impact(HasBits *has_bits)
static void set_has_num_random_lns_tries(HasBits *has_bits)
static void set_has_max_number_of_explored_assignments_per_try_in_ls(HasBits *has_bits)
static void set_has_use_learned_binary_clauses_in_lp(HasBits *has_bits)
static void set_has_max_lp_solve_for_feasibility_problems(HasBits *has_bits)
static void set_has_num_relaxed_vars(HasBits *has_bits)
static void set_has_use_transposition_table_in_ls(HasBits *has_bits)
static void set_has_decomposed_problem_min_time_in_seconds(HasBits *has_bits)
static void set_has_guided_sat_conflicts_chunk(HasBits *has_bits)
static void set_has_exploit_symmetry_in_sat_first_solution(HasBits *has_bits)
static void set_has_use_lp_strong_branching(HasBits *has_bits)
static void set_has_lp_max_deterministic_time(HasBits *has_bits)
static void set_has_use_sat_to_choose_lns_neighbourhood(HasBits *has_bits)
static constexpr ThreadSynchronizationType ThreadSynchronizationType_MAX
void MergeFrom(const BopParameters &from)
const char * _InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final
static constexpr ThreadSynchronizationType ThreadSynchronizationType_MIN
void CopyFrom(const BopParameters &from)
static constexpr int ThreadSynchronizationType_ARRAYSIZE
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
static constexpr ThreadSynchronizationType NO_SYNCHRONIZATION
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData * GetClassData() const final
static constexpr ThreadSynchronizationType SYNCHRONIZE_ALL
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final
friend void swap(BopParameters &a, BopParameters &b)
inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet * mutable_unknown_fields()
uint8_t * _InternalSerialize(uint8_t *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final
static constexpr ThreadSynchronizationType SYNCHRONIZE_ON_RIGHT
const char * _InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData * GetClassData() const final
void CopyFrom(const BopSolverOptimizerSet &from)
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final
uint8_t * _InternalSerialize(uint8_t *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final
void MergeFrom(const BopSolverOptimizerSet &from)
int64_t value
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BopParametersDefaultTypeInternal _BopParameters_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BopOptimizerMethodDefaultTypeInternal _BopOptimizerMethod_default_instance_
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * BopParameters_ThreadSynchronizationType_descriptor()
bool BopOptimizerMethod_OptimizerType_IsValid(int value)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * BopOptimizerMethod_OptimizerType_descriptor()
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BopSolverOptimizerSetDefaultTypeInternal _BopSolverOptimizerSet_default_instance_
bool BopParameters_ThreadSynchronizationType_IsValid(int value)
void swap(IdMap< K, V > &a, IdMap< K, V > &b)
Definition: id_map.h:262
Collection of objects used to extend the Constraint Solver library.
STL namespace.
static constexpr ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema * schemas