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>
16 #include <google/protobuf/port_def.inc>
18 PROTOBUF_PRAGMA_INIT_SEG
21 constexpr BopOptimizerMethod::BopOptimizerMethod(
22 ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
27 : _instance(::PROTOBUF_NAMESPACE_ID::
internal::ConstantInitialized{}) {}
34 constexpr BopSolverOptimizerSet::BopSolverOptimizerSet(
35 ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
39 : _instance(::PROTOBUF_NAMESPACE_ID::
internal::ConstantInitialized{}) {}
46 constexpr BopParameters::BopParameters(
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)
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)
65 , num_relaxed_vars_(10)
66 , max_number_of_conflicts_in_random_lns_(2500)
67 , compute_estimated_impact_(true)
68 , use_random_lns_(true)
70 , use_sat_to_choose_lns_neighbourhood_(true)
71 , num_random_lns_tries_(1)
72 , max_number_of_backtracks_in_ls_(PROTOBUF_LONGLONG(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_(PROTOBUF_LONGLONG(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{}) {}
102 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopOptimizerMethod, _has_bits_),
103 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopOptimizerMethod, _internal_metadata_),
107 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopOptimizerMethod, type_),
110 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopSolverOptimizerSet, _internal_metadata_),
114 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopSolverOptimizerSet, methods_),
115 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, _has_bits_),
116 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, _internal_metadata_),
120 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_time_in_seconds_),
121 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_deterministic_time_),
122 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, lp_max_deterministic_time_),
123 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_number_of_consecutive_failing_optimizer_calls_),
124 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, relative_gap_limit_),
125 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_num_decisions_in_ls_),
126 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_num_broken_constraints_in_ls_),
127 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, log_search_progress_),
128 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, compute_estimated_impact_),
129 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, prune_search_tree_),
130 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, sort_constraints_by_num_terms_),
131 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_random_lns_),
132 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, random_seed_),
133 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, num_relaxed_vars_),
134 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_number_of_conflicts_in_random_lns_),
135 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, num_random_lns_tries_),
136 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_number_of_backtracks_in_ls_),
137 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_lp_lns_),
138 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_sat_to_choose_lns_neighbourhood_),
139 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_number_of_conflicts_for_quick_check_),
140 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_symmetry_),
141 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, exploit_symmetry_in_sat_first_solution_),
142 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_number_of_conflicts_in_random_solution_generation_),
143 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_number_of_explored_assignments_per_try_in_ls_),
144 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_transposition_table_in_ls_),
145 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_potential_one_flip_repairs_in_ls_),
146 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_learned_binary_clauses_in_lp_),
147 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, number_of_solvers_),
148 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, synchronization_type_),
149 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, solver_optimizer_sets_),
150 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, default_solver_optimizer_sets_),
151 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, use_lp_strong_branching_),
152 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, decomposer_num_variables_threshold_),
153 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, num_bop_solvers_used_by_decomposition_),
154 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, decomposed_problem_min_time_in_seconds_),
155 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, guided_sat_conflicts_chunk_),
156 PROTOBUF_FIELD_OFFSET(::operations_research::bop::BopParameters, max_lp_solve_for_feasibility_problems_),
196 { 0, 6,
sizeof(::operations_research::bop::BopOptimizerMethod)},
197 { 7, -1,
sizeof(::operations_research::bop::BopSolverOptimizerSet)},
198 { 13, 55,
sizeof(::operations_research::bop::BopParameters)},
207 const char descriptor_table_protodef_ortools_2fbop_2fbop_5fparameters_2eproto[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
208 "\n ortools/bop/bop_parameters.proto\022\027oper"
209 "ations_research.bop\"\204\004\n\022BopOptimizerMeth"
210 "od\022G\n\004type\030\001 \001(\01629.operations_research.b"
211 "op.BopOptimizerMethod.OptimizerType\"\244\003\n\r"
212 "OptimizerType\022\022\n\016SAT_CORE_BASED\020\000\022\025\n\021SAT"
213 "_LINEAR_SEARCH\020\017\022\025\n\021LINEAR_RELAXATION\020\001\022"
214 "\020\n\014LOCAL_SEARCH\020\002\022\031\n\025RANDOM_FIRST_SOLUTI"
215 "ON\020\003\022\031\n\025RANDOM_CONSTRAINT_LNS\020\004\022\027\n\023RANDO"
216 "M_VARIABLE_LNS\020\005\022\020\n\014COMPLETE_LNS\020\007\022\025\n\021LP"
217 "_FIRST_SOLUTION\020\010\022\034\n\030OBJECTIVE_FIRST_SOL"
218 "UTION\020\t\022\036\n\032USER_GUIDED_FIRST_SOLUTION\020\016\022"
219 "&\n\"RANDOM_CONSTRAINT_LNS_GUIDED_BY_LP\020\013\022"
220 "$\n RANDOM_VARIABLE_LNS_GUIDED_BY_LP\020\014\022\026\n"
221 "\022RELATION_GRAPH_LNS\020\020\022#\n\037RELATION_GRAPH_"
222 "LNS_GUIDED_BY_LP\020\021\"U\n\025BopSolverOptimizer"
223 "Set\022<\n\007methods\030\001 \003(\0132+.operations_resear"
224 "ch.bop.BopOptimizerMethod\"\356\023\n\rBopParamet"
225 "ers\022 \n\023max_time_in_seconds\030\001 \001(\001:\003inf\022#\n"
226 "\026max_deterministic_time\030\033 \001(\001:\003inf\022$\n\031lp"
227 "_max_deterministic_time\030% \001(\001:\0011\0229\n1max_"
228 "number_of_consecutive_failing_optimizer_"
229 "calls\030# \001(\005\022\"\n\022relative_gap_limit\030\034 \001(\001:"
230 "\0060.0001\022\"\n\027max_num_decisions_in_ls\030\002 \001(\005"
231 ":\0014\0224\n max_num_broken_constraints_in_ls\030"
232 "& \001(\005:\n2147483647\022\"\n\023log_search_progress"
233 "\030\016 \001(\010:\005false\022&\n\030compute_estimated_impac"
234 "t\030\003 \001(\010:\004true\022 \n\021prune_search_tree\030\004 \001(\010"
235 ":\005false\022,\n\035sort_constraints_by_num_terms"
236 "\030\005 \001(\010:\005false\022\034\n\016use_random_lns\030\006 \001(\010:\004t"
237 "rue\022\026\n\013random_seed\030\007 \001(\005:\0018\022\034\n\020num_relax"
238 "ed_vars\030\010 \001(\005:\00210\0223\n%max_number_of_confl"
239 "icts_in_random_lns\030\t \001(\005:\0042500\022\037\n\024num_ra"
240 "ndom_lns_tries\030\n \001(\005:\0011\0221\n\036max_number_of"
241 "_backtracks_in_ls\030\013 \001(\003:\t100000000\022\030\n\nus"
242 "e_lp_lns\030\014 \001(\010:\004true\0221\n#use_sat_to_choos"
243 "e_lns_neighbourhood\030\017 \001(\010:\004true\0223\n\'max_n"
244 "umber_of_conflicts_for_quick_check\030\020 \001(\005"
245 ":\00210\022\033\n\014use_symmetry\030\021 \001(\010:\005false\0225\n&exp"
246 "loit_symmetry_in_sat_first_solution\030( \001("
247 "\010:\005false\022B\n5max_number_of_conflicts_in_r"
248 "andom_solution_generation\030\024 \001(\005:\003500\022\?\n0"
249 "max_number_of_explored_assignments_per_t"
250 "ry_in_ls\030\025 \001(\003:\00510000\022+\n\035use_transpositi"
251 "on_table_in_ls\030\026 \001(\010:\004true\0223\n$use_potent"
252 "ial_one_flip_repairs_in_ls\030\' \001(\010:\005false\022"
253 ".\n use_learned_binary_clauses_in_lp\030\027 \001("
254 "\010:\004true\022\034\n\021number_of_solvers\030\030 \001(\005:\0011\022r\n"
255 "\024synchronization_type\030\031 \001(\0162@.operations"
256 "_research.bop.BopParameters.ThreadSynchr"
257 "onizationType:\022NO_SYNCHRONIZATION\022M\n\025sol"
258 "ver_optimizer_sets\030\032 \003(\0132..operations_re"
259 "search.bop.BopSolverOptimizerSet\022\362\005\n\035def"
260 "ault_solver_optimizer_sets\030! \001(\t:\312\005metho"
261 "ds:{type:LOCAL_SEARCH } "
262 " methods:{type:RANDOM_FIRST_SOLUTIO"
263 "N } methods:{type:LINEAR_RE"
264 "LAXATION } methods:{typ"
265 "e:LP_FIRST_SOLUTION } m"
266 "ethods:{type:OBJECTIVE_FIRST_SOLUTION } "
267 " methods:{type:USER_GUIDED_FIRS"
268 "T_SOLUTION } methods:{type:RANDO"
269 "M_CONSTRAINT_LNS_GUIDED_BY_LP } methods:"
270 "{type:RANDOM_VARIABLE_LNS_GUIDED_BY_LP }"
271 " methods:{type:RELATION_GRAPH_LNS } "
272 " methods:{type:RELATION_GRA"
273 "PH_LNS_GUIDED_BY_LP } methods:{type:R"
274 "ANDOM_CONSTRAINT_LNS } meth"
275 "ods:{type:RANDOM_VARIABLE_LNS } "
276 " methods:{type:SAT_CORE_BASED } "
277 " methods:{type:COMPLETE"
278 "_LNS } \022&\n\027use_lp_"
279 "strong_branching\030\035 \001(\010:\005false\022.\n\"decompo"
280 "ser_num_variables_threshold\030\036 \001(\005:\00250\0220\n"
281 "%num_bop_solvers_used_by_decomposition\030\037"
282 " \001(\005:\0011\0221\n&decomposed_problem_min_time_i"
283 "n_seconds\030$ \001(\001:\0010\022(\n\032guided_sat_conflic"
284 "ts_chunk\030\" \001(\005:\0041000\0220\n%max_lp_solve_for"
285 "_feasibility_problems\030) \001(\005:\0010\"b\n\031Thread"
286 "SynchronizationType\022\026\n\022NO_SYNCHRONIZATIO"
287 "N\020\000\022\023\n\017SYNCHRONIZE_ALL\020\001\022\030\n\024SYNCHRONIZE_"
292 false,
false, 3210, descriptor_table_protodef_ortools_2fbop_2fbop_5fparameters_2eproto,
"ortools/bop/bop_parameters.proto",
297 PROTOBUF_ATTRIBUTE_WEAK ::PROTOBUF_NAMESPACE_ID::Metadata
334 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
352 constexpr
int BopOptimizerMethod::OptimizerType_ARRAYSIZE;
369 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
375 constexpr
int BopParameters::ThreadSynchronizationType_ARRAYSIZE;
382 using HasBits = decltype(std::declval<BopOptimizerMethod>()._has_bits_);
384 (*has_bits)[0] |= 1u;
388 BopOptimizerMethod::BopOptimizerMethod(::PROTOBUF_NAMESPACE_ID::Arena* arena)
389 : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
391 RegisterArenaDtor(arena);
394 BopOptimizerMethod::BopOptimizerMethod(
const BopOptimizerMethod& from)
395 : ::PROTOBUF_NAMESPACE_ID::Message(),
396 _has_bits_(from._has_bits_) {
397 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
402 void BopOptimizerMethod::SharedCtor() {
406 BopOptimizerMethod::~BopOptimizerMethod() {
409 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
412 void BopOptimizerMethod::SharedDtor() {
413 GOOGLE_DCHECK(GetArena() ==
nullptr);
416 void BopOptimizerMethod::ArenaDtor(
void*
object) {
417 BopOptimizerMethod* _this =
reinterpret_cast< BopOptimizerMethod*
>(object);
420 void BopOptimizerMethod::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
422 void BopOptimizerMethod::SetCachedSize(
int size)
const {
423 _cached_size_.Set(size);
426 void BopOptimizerMethod::Clear() {
428 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
430 (void) cached_has_bits;
434 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
437 const char* BopOptimizerMethod::_InternalParse(
const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
438 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
440 while (!ctx->Done(&ptr)) {
441 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
442 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
447 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 8)) {
448 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
453 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
455 }
else goto handle_unusual;
459 if ((tag & 7) == 4 || tag == 0) {
460 ctx->SetLastTag(tag);
463 ptr = UnknownFieldParse(tag,
464 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
466 CHK_(ptr !=
nullptr);
472 _has_bits_.Or(has_bits);
480 ::PROTOBUF_NAMESPACE_ID::uint8* BopOptimizerMethod::_InternalSerialize(
481 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream)
const {
483 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
484 (void) cached_has_bits;
486 cached_has_bits = _has_bits_[0];
488 if (cached_has_bits & 0x00000001u) {
489 target = stream->EnsureSpace(target);
490 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
491 1, this->_internal_type(), target);
494 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
495 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
496 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
502 size_t BopOptimizerMethod::ByteSizeLong()
const {
504 size_t total_size = 0;
506 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
508 (void) cached_has_bits;
511 cached_has_bits = _has_bits_[0];
512 if (cached_has_bits & 0x00000001u) {
514 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type());
517 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
518 return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
519 _internal_metadata_, total_size, &_cached_size_);
521 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
522 SetCachedSize(cached_size);
526 void BopOptimizerMethod::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
528 GOOGLE_DCHECK_NE(&from,
this);
529 const BopOptimizerMethod* source =
530 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BopOptimizerMethod>(
532 if (source ==
nullptr) {
534 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from,
this);
541 void BopOptimizerMethod::MergeFrom(
const BopOptimizerMethod& from) {
543 GOOGLE_DCHECK_NE(&from,
this);
544 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
545 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
546 (void) cached_has_bits;
548 if (from._internal_has_type()) {
549 _internal_set_type(from._internal_type());
553 void BopOptimizerMethod::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
555 if (&from ==
this)
return;
560 void BopOptimizerMethod::CopyFrom(
const BopOptimizerMethod& from) {
562 if (&from ==
this)
return;
567 bool BopOptimizerMethod::IsInitialized()
const {
571 void BopOptimizerMethod::InternalSwap(BopOptimizerMethod* other) {
573 _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
574 swap(_has_bits_[0], other->_has_bits_[0]);
575 swap(type_, other->type_);
578 ::PROTOBUF_NAMESPACE_ID::Metadata BopOptimizerMethod::GetMetadata()
const {
579 return GetMetadataStatic();
589 BopSolverOptimizerSet::BopSolverOptimizerSet(::PROTOBUF_NAMESPACE_ID::Arena* arena)
590 : ::PROTOBUF_NAMESPACE_ID::Message(arena),
593 RegisterArenaDtor(arena);
596 BopSolverOptimizerSet::BopSolverOptimizerSet(
const BopSolverOptimizerSet& from)
597 : ::PROTOBUF_NAMESPACE_ID::Message(),
598 methods_(from.methods_) {
599 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
603 void BopSolverOptimizerSet::SharedCtor() {
606 BopSolverOptimizerSet::~BopSolverOptimizerSet() {
609 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
612 void BopSolverOptimizerSet::SharedDtor() {
613 GOOGLE_DCHECK(GetArena() ==
nullptr);
616 void BopSolverOptimizerSet::ArenaDtor(
void*
object) {
617 BopSolverOptimizerSet* _this =
reinterpret_cast< BopSolverOptimizerSet*
>(object);
620 void BopSolverOptimizerSet::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
622 void BopSolverOptimizerSet::SetCachedSize(
int size)
const {
623 _cached_size_.Set(size);
626 void BopSolverOptimizerSet::Clear() {
628 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
630 (void) cached_has_bits;
633 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
636 const char* BopSolverOptimizerSet::_InternalParse(
const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
637 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
638 while (!ctx->Done(&ptr)) {
639 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
640 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
645 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 10)) {
649 ptr = ctx->ParseMessage(_internal_add_methods(), ptr);
651 if (!ctx->DataAvailable(ptr))
break;
652 }
while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
653 }
else goto handle_unusual;
657 if ((tag & 7) == 4 || tag == 0) {
658 ctx->SetLastTag(tag);
661 ptr = UnknownFieldParse(tag,
662 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
664 CHK_(ptr !=
nullptr);
677 ::PROTOBUF_NAMESPACE_ID::uint8* BopSolverOptimizerSet::_InternalSerialize(
678 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream)
const {
680 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
681 (void) cached_has_bits;
684 for (
unsigned int i = 0,
685 n =
static_cast<unsigned int>(this->_internal_methods_size()); i < n; i++) {
686 target = stream->EnsureSpace(target);
687 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
688 InternalWriteMessage(1, this->_internal_methods(i), target, stream);
691 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
692 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
693 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
699 size_t BopSolverOptimizerSet::ByteSizeLong()
const {
701 size_t total_size = 0;
703 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
705 (void) cached_has_bits;
708 total_size += 1UL * this->_internal_methods_size();
709 for (
const auto& msg : this->methods_) {
711 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
714 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
715 return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
716 _internal_metadata_, total_size, &_cached_size_);
718 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
719 SetCachedSize(cached_size);
723 void BopSolverOptimizerSet::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
725 GOOGLE_DCHECK_NE(&from,
this);
726 const BopSolverOptimizerSet* source =
727 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BopSolverOptimizerSet>(
729 if (source ==
nullptr) {
731 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from,
this);
738 void BopSolverOptimizerSet::MergeFrom(
const BopSolverOptimizerSet& from) {
740 GOOGLE_DCHECK_NE(&from,
this);
741 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
742 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
743 (void) cached_has_bits;
745 methods_.MergeFrom(from.methods_);
748 void BopSolverOptimizerSet::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
750 if (&from ==
this)
return;
755 void BopSolverOptimizerSet::CopyFrom(
const BopSolverOptimizerSet& from) {
757 if (&from ==
this)
return;
762 bool BopSolverOptimizerSet::IsInitialized()
const {
766 void BopSolverOptimizerSet::InternalSwap(BopSolverOptimizerSet* other) {
768 _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
769 methods_.InternalSwap(&other->methods_);
772 ::PROTOBUF_NAMESPACE_ID::Metadata BopSolverOptimizerSet::GetMetadata()
const {
773 return GetMetadataStatic();
781 using HasBits = decltype(std::declval<BopParameters>()._has_bits_);
783 (*has_bits)[0] |= 4096u;
786 (*has_bits)[0] |= 536870912u;
789 (*has_bits)[1] |= 8u;
792 (*has_bits)[0] |= 64u;
795 (*has_bits)[0] |= 1073741824u;
798 (*has_bits)[0] |= 8192u;
801 (*has_bits)[1] |= 4u;
804 (*has_bits)[0] |= 2u;
807 (*has_bits)[0] |= 131072u;
810 (*has_bits)[0] |= 4u;
813 (*has_bits)[0] |= 8u;
816 (*has_bits)[0] |= 262144u;
819 (*has_bits)[0] |= 16384u;
822 (*has_bits)[0] |= 32768u;
825 (*has_bits)[0] |= 65536u;
828 (*has_bits)[0] |= 2097152u;
831 (*has_bits)[0] |= 4194304u;
834 (*has_bits)[0] |= 524288u;
837 (*has_bits)[0] |= 1048576u;
840 (*has_bits)[0] |= 8388608u;
843 (*has_bits)[0] |= 16u;
846 (*has_bits)[0] |= 128u;
849 (*has_bits)[0] |= 16777216u;
852 (*has_bits)[0] |= 33554432u;
855 (*has_bits)[0] |= 67108864u;
858 (*has_bits)[0] |= 256u;
861 (*has_bits)[0] |= 134217728u;
864 (*has_bits)[0] |= 268435456u;
867 (*has_bits)[0] |= 32u;
870 (*has_bits)[0] |= 1u;
873 (*has_bits)[0] |= 512u;
876 (*has_bits)[0] |= 2147483648u;
879 (*has_bits)[1] |= 1u;
882 (*has_bits)[0] |= 1024u;
885 (*has_bits)[1] |= 2u;
888 (*has_bits)[0] |= 2048u;
892 const ::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}};
893 BopParameters::BopParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena)
894 : ::PROTOBUF_NAMESPACE_ID::Message(arena),
895 solver_optimizer_sets_(arena) {
897 RegisterArenaDtor(arena);
900 BopParameters::BopParameters(
const BopParameters& from)
901 : ::PROTOBUF_NAMESPACE_ID::Message(),
902 _has_bits_(from._has_bits_),
903 solver_optimizer_sets_(from.solver_optimizer_sets_) {
904 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
905 default_solver_optimizer_sets_.UnsafeSetDefault(
nullptr);
906 if (from._internal_has_default_solver_optimizer_sets()) {
907 default_solver_optimizer_sets_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_default_solver_optimizer_sets(),
910 ::memcpy(&log_search_progress_, &from.log_search_progress_,
911 static_cast<size_t>(
reinterpret_cast<char*
>(&lp_max_deterministic_time_) -
912 reinterpret_cast<char*
>(&log_search_progress_)) +
sizeof(lp_max_deterministic_time_));
916 void BopParameters::SharedCtor() {
917 default_solver_optimizer_sets_.UnsafeSetDefault(
nullptr);
918 ::memset(
reinterpret_cast<char*
>(
this) +
static_cast<size_t>(
919 reinterpret_cast<char*
>(&log_search_progress_) -
reinterpret_cast<char*
>(
this)),
920 0,
static_cast<size_t>(
reinterpret_cast<char*
>(&max_lp_solve_for_feasibility_problems_) -
921 reinterpret_cast<char*
>(&log_search_progress_)) +
sizeof(max_lp_solve_for_feasibility_problems_));
922 max_time_in_seconds_ = std::numeric_limits<double>::infinity();
923 max_num_decisions_in_ls_ = 4;
925 num_relaxed_vars_ = 10;
926 max_number_of_conflicts_in_random_lns_ = 2500;
927 compute_estimated_impact_ =
true;
928 use_random_lns_ =
true;
930 use_sat_to_choose_lns_neighbourhood_ =
true;
931 num_random_lns_tries_ = 1;
932 max_number_of_backtracks_in_ls_ = PROTOBUF_LONGLONG(100000000);
933 max_number_of_conflicts_for_quick_check_ = 10;
934 max_number_of_conflicts_in_random_solution_generation_ = 500;
935 max_number_of_explored_assignments_per_try_in_ls_ = PROTOBUF_LONGLONG(10000);
936 use_transposition_table_in_ls_ =
true;
937 use_learned_binary_clauses_in_lp_ =
true;
938 number_of_solvers_ = 1;
939 max_deterministic_time_ = std::numeric_limits<double>::infinity();
940 relative_gap_limit_ = 0.0001;
941 decomposer_num_variables_threshold_ = 50;
942 num_bop_solvers_used_by_decomposition_ = 1;
943 guided_sat_conflicts_chunk_ = 1000;
944 max_num_broken_constraints_in_ls_ = 2147483647;
945 lp_max_deterministic_time_ = 1;
948 BopParameters::~BopParameters() {
951 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
954 void BopParameters::SharedDtor() {
955 GOOGLE_DCHECK(GetArena() ==
nullptr);
956 default_solver_optimizer_sets_.DestroyNoArena(
nullptr);
959 void BopParameters::ArenaDtor(
void*
object) {
960 BopParameters* _this =
reinterpret_cast< BopParameters*
>(object);
963 void BopParameters::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
965 void BopParameters::SetCachedSize(
int size)
const {
966 _cached_size_.Set(size);
969 void BopParameters::Clear() {
971 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
973 (void) cached_has_bits;
975 solver_optimizer_sets_.Clear();
976 cached_has_bits = _has_bits_[0];
977 if (cached_has_bits & 0x00000001u) {
978 default_solver_optimizer_sets_.ClearToDefault(::operations_research::bop::BopParameters::_i_give_permission_to_break_this_code_default_default_solver_optimizer_sets_, GetArena());
980 if (cached_has_bits & 0x000000feu) {
981 ::memset(&log_search_progress_, 0,
static_cast<size_t>(
982 reinterpret_cast<char*
>(&exploit_symmetry_in_sat_first_solution_) -
983 reinterpret_cast<char*
>(&log_search_progress_)) +
sizeof(exploit_symmetry_in_sat_first_solution_));
985 if (cached_has_bits & 0x0000ff00u) {
986 ::memset(&use_potential_one_flip_repairs_in_ls_, 0,
static_cast<size_t>(
987 reinterpret_cast<char*
>(&max_lp_solve_for_feasibility_problems_) -
988 reinterpret_cast<char*
>(&use_potential_one_flip_repairs_in_ls_)) +
sizeof(max_lp_solve_for_feasibility_problems_));
989 max_time_in_seconds_ = std::numeric_limits<double>::infinity();
990 max_num_decisions_in_ls_ = 4;
992 num_relaxed_vars_ = 10;
994 if (cached_has_bits & 0x00ff0000u) {
995 max_number_of_conflicts_in_random_lns_ = 2500;
996 compute_estimated_impact_ =
true;
997 use_random_lns_ =
true;
999 use_sat_to_choose_lns_neighbourhood_ =
true;
1000 num_random_lns_tries_ = 1;
1001 max_number_of_backtracks_in_ls_ = PROTOBUF_LONGLONG(100000000);
1002 max_number_of_conflicts_for_quick_check_ = 10;
1004 if (cached_has_bits & 0xff000000u) {
1005 max_number_of_conflicts_in_random_solution_generation_ = 500;
1006 max_number_of_explored_assignments_per_try_in_ls_ = PROTOBUF_LONGLONG(10000);
1007 use_transposition_table_in_ls_ =
true;
1008 use_learned_binary_clauses_in_lp_ =
true;
1009 number_of_solvers_ = 1;
1010 max_deterministic_time_ = std::numeric_limits<double>::infinity();
1011 relative_gap_limit_ = 0.0001;
1012 decomposer_num_variables_threshold_ = 50;
1014 cached_has_bits = _has_bits_[1];
1015 if (cached_has_bits & 0x0000000fu) {
1016 num_bop_solvers_used_by_decomposition_ = 1;
1017 guided_sat_conflicts_chunk_ = 1000;
1018 max_num_broken_constraints_in_ls_ = 2147483647;
1019 lp_max_deterministic_time_ = 1;
1022 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1025 const char* BopParameters::_InternalParse(
const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1026 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1027 while (!ctx->Done(&ptr)) {
1028 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1029 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1034 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 9)) {
1036 max_time_in_seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
1037 ptr +=
sizeof(double);
1038 }
else goto handle_unusual;
1042 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 16)) {
1044 max_num_decisions_in_ls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1046 }
else goto handle_unusual;
1050 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 24)) {
1052 compute_estimated_impact_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1054 }
else goto handle_unusual;
1058 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 32)) {
1060 prune_search_tree_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1062 }
else goto handle_unusual;
1066 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 40)) {
1068 sort_constraints_by_num_terms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1070 }
else goto handle_unusual;
1074 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 48)) {
1076 use_random_lns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1078 }
else goto handle_unusual;
1082 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 56)) {
1084 random_seed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1086 }
else goto handle_unusual;
1090 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 64)) {
1092 num_relaxed_vars_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1094 }
else goto handle_unusual;
1098 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 72)) {
1100 max_number_of_conflicts_in_random_lns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1102 }
else goto handle_unusual;
1106 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 80)) {
1108 num_random_lns_tries_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1110 }
else goto handle_unusual;
1114 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 88)) {
1116 max_number_of_backtracks_in_ls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1118 }
else goto handle_unusual;
1122 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 96)) {
1124 use_lp_lns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1126 }
else goto handle_unusual;
1130 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 112)) {
1132 log_search_progress_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1134 }
else goto handle_unusual;
1138 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 120)) {
1140 use_sat_to_choose_lns_neighbourhood_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1142 }
else goto handle_unusual;
1146 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 128)) {
1148 max_number_of_conflicts_for_quick_check_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1150 }
else goto handle_unusual;
1154 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 136)) {
1156 use_symmetry_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1158 }
else goto handle_unusual;
1162 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 160)) {
1164 max_number_of_conflicts_in_random_solution_generation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1166 }
else goto handle_unusual;
1170 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 168)) {
1172 max_number_of_explored_assignments_per_try_in_ls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1174 }
else goto handle_unusual;
1178 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 176)) {
1180 use_transposition_table_in_ls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1182 }
else goto handle_unusual;
1186 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 184)) {
1188 use_learned_binary_clauses_in_lp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1190 }
else goto handle_unusual;
1194 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 192)) {
1196 number_of_solvers_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1198 }
else goto handle_unusual;
1202 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 200)) {
1203 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1208 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(25, val, mutable_unknown_fields());
1210 }
else goto handle_unusual;
1214 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 210)) {
1218 ptr = ctx->ParseMessage(_internal_add_solver_optimizer_sets(), ptr);
1220 if (!ctx->DataAvailable(ptr))
break;
1221 }
while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<210>(ptr));
1222 }
else goto handle_unusual;
1226 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 217)) {
1228 max_deterministic_time_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
1229 ptr +=
sizeof(double);
1230 }
else goto handle_unusual;
1234 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 225)) {
1236 relative_gap_limit_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
1237 ptr +=
sizeof(double);
1238 }
else goto handle_unusual;
1242 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 232)) {
1244 use_lp_strong_branching_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1246 }
else goto handle_unusual;
1250 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 240)) {
1252 decomposer_num_variables_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1254 }
else goto handle_unusual;
1258 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 248)) {
1260 num_bop_solvers_used_by_decomposition_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1262 }
else goto handle_unusual;
1266 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 10)) {
1267 auto str = _internal_mutable_default_solver_optimizer_sets();
1268 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
1270 ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str,
"operations_research.bop.BopParameters.default_solver_optimizer_sets");
1273 }
else goto handle_unusual;
1277 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 16)) {
1279 guided_sat_conflicts_chunk_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1281 }
else goto handle_unusual;
1285 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 24)) {
1287 max_number_of_consecutive_failing_optimizer_calls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1289 }
else goto handle_unusual;
1293 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 33)) {
1295 decomposed_problem_min_time_in_seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
1296 ptr +=
sizeof(double);
1297 }
else goto handle_unusual;
1301 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 41)) {
1303 lp_max_deterministic_time_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
1304 ptr +=
sizeof(double);
1305 }
else goto handle_unusual;
1309 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 48)) {
1311 max_num_broken_constraints_in_ls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1313 }
else goto handle_unusual;
1317 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 56)) {
1319 use_potential_one_flip_repairs_in_ls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1321 }
else goto handle_unusual;
1325 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 64)) {
1327 exploit_symmetry_in_sat_first_solution_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1329 }
else goto handle_unusual;
1333 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 72)) {
1335 max_lp_solve_for_feasibility_problems_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1337 }
else goto handle_unusual;
1341 if ((tag & 7) == 4 || tag == 0) {
1342 ctx->SetLastTag(tag);
1345 ptr = UnknownFieldParse(tag,
1346 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
1348 CHK_(ptr !=
nullptr);
1361 ::PROTOBUF_NAMESPACE_ID::uint8* BopParameters::_InternalSerialize(
1362 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream)
const {
1364 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1365 (void) cached_has_bits;
1367 cached_has_bits = _has_bits_[0];
1369 if (cached_has_bits & 0x00001000u) {
1370 target = stream->EnsureSpace(target);
1371 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(1, this->_internal_max_time_in_seconds(), target);
1375 if (cached_has_bits & 0x00002000u) {
1376 target = stream->EnsureSpace(target);
1377 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_max_num_decisions_in_ls(), target);
1381 if (cached_has_bits & 0x00020000u) {
1382 target = stream->EnsureSpace(target);
1383 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_compute_estimated_impact(), target);
1387 if (cached_has_bits & 0x00000004u) {
1388 target = stream->EnsureSpace(target);
1389 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_prune_search_tree(), target);
1393 if (cached_has_bits & 0x00000008u) {
1394 target = stream->EnsureSpace(target);
1395 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_sort_constraints_by_num_terms(), target);
1399 if (cached_has_bits & 0x00040000u) {
1400 target = stream->EnsureSpace(target);
1401 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_use_random_lns(), target);
1405 if (cached_has_bits & 0x00004000u) {
1406 target = stream->EnsureSpace(target);
1407 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_random_seed(), target);
1411 if (cached_has_bits & 0x00008000u) {
1412 target = stream->EnsureSpace(target);
1413 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(8, this->_internal_num_relaxed_vars(), target);
1417 if (cached_has_bits & 0x00010000u) {
1418 target = stream->EnsureSpace(target);
1419 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(9, this->_internal_max_number_of_conflicts_in_random_lns(), target);
1423 if (cached_has_bits & 0x00200000u) {
1424 target = stream->EnsureSpace(target);
1425 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(10, this->_internal_num_random_lns_tries(), target);
1429 if (cached_has_bits & 0x00400000u) {
1430 target = stream->EnsureSpace(target);
1431 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(11, this->_internal_max_number_of_backtracks_in_ls(), target);
1435 if (cached_has_bits & 0x00080000u) {
1436 target = stream->EnsureSpace(target);
1437 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_use_lp_lns(), target);
1441 if (cached_has_bits & 0x00000002u) {
1442 target = stream->EnsureSpace(target);
1443 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->_internal_log_search_progress(), target);
1447 if (cached_has_bits & 0x00100000u) {
1448 target = stream->EnsureSpace(target);
1449 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(15, this->_internal_use_sat_to_choose_lns_neighbourhood(), target);
1453 if (cached_has_bits & 0x00800000u) {
1454 target = stream->EnsureSpace(target);
1455 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(16, this->_internal_max_number_of_conflicts_for_quick_check(), target);
1459 if (cached_has_bits & 0x00000010u) {
1460 target = stream->EnsureSpace(target);
1461 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_use_symmetry(), target);
1465 if (cached_has_bits & 0x01000000u) {
1466 target = stream->EnsureSpace(target);
1467 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(20, this->_internal_max_number_of_conflicts_in_random_solution_generation(), target);
1471 if (cached_has_bits & 0x02000000u) {
1472 target = stream->EnsureSpace(target);
1473 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(21, this->_internal_max_number_of_explored_assignments_per_try_in_ls(), target);
1477 if (cached_has_bits & 0x04000000u) {
1478 target = stream->EnsureSpace(target);
1479 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(22, this->_internal_use_transposition_table_in_ls(), target);
1483 if (cached_has_bits & 0x08000000u) {
1484 target = stream->EnsureSpace(target);
1485 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_use_learned_binary_clauses_in_lp(), target);
1489 if (cached_has_bits & 0x10000000u) {
1490 target = stream->EnsureSpace(target);
1491 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(24, this->_internal_number_of_solvers(), target);
1495 if (cached_has_bits & 0x00000020u) {
1496 target = stream->EnsureSpace(target);
1497 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1498 25, this->_internal_synchronization_type(), target);
1502 for (
unsigned int i = 0,
1503 n =
static_cast<unsigned int>(this->_internal_solver_optimizer_sets_size()); i < n; i++) {
1504 target = stream->EnsureSpace(target);
1505 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1506 InternalWriteMessage(26, this->_internal_solver_optimizer_sets(i), target, stream);
1510 if (cached_has_bits & 0x20000000u) {
1511 target = stream->EnsureSpace(target);
1512 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(27, this->_internal_max_deterministic_time(), target);
1516 if (cached_has_bits & 0x40000000u) {
1517 target = stream->EnsureSpace(target);
1518 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(28, this->_internal_relative_gap_limit(), target);
1522 if (cached_has_bits & 0x00000200u) {
1523 target = stream->EnsureSpace(target);
1524 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(29, this->_internal_use_lp_strong_branching(), target);
1528 if (cached_has_bits & 0x80000000u) {
1529 target = stream->EnsureSpace(target);
1530 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(30, this->_internal_decomposer_num_variables_threshold(), target);
1533 cached_has_bits = _has_bits_[1];
1535 if (cached_has_bits & 0x00000001u) {
1536 target = stream->EnsureSpace(target);
1537 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(31, this->_internal_num_bop_solvers_used_by_decomposition(), target);
1540 cached_has_bits = _has_bits_[0];
1542 if (cached_has_bits & 0x00000001u) {
1543 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
1544 this->_internal_default_solver_optimizer_sets().data(),
static_cast<int>(this->_internal_default_solver_optimizer_sets().length()),
1545 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
1546 "operations_research.bop.BopParameters.default_solver_optimizer_sets");
1547 target = stream->WriteStringMaybeAliased(
1548 33, this->_internal_default_solver_optimizer_sets(), target);
1551 cached_has_bits = _has_bits_[1];
1553 if (cached_has_bits & 0x00000002u) {
1554 target = stream->EnsureSpace(target);
1555 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(34, this->_internal_guided_sat_conflicts_chunk(), target);
1558 cached_has_bits = _has_bits_[0];
1560 if (cached_has_bits & 0x00000040u) {
1561 target = stream->EnsureSpace(target);
1562 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(35, this->_internal_max_number_of_consecutive_failing_optimizer_calls(), target);
1566 if (cached_has_bits & 0x00000400u) {
1567 target = stream->EnsureSpace(target);
1568 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(36, this->_internal_decomposed_problem_min_time_in_seconds(), target);
1571 cached_has_bits = _has_bits_[1];
1573 if (cached_has_bits & 0x00000008u) {
1574 target = stream->EnsureSpace(target);
1575 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(37, this->_internal_lp_max_deterministic_time(), target);
1579 if (cached_has_bits & 0x00000004u) {
1580 target = stream->EnsureSpace(target);
1581 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(38, this->_internal_max_num_broken_constraints_in_ls(), target);
1584 cached_has_bits = _has_bits_[0];
1586 if (cached_has_bits & 0x00000100u) {
1587 target = stream->EnsureSpace(target);
1588 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(39, this->_internal_use_potential_one_flip_repairs_in_ls(), target);
1592 if (cached_has_bits & 0x00000080u) {
1593 target = stream->EnsureSpace(target);
1594 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(40, this->_internal_exploit_symmetry_in_sat_first_solution(), target);
1598 if (cached_has_bits & 0x00000800u) {
1599 target = stream->EnsureSpace(target);
1600 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(41, this->_internal_max_lp_solve_for_feasibility_problems(), target);
1603 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1604 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
1605 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
1611 size_t BopParameters::ByteSizeLong()
const {
1613 size_t total_size = 0;
1615 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1617 (void) cached_has_bits;
1620 total_size += 2UL * this->_internal_solver_optimizer_sets_size();
1621 for (
const auto& msg : this->solver_optimizer_sets_) {
1623 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1626 cached_has_bits = _has_bits_[0];
1627 if (cached_has_bits & 0x000000ffu) {
1629 if (cached_has_bits & 0x00000001u) {
1631 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1632 this->_internal_default_solver_optimizer_sets());
1636 if (cached_has_bits & 0x00000002u) {
1637 total_size += 1 + 1;
1641 if (cached_has_bits & 0x00000004u) {
1642 total_size += 1 + 1;
1646 if (cached_has_bits & 0x00000008u) {
1647 total_size += 1 + 1;
1651 if (cached_has_bits & 0x00000010u) {
1652 total_size += 2 + 1;
1656 if (cached_has_bits & 0x00000020u) {
1658 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_synchronization_type());
1662 if (cached_has_bits & 0x00000040u) {
1664 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1665 this->_internal_max_number_of_consecutive_failing_optimizer_calls());
1669 if (cached_has_bits & 0x00000080u) {
1670 total_size += 2 + 1;
1674 if (cached_has_bits & 0x0000ff00u) {
1676 if (cached_has_bits & 0x00000100u) {
1677 total_size += 2 + 1;
1681 if (cached_has_bits & 0x00000200u) {
1682 total_size += 2 + 1;
1686 if (cached_has_bits & 0x00000400u) {
1687 total_size += 2 + 8;
1691 if (cached_has_bits & 0x00000800u) {
1693 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1694 this->_internal_max_lp_solve_for_feasibility_problems());
1698 if (cached_has_bits & 0x00001000u) {
1699 total_size += 1 + 8;
1703 if (cached_has_bits & 0x00002000u) {
1705 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1706 this->_internal_max_num_decisions_in_ls());
1710 if (cached_has_bits & 0x00004000u) {
1712 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1713 this->_internal_random_seed());
1717 if (cached_has_bits & 0x00008000u) {
1719 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1720 this->_internal_num_relaxed_vars());
1724 if (cached_has_bits & 0x00ff0000u) {
1726 if (cached_has_bits & 0x00010000u) {
1728 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1729 this->_internal_max_number_of_conflicts_in_random_lns());
1733 if (cached_has_bits & 0x00020000u) {
1734 total_size += 1 + 1;
1738 if (cached_has_bits & 0x00040000u) {
1739 total_size += 1 + 1;
1743 if (cached_has_bits & 0x00080000u) {
1744 total_size += 1 + 1;
1748 if (cached_has_bits & 0x00100000u) {
1749 total_size += 1 + 1;
1753 if (cached_has_bits & 0x00200000u) {
1755 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1756 this->_internal_num_random_lns_tries());
1760 if (cached_has_bits & 0x00400000u) {
1762 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1763 this->_internal_max_number_of_backtracks_in_ls());
1767 if (cached_has_bits & 0x00800000u) {
1769 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1770 this->_internal_max_number_of_conflicts_for_quick_check());
1774 if (cached_has_bits & 0xff000000u) {
1776 if (cached_has_bits & 0x01000000u) {
1778 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1779 this->_internal_max_number_of_conflicts_in_random_solution_generation());
1783 if (cached_has_bits & 0x02000000u) {
1785 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1786 this->_internal_max_number_of_explored_assignments_per_try_in_ls());
1790 if (cached_has_bits & 0x04000000u) {
1791 total_size += 2 + 1;
1795 if (cached_has_bits & 0x08000000u) {
1796 total_size += 2 + 1;
1800 if (cached_has_bits & 0x10000000u) {
1802 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1803 this->_internal_number_of_solvers());
1807 if (cached_has_bits & 0x20000000u) {
1808 total_size += 2 + 8;
1812 if (cached_has_bits & 0x40000000u) {
1813 total_size += 2 + 8;
1817 if (cached_has_bits & 0x80000000u) {
1819 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1820 this->_internal_decomposer_num_variables_threshold());
1824 cached_has_bits = _has_bits_[1];
1825 if (cached_has_bits & 0x0000000fu) {
1827 if (cached_has_bits & 0x00000001u) {
1829 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1830 this->_internal_num_bop_solvers_used_by_decomposition());
1834 if (cached_has_bits & 0x00000002u) {
1836 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1837 this->_internal_guided_sat_conflicts_chunk());
1841 if (cached_has_bits & 0x00000004u) {
1843 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1844 this->_internal_max_num_broken_constraints_in_ls());
1848 if (cached_has_bits & 0x00000008u) {
1849 total_size += 2 + 8;
1853 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1854 return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
1855 _internal_metadata_, total_size, &_cached_size_);
1857 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1858 SetCachedSize(cached_size);
1862 void BopParameters::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1864 GOOGLE_DCHECK_NE(&from,
this);
1865 const BopParameters* source =
1866 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BopParameters>(
1868 if (source ==
nullptr) {
1870 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from,
this);
1877 void BopParameters::MergeFrom(
const BopParameters& from) {
1879 GOOGLE_DCHECK_NE(&from,
this);
1880 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1881 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1882 (void) cached_has_bits;
1884 solver_optimizer_sets_.MergeFrom(from.solver_optimizer_sets_);
1885 cached_has_bits = from._has_bits_[0];
1886 if (cached_has_bits & 0x000000ffu) {
1887 if (cached_has_bits & 0x00000001u) {
1888 _internal_set_default_solver_optimizer_sets(from._internal_default_solver_optimizer_sets());
1890 if (cached_has_bits & 0x00000002u) {
1891 log_search_progress_ = from.log_search_progress_;
1893 if (cached_has_bits & 0x00000004u) {
1894 prune_search_tree_ = from.prune_search_tree_;
1896 if (cached_has_bits & 0x00000008u) {
1897 sort_constraints_by_num_terms_ = from.sort_constraints_by_num_terms_;
1899 if (cached_has_bits & 0x00000010u) {
1900 use_symmetry_ = from.use_symmetry_;
1902 if (cached_has_bits & 0x00000020u) {
1903 synchronization_type_ = from.synchronization_type_;
1905 if (cached_has_bits & 0x00000040u) {
1906 max_number_of_consecutive_failing_optimizer_calls_ = from.max_number_of_consecutive_failing_optimizer_calls_;
1908 if (cached_has_bits & 0x00000080u) {
1909 exploit_symmetry_in_sat_first_solution_ = from.exploit_symmetry_in_sat_first_solution_;
1911 _has_bits_[0] |= cached_has_bits;
1913 if (cached_has_bits & 0x0000ff00u) {
1914 if (cached_has_bits & 0x00000100u) {
1915 use_potential_one_flip_repairs_in_ls_ = from.use_potential_one_flip_repairs_in_ls_;
1917 if (cached_has_bits & 0x00000200u) {
1918 use_lp_strong_branching_ = from.use_lp_strong_branching_;
1920 if (cached_has_bits & 0x00000400u) {
1921 decomposed_problem_min_time_in_seconds_ = from.decomposed_problem_min_time_in_seconds_;
1923 if (cached_has_bits & 0x00000800u) {
1924 max_lp_solve_for_feasibility_problems_ = from.max_lp_solve_for_feasibility_problems_;
1926 if (cached_has_bits & 0x00001000u) {
1927 max_time_in_seconds_ = from.max_time_in_seconds_;
1929 if (cached_has_bits & 0x00002000u) {
1930 max_num_decisions_in_ls_ = from.max_num_decisions_in_ls_;
1932 if (cached_has_bits & 0x00004000u) {
1933 random_seed_ = from.random_seed_;
1935 if (cached_has_bits & 0x00008000u) {
1936 num_relaxed_vars_ = from.num_relaxed_vars_;
1938 _has_bits_[0] |= cached_has_bits;
1940 if (cached_has_bits & 0x00ff0000u) {
1941 if (cached_has_bits & 0x00010000u) {
1942 max_number_of_conflicts_in_random_lns_ = from.max_number_of_conflicts_in_random_lns_;
1944 if (cached_has_bits & 0x00020000u) {
1945 compute_estimated_impact_ = from.compute_estimated_impact_;
1947 if (cached_has_bits & 0x00040000u) {
1948 use_random_lns_ = from.use_random_lns_;
1950 if (cached_has_bits & 0x00080000u) {
1951 use_lp_lns_ = from.use_lp_lns_;
1953 if (cached_has_bits & 0x00100000u) {
1954 use_sat_to_choose_lns_neighbourhood_ = from.use_sat_to_choose_lns_neighbourhood_;
1956 if (cached_has_bits & 0x00200000u) {
1957 num_random_lns_tries_ = from.num_random_lns_tries_;
1959 if (cached_has_bits & 0x00400000u) {
1960 max_number_of_backtracks_in_ls_ = from.max_number_of_backtracks_in_ls_;
1962 if (cached_has_bits & 0x00800000u) {
1963 max_number_of_conflicts_for_quick_check_ = from.max_number_of_conflicts_for_quick_check_;
1965 _has_bits_[0] |= cached_has_bits;
1967 if (cached_has_bits & 0xff000000u) {
1968 if (cached_has_bits & 0x01000000u) {
1969 max_number_of_conflicts_in_random_solution_generation_ = from.max_number_of_conflicts_in_random_solution_generation_;
1971 if (cached_has_bits & 0x02000000u) {
1972 max_number_of_explored_assignments_per_try_in_ls_ = from.max_number_of_explored_assignments_per_try_in_ls_;
1974 if (cached_has_bits & 0x04000000u) {
1975 use_transposition_table_in_ls_ = from.use_transposition_table_in_ls_;
1977 if (cached_has_bits & 0x08000000u) {
1978 use_learned_binary_clauses_in_lp_ = from.use_learned_binary_clauses_in_lp_;
1980 if (cached_has_bits & 0x10000000u) {
1981 number_of_solvers_ = from.number_of_solvers_;
1983 if (cached_has_bits & 0x20000000u) {
1984 max_deterministic_time_ = from.max_deterministic_time_;
1986 if (cached_has_bits & 0x40000000u) {
1987 relative_gap_limit_ = from.relative_gap_limit_;
1989 if (cached_has_bits & 0x80000000u) {
1990 decomposer_num_variables_threshold_ = from.decomposer_num_variables_threshold_;
1992 _has_bits_[0] |= cached_has_bits;
1994 cached_has_bits = from._has_bits_[1];
1995 if (cached_has_bits & 0x0000000fu) {
1996 if (cached_has_bits & 0x00000001u) {
1997 num_bop_solvers_used_by_decomposition_ = from.num_bop_solvers_used_by_decomposition_;
1999 if (cached_has_bits & 0x00000002u) {
2000 guided_sat_conflicts_chunk_ = from.guided_sat_conflicts_chunk_;
2002 if (cached_has_bits & 0x00000004u) {
2003 max_num_broken_constraints_in_ls_ = from.max_num_broken_constraints_in_ls_;
2005 if (cached_has_bits & 0x00000008u) {
2006 lp_max_deterministic_time_ = from.lp_max_deterministic_time_;
2008 _has_bits_[1] |= cached_has_bits;
2012 void BopParameters::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
2014 if (&from ==
this)
return;
2019 void BopParameters::CopyFrom(
const BopParameters& from) {
2021 if (&from ==
this)
return;
2026 bool BopParameters::IsInitialized()
const {
2030 void BopParameters::InternalSwap(BopParameters* other) {
2032 _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
2033 swap(_has_bits_[0], other->_has_bits_[0]);
2034 swap(_has_bits_[1], other->_has_bits_[1]);
2035 solver_optimizer_sets_.InternalSwap(&other->solver_optimizer_sets_);
2036 default_solver_optimizer_sets_.Swap(&other->default_solver_optimizer_sets_,
nullptr, GetArena());
2037 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2038 PROTOBUF_FIELD_OFFSET(BopParameters, max_lp_solve_for_feasibility_problems_)
2039 +
sizeof(BopParameters::max_lp_solve_for_feasibility_problems_)
2040 - PROTOBUF_FIELD_OFFSET(BopParameters, log_search_progress_)>(
2041 reinterpret_cast<char*
>(&log_search_progress_),
2042 reinterpret_cast<char*
>(&other->log_search_progress_));
2043 swap(max_time_in_seconds_, other->max_time_in_seconds_);
2044 swap(max_num_decisions_in_ls_, other->max_num_decisions_in_ls_);
2045 swap(random_seed_, other->random_seed_);
2046 swap(num_relaxed_vars_, other->num_relaxed_vars_);
2047 swap(max_number_of_conflicts_in_random_lns_, other->max_number_of_conflicts_in_random_lns_);
2048 swap(compute_estimated_impact_, other->compute_estimated_impact_);
2049 swap(use_random_lns_, other->use_random_lns_);
2050 swap(use_lp_lns_, other->use_lp_lns_);
2051 swap(use_sat_to_choose_lns_neighbourhood_, other->use_sat_to_choose_lns_neighbourhood_);
2052 swap(num_random_lns_tries_, other->num_random_lns_tries_);
2053 swap(max_number_of_backtracks_in_ls_, other->max_number_of_backtracks_in_ls_);
2054 swap(max_number_of_conflicts_for_quick_check_, other->max_number_of_conflicts_for_quick_check_);
2055 swap(max_number_of_conflicts_in_random_solution_generation_, other->max_number_of_conflicts_in_random_solution_generation_);
2056 swap(max_number_of_explored_assignments_per_try_in_ls_, other->max_number_of_explored_assignments_per_try_in_ls_);
2057 swap(use_transposition_table_in_ls_, other->use_transposition_table_in_ls_);
2058 swap(use_learned_binary_clauses_in_lp_, other->use_learned_binary_clauses_in_lp_);
2059 swap(number_of_solvers_, other->number_of_solvers_);
2060 swap(max_deterministic_time_, other->max_deterministic_time_);
2061 swap(relative_gap_limit_, other->relative_gap_limit_);
2062 swap(decomposer_num_variables_threshold_, other->decomposer_num_variables_threshold_);
2063 swap(num_bop_solvers_used_by_decomposition_, other->num_bop_solvers_used_by_decomposition_);
2064 swap(guided_sat_conflicts_chunk_, other->guided_sat_conflicts_chunk_);
2065 swap(max_num_broken_constraints_in_ls_, other->max_num_broken_constraints_in_ls_);
2066 swap(lp_max_deterministic_time_, other->lp_max_deterministic_time_);
2069 ::PROTOBUF_NAMESPACE_ID::Metadata BopParameters::GetMetadata()
const {
2070 return GetMetadataStatic();
2077 PROTOBUF_NAMESPACE_OPEN
2079 return Arena::CreateMessageInternal< ::operations_research::bop::BopOptimizerMethod >(arena);
2082 return Arena::CreateMessageInternal< ::operations_research::bop::BopSolverOptimizerSet >(arena);
2085 return Arena::CreateMessageInternal< ::operations_research::bop::BopParameters >(arena);
2087 PROTOBUF_NAMESPACE_CLOSE
2090 #include <google/protobuf/port_undef.inc>
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const ** file_level_service_descriptors_ortools_2fbop_2fbop_5fparameters_2eproto
PROTOBUF_ATTRIBUTE_WEAK ::PROTOBUF_NAMESPACE_ID::Metadata descriptor_table_ortools_2fbop_2fbop_5fparameters_2eproto_metadata_getter(int index)
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_ortools_2fbop_2fbop_5fparameters_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold)
PROTOBUF_NOINLINE ::operations_research::bop::BopSolverOptimizerSet * Arena::CreateMaybeMessage< ::operations_research::bop::BopSolverOptimizerSet >(Arena *arena)
::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ortools_2fbop_2fbop_5fparameters_2eproto_once
PROTOBUF_NAMESPACE_OPEN PROTOBUF_NOINLINE ::operations_research::bop::BopOptimizerMethod * Arena::CreateMaybeMessage< ::operations_research::bop::BopOptimizerMethod >(Arena *arena)
::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]
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * file_level_enum_descriptors_ortools_2fbop_2fbop_5fparameters_2eproto[2]
PROTOBUF_NOINLINE ::operations_research::bop::BopParameters * Arena::CreateMaybeMessage< ::operations_research::bop::BopParameters >(Arena *arena)
static void set_has_type(HasBits *has_bits)
decltype(std::declval< BopOptimizerMethod >()._has_bits_) HasBits
static void set_has_log_search_progress(HasBits *has_bits)
static void set_has_sort_constraints_by_num_terms(HasBits *has_bits)
static void set_has_use_lp_lns(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_random_lns(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 void set_has_use_symmetry(HasBits *has_bits)
static void set_has_random_seed(HasBits *has_bits)
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_
BopOptimizerMethod_OptimizerType
BopParameters_ThreadSynchronizationType
bool BopParameters_ThreadSynchronizationType_IsValid(int value)
void swap(IdMap< K, V > &a, IdMap< K, V > &b)
Collection of objects used to extend the Constraint Solver library.
static constexpr ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema * schemas
constexpr BopOptimizerMethodDefaultTypeInternal()
~BopOptimizerMethodDefaultTypeInternal()
BopOptimizerMethod _instance
constexpr BopParametersDefaultTypeInternal()
~BopParametersDefaultTypeInternal()
constexpr BopSolverOptimizerSetDefaultTypeInternal()
~BopSolverOptimizerSetDefaultTypeInternal()
BopSolverOptimizerSet _instance