OR-Tools  9.0
rcpsp.pb.cc
Go to the documentation of this file.
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: ortools/data/rcpsp.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 
18 PROTOBUF_PRAGMA_INIT_SEG
19 namespace operations_research {
20 namespace data {
21 namespace rcpsp {
22 constexpr Resource::Resource(
23  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
24  : max_capacity_(0)
25  , min_capacity_(0)
26  , renewable_(false)
27  , unit_cost_(0){}
30  : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
32  union {
33  Resource _instance;
34  };
35 };
36 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ResourceDefaultTypeInternal _Resource_default_instance_;
37 constexpr Recipe::Recipe(
38  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
39  : demands_()
40  , _demands_cached_byte_size_()
41  , resources_()
42  , _resources_cached_byte_size_()
43  , duration_(0){}
46  : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
48  union {
49  Recipe _instance;
50  };
51 };
52 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RecipeDefaultTypeInternal _Recipe_default_instance_;
53 constexpr PerRecipeDelays::PerRecipeDelays(
54  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
55  : min_delays_()
56  , _min_delays_cached_byte_size_(){}
59  : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
61  union {
62  PerRecipeDelays _instance;
63  };
64 };
65 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PerRecipeDelaysDefaultTypeInternal _PerRecipeDelays_default_instance_;
66 constexpr PerSuccessorDelays::PerSuccessorDelays(
67  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
68  : recipe_delays_(){}
71  : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
73  union {
74  PerSuccessorDelays _instance;
75  };
76 };
77 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PerSuccessorDelaysDefaultTypeInternal _PerSuccessorDelays_default_instance_;
78 constexpr Task::Task(
79  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
80  : successors_()
81  , _successors_cached_byte_size_()
82  , recipes_()
83  , successor_delays_(){}
86  : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
88  union {
89  Task _instance;
90  };
91 };
92 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TaskDefaultTypeInternal _Task_default_instance_;
93 constexpr RcpspProblem::RcpspProblem(
94  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
95  : resources_()
96  , tasks_()
97  , basedata_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
98  , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
99  , is_consumer_producer_(false)
100  , is_resource_investment_(false)
101  , is_rcpsp_max_(false)
102  , deadline_(0)
103  , horizon_(0)
104  , release_date_(0)
105  , tardiness_cost_(0)
106  , mpm_time_(0)
107  , seed_(PROTOBUF_LONGLONG(0))
108  , due_date_(0){}
111  : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
113  union {
114  RcpspProblem _instance;
115  };
116 };
117 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RcpspProblemDefaultTypeInternal _RcpspProblem_default_instance_;
118 } // namespace rcpsp
119 } // namespace data
120 } // namespace operations_research
121 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_ortools_2fdata_2frcpsp_2eproto[6];
122 static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_ortools_2fdata_2frcpsp_2eproto = nullptr;
123 static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_ortools_2fdata_2frcpsp_2eproto = nullptr;
124 
125 const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_ortools_2fdata_2frcpsp_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
126  ~0u, // no _has_bits_
127  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::Resource, _internal_metadata_),
128  ~0u, // no _extensions_
129  ~0u, // no _oneof_case_
130  ~0u, // no _weak_field_map_
131  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::Resource, max_capacity_),
132  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::Resource, min_capacity_),
133  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::Resource, renewable_),
134  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::Resource, unit_cost_),
135  ~0u, // no _has_bits_
136  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::Recipe, _internal_metadata_),
137  ~0u, // no _extensions_
138  ~0u, // no _oneof_case_
139  ~0u, // no _weak_field_map_
140  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::Recipe, duration_),
141  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::Recipe, demands_),
142  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::Recipe, resources_),
143  ~0u, // no _has_bits_
144  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::PerRecipeDelays, _internal_metadata_),
145  ~0u, // no _extensions_
146  ~0u, // no _oneof_case_
147  ~0u, // no _weak_field_map_
148  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::PerRecipeDelays, min_delays_),
149  ~0u, // no _has_bits_
150  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::PerSuccessorDelays, _internal_metadata_),
151  ~0u, // no _extensions_
152  ~0u, // no _oneof_case_
153  ~0u, // no _weak_field_map_
154  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::PerSuccessorDelays, recipe_delays_),
155  ~0u, // no _has_bits_
156  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::Task, _internal_metadata_),
157  ~0u, // no _extensions_
158  ~0u, // no _oneof_case_
159  ~0u, // no _weak_field_map_
160  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::Task, successors_),
161  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::Task, recipes_),
162  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::Task, successor_delays_),
163  ~0u, // no _has_bits_
164  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, _internal_metadata_),
165  ~0u, // no _extensions_
166  ~0u, // no _oneof_case_
167  ~0u, // no _weak_field_map_
168  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, resources_),
169  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, tasks_),
170  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, is_consumer_producer_),
171  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, is_resource_investment_),
172  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, is_rcpsp_max_),
173  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, deadline_),
174  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, horizon_),
175  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, release_date_),
176  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, tardiness_cost_),
177  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, mpm_time_),
178  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, seed_),
179  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, basedata_),
180  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, due_date_),
181  PROTOBUF_FIELD_OFFSET(::operations_research::data::rcpsp::RcpspProblem, name_),
182 };
183 static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
184  { 0, -1, sizeof(::operations_research::data::rcpsp::Resource)},
185  { 9, -1, sizeof(::operations_research::data::rcpsp::Recipe)},
186  { 17, -1, sizeof(::operations_research::data::rcpsp::PerRecipeDelays)},
187  { 23, -1, sizeof(::operations_research::data::rcpsp::PerSuccessorDelays)},
188  { 29, -1, sizeof(::operations_research::data::rcpsp::Task)},
189  { 37, -1, sizeof(::operations_research::data::rcpsp::RcpspProblem)},
190 };
191 
192 static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
193  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::data::rcpsp::_Resource_default_instance_),
194  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::data::rcpsp::_Recipe_default_instance_),
195  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::data::rcpsp::_PerRecipeDelays_default_instance_),
196  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::data::rcpsp::_PerSuccessorDelays_default_instance_),
197  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::data::rcpsp::_Task_default_instance_),
198  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::data::rcpsp::_RcpspProblem_default_instance_),
199 };
200 
201 const char descriptor_table_protodef_ortools_2fdata_2frcpsp_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
202  "\n\030ortools/data/rcpsp.proto\022\036operations_r"
203  "esearch.data.rcpsp\"\\\n\010Resource\022\024\n\014max_ca"
204  "pacity\030\001 \001(\005\022\024\n\014min_capacity\030\002 \001(\005\022\021\n\tre"
205  "newable\030\003 \001(\010\022\021\n\tunit_cost\030\004 \001(\005\">\n\006Reci"
206  "pe\022\020\n\010duration\030\001 \001(\005\022\017\n\007demands\030\002 \003(\005\022\021\n"
207  "\tresources\030\003 \003(\005\"%\n\017PerRecipeDelays\022\022\n\nm"
208  "in_delays\030\001 \003(\005\"\\\n\022PerSuccessorDelays\022F\n"
209  "\rrecipe_delays\030\001 \003(\0132/.operations_resear"
210  "ch.data.rcpsp.PerRecipeDelays\"\241\001\n\004Task\022\022"
211  "\n\nsuccessors\030\001 \003(\005\0227\n\007recipes\030\002 \003(\0132&.op"
212  "erations_research.data.rcpsp.Recipe\022L\n\020s"
213  "uccessor_delays\030\003 \003(\01322.operations_resea"
214  "rch.data.rcpsp.PerSuccessorDelays\"\367\002\n\014Rc"
215  "pspProblem\022;\n\tresources\030\001 \003(\0132(.operatio"
216  "ns_research.data.rcpsp.Resource\0223\n\005tasks"
217  "\030\002 \003(\0132$.operations_research.data.rcpsp."
218  "Task\022\034\n\024is_consumer_producer\030\003 \001(\010\022\036\n\026is"
219  "_resource_investment\030\004 \001(\010\022\024\n\014is_rcpsp_m"
220  "ax\030\005 \001(\010\022\020\n\010deadline\030\006 \001(\005\022\017\n\007horizon\030\007 "
221  "\001(\005\022\024\n\014release_date\030\010 \001(\005\022\026\n\016tardiness_c"
222  "ost\030\t \001(\005\022\020\n\010mpm_time\030\n \001(\005\022\014\n\004seed\030\013 \001("
223  "\003\022\020\n\010basedata\030\014 \001(\t\022\020\n\010due_date\030\r \001(\005\022\014\n"
224  "\004name\030\016 \001(\tB=\n\035com.google.ortools.data.r"
225  "cpspP\001\252\002\031Google.OrTools.Data.Rcpspb\006prot"
226  "o3"
227  ;
228 static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ortools_2fdata_2frcpsp_2eproto_once;
229 const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ortools_2fdata_2frcpsp_2eproto = {
230  false, false, 962, descriptor_table_protodef_ortools_2fdata_2frcpsp_2eproto, "ortools/data/rcpsp.proto",
234 };
235 PROTOBUF_ATTRIBUTE_WEAK ::PROTOBUF_NAMESPACE_ID::Metadata
237  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_ortools_2fdata_2frcpsp_2eproto);
238  return descriptor_table_ortools_2fdata_2frcpsp_2eproto.file_level_metadata[index];
239 }
240 
241 // Force running AddDescriptors() at dynamic initialization time.
242 PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_ortools_2fdata_2frcpsp_2eproto(&descriptor_table_ortools_2fdata_2frcpsp_2eproto);
243 namespace operations_research {
244 namespace data {
245 namespace rcpsp {
246 
247 // ===================================================================
248 
250  public:
251 };
252 
253 Resource::Resource(::PROTOBUF_NAMESPACE_ID::Arena* arena)
254  : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
255  SharedCtor();
256  RegisterArenaDtor(arena);
257  // @@protoc_insertion_point(arena_constructor:operations_research.data.rcpsp.Resource)
258 }
259 Resource::Resource(const Resource& from)
260  : ::PROTOBUF_NAMESPACE_ID::Message() {
261  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
262  ::memcpy(&max_capacity_, &from.max_capacity_,
263  static_cast<size_t>(reinterpret_cast<char*>(&unit_cost_) -
264  reinterpret_cast<char*>(&max_capacity_)) + sizeof(unit_cost_));
265  // @@protoc_insertion_point(copy_constructor:operations_research.data.rcpsp.Resource)
266 }
267 
268 void Resource::SharedCtor() {
269 ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
270  reinterpret_cast<char*>(&max_capacity_) - reinterpret_cast<char*>(this)),
271  0, static_cast<size_t>(reinterpret_cast<char*>(&unit_cost_) -
272  reinterpret_cast<char*>(&max_capacity_)) + sizeof(unit_cost_));
273 }
274 
275 Resource::~Resource() {
276  // @@protoc_insertion_point(destructor:operations_research.data.rcpsp.Resource)
277  SharedDtor();
278  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
279 }
280 
281 void Resource::SharedDtor() {
282  GOOGLE_DCHECK(GetArena() == nullptr);
283 }
284 
285 void Resource::ArenaDtor(void* object) {
286  Resource* _this = reinterpret_cast< Resource* >(object);
287  (void)_this;
288 }
289 void Resource::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
290 }
291 void Resource::SetCachedSize(int size) const {
292  _cached_size_.Set(size);
293 }
294 
295 void Resource::Clear() {
296 // @@protoc_insertion_point(message_clear_start:operations_research.data.rcpsp.Resource)
297  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
298  // Prevent compiler warnings about cached_has_bits being unused
299  (void) cached_has_bits;
300 
301  ::memset(&max_capacity_, 0, static_cast<size_t>(
302  reinterpret_cast<char*>(&unit_cost_) -
303  reinterpret_cast<char*>(&max_capacity_)) + sizeof(unit_cost_));
304  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
305 }
306 
307 const char* Resource::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
308 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
309  while (!ctx->Done(&ptr)) {
310  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
311  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
312  CHK_(ptr);
313  switch (tag >> 3) {
314  // int32 max_capacity = 1;
315  case 1:
316  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
317  max_capacity_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
318  CHK_(ptr);
319  } else goto handle_unusual;
320  continue;
321  // int32 min_capacity = 2;
322  case 2:
323  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
324  min_capacity_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
325  CHK_(ptr);
326  } else goto handle_unusual;
327  continue;
328  // bool renewable = 3;
329  case 3:
330  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
331  renewable_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
332  CHK_(ptr);
333  } else goto handle_unusual;
334  continue;
335  // int32 unit_cost = 4;
336  case 4:
337  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
338  unit_cost_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
339  CHK_(ptr);
340  } else goto handle_unusual;
341  continue;
342  default: {
343  handle_unusual:
344  if ((tag & 7) == 4 || tag == 0) {
345  ctx->SetLastTag(tag);
346  goto success;
347  }
348  ptr = UnknownFieldParse(tag,
349  _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
350  ptr, ctx);
351  CHK_(ptr != nullptr);
352  continue;
353  }
354  } // switch
355  } // while
356 success:
357  return ptr;
358 failure:
359  ptr = nullptr;
360  goto success;
361 #undef CHK_
362 }
363 
364 ::PROTOBUF_NAMESPACE_ID::uint8* Resource::_InternalSerialize(
365  ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
366  // @@protoc_insertion_point(serialize_to_array_start:operations_research.data.rcpsp.Resource)
367  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
368  (void) cached_has_bits;
369 
370  // int32 max_capacity = 1;
371  if (this->max_capacity() != 0) {
372  target = stream->EnsureSpace(target);
373  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_max_capacity(), target);
374  }
375 
376  // int32 min_capacity = 2;
377  if (this->min_capacity() != 0) {
378  target = stream->EnsureSpace(target);
379  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_min_capacity(), target);
380  }
381 
382  // bool renewable = 3;
383  if (this->renewable() != 0) {
384  target = stream->EnsureSpace(target);
385  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_renewable(), target);
386  }
387 
388  // int32 unit_cost = 4;
389  if (this->unit_cost() != 0) {
390  target = stream->EnsureSpace(target);
391  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_unit_cost(), target);
392  }
393 
394  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
395  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
396  _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
397  }
398  // @@protoc_insertion_point(serialize_to_array_end:operations_research.data.rcpsp.Resource)
399  return target;
400 }
401 
402 size_t Resource::ByteSizeLong() const {
403 // @@protoc_insertion_point(message_byte_size_start:operations_research.data.rcpsp.Resource)
404  size_t total_size = 0;
405 
406  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
407  // Prevent compiler warnings about cached_has_bits being unused
408  (void) cached_has_bits;
409 
410  // int32 max_capacity = 1;
411  if (this->max_capacity() != 0) {
412  total_size += 1 +
413  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
414  this->_internal_max_capacity());
415  }
416 
417  // int32 min_capacity = 2;
418  if (this->min_capacity() != 0) {
419  total_size += 1 +
420  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
421  this->_internal_min_capacity());
422  }
423 
424  // bool renewable = 3;
425  if (this->renewable() != 0) {
426  total_size += 1 + 1;
427  }
428 
429  // int32 unit_cost = 4;
430  if (this->unit_cost() != 0) {
431  total_size += 1 +
432  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
433  this->_internal_unit_cost());
434  }
435 
436  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
437  return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
438  _internal_metadata_, total_size, &_cached_size_);
439  }
440  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
441  SetCachedSize(cached_size);
442  return total_size;
443 }
444 
445 void Resource::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
446 // @@protoc_insertion_point(generalized_merge_from_start:operations_research.data.rcpsp.Resource)
447  GOOGLE_DCHECK_NE(&from, this);
448  const Resource* source =
449  ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Resource>(
450  &from);
451  if (source == nullptr) {
452  // @@protoc_insertion_point(generalized_merge_from_cast_fail:operations_research.data.rcpsp.Resource)
453  ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
454  } else {
455  // @@protoc_insertion_point(generalized_merge_from_cast_success:operations_research.data.rcpsp.Resource)
456  MergeFrom(*source);
457  }
458 }
459 
460 void Resource::MergeFrom(const Resource& from) {
461 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.data.rcpsp.Resource)
462  GOOGLE_DCHECK_NE(&from, this);
463  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
464  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
465  (void) cached_has_bits;
466 
467  if (from.max_capacity() != 0) {
468  _internal_set_max_capacity(from._internal_max_capacity());
469  }
470  if (from.min_capacity() != 0) {
471  _internal_set_min_capacity(from._internal_min_capacity());
472  }
473  if (from.renewable() != 0) {
474  _internal_set_renewable(from._internal_renewable());
475  }
476  if (from.unit_cost() != 0) {
477  _internal_set_unit_cost(from._internal_unit_cost());
478  }
479 }
480 
481 void Resource::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
482 // @@protoc_insertion_point(generalized_copy_from_start:operations_research.data.rcpsp.Resource)
483  if (&from == this) return;
484  Clear();
485  MergeFrom(from);
486 }
487 
488 void Resource::CopyFrom(const Resource& from) {
489 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.data.rcpsp.Resource)
490  if (&from == this) return;
491  Clear();
492  MergeFrom(from);
493 }
494 
495 bool Resource::IsInitialized() const {
496  return true;
497 }
498 
499 void Resource::InternalSwap(Resource* other) {
500  using std::swap;
501  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
502  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
503  PROTOBUF_FIELD_OFFSET(Resource, unit_cost_)
504  + sizeof(Resource::unit_cost_)
505  - PROTOBUF_FIELD_OFFSET(Resource, max_capacity_)>(
506  reinterpret_cast<char*>(&max_capacity_),
507  reinterpret_cast<char*>(&other->max_capacity_));
508 }
509 
510 ::PROTOBUF_NAMESPACE_ID::Metadata Resource::GetMetadata() const {
511  return GetMetadataStatic();
512 }
513 
514 
515 // ===================================================================
516 
518  public:
519 };
520 
521 Recipe::Recipe(::PROTOBUF_NAMESPACE_ID::Arena* arena)
522  : ::PROTOBUF_NAMESPACE_ID::Message(arena),
523  demands_(arena),
524  resources_(arena) {
525  SharedCtor();
526  RegisterArenaDtor(arena);
527  // @@protoc_insertion_point(arena_constructor:operations_research.data.rcpsp.Recipe)
528 }
529 Recipe::Recipe(const Recipe& from)
530  : ::PROTOBUF_NAMESPACE_ID::Message(),
531  demands_(from.demands_),
532  resources_(from.resources_) {
533  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
534  duration_ = from.duration_;
535  // @@protoc_insertion_point(copy_constructor:operations_research.data.rcpsp.Recipe)
536 }
537 
538 void Recipe::SharedCtor() {
539 duration_ = 0;
540 }
541 
542 Recipe::~Recipe() {
543  // @@protoc_insertion_point(destructor:operations_research.data.rcpsp.Recipe)
544  SharedDtor();
545  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
546 }
547 
548 void Recipe::SharedDtor() {
549  GOOGLE_DCHECK(GetArena() == nullptr);
550 }
551 
552 void Recipe::ArenaDtor(void* object) {
553  Recipe* _this = reinterpret_cast< Recipe* >(object);
554  (void)_this;
555 }
556 void Recipe::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
557 }
558 void Recipe::SetCachedSize(int size) const {
559  _cached_size_.Set(size);
560 }
561 
562 void Recipe::Clear() {
563 // @@protoc_insertion_point(message_clear_start:operations_research.data.rcpsp.Recipe)
564  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
565  // Prevent compiler warnings about cached_has_bits being unused
566  (void) cached_has_bits;
567 
568  demands_.Clear();
569  resources_.Clear();
570  duration_ = 0;
571  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
572 }
573 
574 const char* Recipe::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
575 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
576  while (!ctx->Done(&ptr)) {
577  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
578  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
579  CHK_(ptr);
580  switch (tag >> 3) {
581  // int32 duration = 1;
582  case 1:
583  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
584  duration_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
585  CHK_(ptr);
586  } else goto handle_unusual;
587  continue;
588  // repeated int32 demands = 2;
589  case 2:
590  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
591  ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_demands(), ptr, ctx);
592  CHK_(ptr);
593  } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) {
594  _internal_add_demands(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
595  CHK_(ptr);
596  } else goto handle_unusual;
597  continue;
598  // repeated int32 resources = 3;
599  case 3:
600  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
601  ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_resources(), ptr, ctx);
602  CHK_(ptr);
603  } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24) {
604  _internal_add_resources(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
605  CHK_(ptr);
606  } else goto handle_unusual;
607  continue;
608  default: {
609  handle_unusual:
610  if ((tag & 7) == 4 || tag == 0) {
611  ctx->SetLastTag(tag);
612  goto success;
613  }
614  ptr = UnknownFieldParse(tag,
615  _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
616  ptr, ctx);
617  CHK_(ptr != nullptr);
618  continue;
619  }
620  } // switch
621  } // while
622 success:
623  return ptr;
624 failure:
625  ptr = nullptr;
626  goto success;
627 #undef CHK_
628 }
629 
630 ::PROTOBUF_NAMESPACE_ID::uint8* Recipe::_InternalSerialize(
631  ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
632  // @@protoc_insertion_point(serialize_to_array_start:operations_research.data.rcpsp.Recipe)
633  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
634  (void) cached_has_bits;
635 
636  // int32 duration = 1;
637  if (this->duration() != 0) {
638  target = stream->EnsureSpace(target);
639  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_duration(), target);
640  }
641 
642  // repeated int32 demands = 2;
643  {
644  int byte_size = _demands_cached_byte_size_.load(std::memory_order_relaxed);
645  if (byte_size > 0) {
646  target = stream->WriteInt32Packed(
647  2, _internal_demands(), byte_size, target);
648  }
649  }
650 
651  // repeated int32 resources = 3;
652  {
653  int byte_size = _resources_cached_byte_size_.load(std::memory_order_relaxed);
654  if (byte_size > 0) {
655  target = stream->WriteInt32Packed(
656  3, _internal_resources(), byte_size, target);
657  }
658  }
659 
660  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
661  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
662  _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
663  }
664  // @@protoc_insertion_point(serialize_to_array_end:operations_research.data.rcpsp.Recipe)
665  return target;
666 }
667 
668 size_t Recipe::ByteSizeLong() const {
669 // @@protoc_insertion_point(message_byte_size_start:operations_research.data.rcpsp.Recipe)
670  size_t total_size = 0;
671 
672  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
673  // Prevent compiler warnings about cached_has_bits being unused
674  (void) cached_has_bits;
675 
676  // repeated int32 demands = 2;
677  {
678  size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
679  Int32Size(this->demands_);
680  if (data_size > 0) {
681  total_size += 1 +
682  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
683  static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
684  }
685  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
686  _demands_cached_byte_size_.store(cached_size,
687  std::memory_order_relaxed);
688  total_size += data_size;
689  }
690 
691  // repeated int32 resources = 3;
692  {
693  size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
694  Int32Size(this->resources_);
695  if (data_size > 0) {
696  total_size += 1 +
697  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
698  static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
699  }
700  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
701  _resources_cached_byte_size_.store(cached_size,
702  std::memory_order_relaxed);
703  total_size += data_size;
704  }
705 
706  // int32 duration = 1;
707  if (this->duration() != 0) {
708  total_size += 1 +
709  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
710  this->_internal_duration());
711  }
712 
713  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
714  return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
715  _internal_metadata_, total_size, &_cached_size_);
716  }
717  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
718  SetCachedSize(cached_size);
719  return total_size;
720 }
721 
722 void Recipe::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
723 // @@protoc_insertion_point(generalized_merge_from_start:operations_research.data.rcpsp.Recipe)
724  GOOGLE_DCHECK_NE(&from, this);
725  const Recipe* source =
726  ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Recipe>(
727  &from);
728  if (source == nullptr) {
729  // @@protoc_insertion_point(generalized_merge_from_cast_fail:operations_research.data.rcpsp.Recipe)
730  ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
731  } else {
732  // @@protoc_insertion_point(generalized_merge_from_cast_success:operations_research.data.rcpsp.Recipe)
733  MergeFrom(*source);
734  }
735 }
736 
737 void Recipe::MergeFrom(const Recipe& from) {
738 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.data.rcpsp.Recipe)
739  GOOGLE_DCHECK_NE(&from, this);
740  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
741  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
742  (void) cached_has_bits;
743 
744  demands_.MergeFrom(from.demands_);
745  resources_.MergeFrom(from.resources_);
746  if (from.duration() != 0) {
747  _internal_set_duration(from._internal_duration());
748  }
749 }
750 
751 void Recipe::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
752 // @@protoc_insertion_point(generalized_copy_from_start:operations_research.data.rcpsp.Recipe)
753  if (&from == this) return;
754  Clear();
755  MergeFrom(from);
756 }
757 
758 void Recipe::CopyFrom(const Recipe& from) {
759 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.data.rcpsp.Recipe)
760  if (&from == this) return;
761  Clear();
762  MergeFrom(from);
763 }
764 
765 bool Recipe::IsInitialized() const {
766  return true;
767 }
768 
769 void Recipe::InternalSwap(Recipe* other) {
770  using std::swap;
771  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
772  demands_.InternalSwap(&other->demands_);
773  resources_.InternalSwap(&other->resources_);
774  swap(duration_, other->duration_);
775 }
776 
777 ::PROTOBUF_NAMESPACE_ID::Metadata Recipe::GetMetadata() const {
778  return GetMetadataStatic();
779 }
780 
781 
782 // ===================================================================
783 
785  public:
786 };
787 
788 PerRecipeDelays::PerRecipeDelays(::PROTOBUF_NAMESPACE_ID::Arena* arena)
789  : ::PROTOBUF_NAMESPACE_ID::Message(arena),
790  min_delays_(arena) {
791  SharedCtor();
792  RegisterArenaDtor(arena);
793  // @@protoc_insertion_point(arena_constructor:operations_research.data.rcpsp.PerRecipeDelays)
794 }
795 PerRecipeDelays::PerRecipeDelays(const PerRecipeDelays& from)
796  : ::PROTOBUF_NAMESPACE_ID::Message(),
797  min_delays_(from.min_delays_) {
798  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
799  // @@protoc_insertion_point(copy_constructor:operations_research.data.rcpsp.PerRecipeDelays)
800 }
801 
802 void PerRecipeDelays::SharedCtor() {
803 }
804 
805 PerRecipeDelays::~PerRecipeDelays() {
806  // @@protoc_insertion_point(destructor:operations_research.data.rcpsp.PerRecipeDelays)
807  SharedDtor();
808  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
809 }
810 
811 void PerRecipeDelays::SharedDtor() {
812  GOOGLE_DCHECK(GetArena() == nullptr);
813 }
814 
815 void PerRecipeDelays::ArenaDtor(void* object) {
816  PerRecipeDelays* _this = reinterpret_cast< PerRecipeDelays* >(object);
817  (void)_this;
818 }
819 void PerRecipeDelays::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
820 }
821 void PerRecipeDelays::SetCachedSize(int size) const {
822  _cached_size_.Set(size);
823 }
824 
825 void PerRecipeDelays::Clear() {
826 // @@protoc_insertion_point(message_clear_start:operations_research.data.rcpsp.PerRecipeDelays)
827  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
828  // Prevent compiler warnings about cached_has_bits being unused
829  (void) cached_has_bits;
830 
831  min_delays_.Clear();
832  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
833 }
834 
835 const char* PerRecipeDelays::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
836 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
837  while (!ctx->Done(&ptr)) {
838  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
839  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
840  CHK_(ptr);
841  switch (tag >> 3) {
842  // repeated int32 min_delays = 1;
843  case 1:
844  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
845  ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_min_delays(), ptr, ctx);
846  CHK_(ptr);
847  } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8) {
848  _internal_add_min_delays(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
849  CHK_(ptr);
850  } else goto handle_unusual;
851  continue;
852  default: {
853  handle_unusual:
854  if ((tag & 7) == 4 || tag == 0) {
855  ctx->SetLastTag(tag);
856  goto success;
857  }
858  ptr = UnknownFieldParse(tag,
859  _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
860  ptr, ctx);
861  CHK_(ptr != nullptr);
862  continue;
863  }
864  } // switch
865  } // while
866 success:
867  return ptr;
868 failure:
869  ptr = nullptr;
870  goto success;
871 #undef CHK_
872 }
873 
874 ::PROTOBUF_NAMESPACE_ID::uint8* PerRecipeDelays::_InternalSerialize(
875  ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
876  // @@protoc_insertion_point(serialize_to_array_start:operations_research.data.rcpsp.PerRecipeDelays)
877  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
878  (void) cached_has_bits;
879 
880  // repeated int32 min_delays = 1;
881  {
882  int byte_size = _min_delays_cached_byte_size_.load(std::memory_order_relaxed);
883  if (byte_size > 0) {
884  target = stream->WriteInt32Packed(
885  1, _internal_min_delays(), byte_size, target);
886  }
887  }
888 
889  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
890  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
891  _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
892  }
893  // @@protoc_insertion_point(serialize_to_array_end:operations_research.data.rcpsp.PerRecipeDelays)
894  return target;
895 }
896 
897 size_t PerRecipeDelays::ByteSizeLong() const {
898 // @@protoc_insertion_point(message_byte_size_start:operations_research.data.rcpsp.PerRecipeDelays)
899  size_t total_size = 0;
900 
901  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
902  // Prevent compiler warnings about cached_has_bits being unused
903  (void) cached_has_bits;
904 
905  // repeated int32 min_delays = 1;
906  {
907  size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
908  Int32Size(this->min_delays_);
909  if (data_size > 0) {
910  total_size += 1 +
911  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
912  static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
913  }
914  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
915  _min_delays_cached_byte_size_.store(cached_size,
916  std::memory_order_relaxed);
917  total_size += data_size;
918  }
919 
920  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
921  return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
922  _internal_metadata_, total_size, &_cached_size_);
923  }
924  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
925  SetCachedSize(cached_size);
926  return total_size;
927 }
928 
929 void PerRecipeDelays::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
930 // @@protoc_insertion_point(generalized_merge_from_start:operations_research.data.rcpsp.PerRecipeDelays)
931  GOOGLE_DCHECK_NE(&from, this);
932  const PerRecipeDelays* source =
933  ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<PerRecipeDelays>(
934  &from);
935  if (source == nullptr) {
936  // @@protoc_insertion_point(generalized_merge_from_cast_fail:operations_research.data.rcpsp.PerRecipeDelays)
937  ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
938  } else {
939  // @@protoc_insertion_point(generalized_merge_from_cast_success:operations_research.data.rcpsp.PerRecipeDelays)
940  MergeFrom(*source);
941  }
942 }
943 
944 void PerRecipeDelays::MergeFrom(const PerRecipeDelays& from) {
945 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.data.rcpsp.PerRecipeDelays)
946  GOOGLE_DCHECK_NE(&from, this);
947  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
948  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
949  (void) cached_has_bits;
950 
951  min_delays_.MergeFrom(from.min_delays_);
952 }
953 
954 void PerRecipeDelays::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
955 // @@protoc_insertion_point(generalized_copy_from_start:operations_research.data.rcpsp.PerRecipeDelays)
956  if (&from == this) return;
957  Clear();
958  MergeFrom(from);
959 }
960 
961 void PerRecipeDelays::CopyFrom(const PerRecipeDelays& from) {
962 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.data.rcpsp.PerRecipeDelays)
963  if (&from == this) return;
964  Clear();
965  MergeFrom(from);
966 }
967 
968 bool PerRecipeDelays::IsInitialized() const {
969  return true;
970 }
971 
972 void PerRecipeDelays::InternalSwap(PerRecipeDelays* other) {
973  using std::swap;
974  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
975  min_delays_.InternalSwap(&other->min_delays_);
976 }
977 
978 ::PROTOBUF_NAMESPACE_ID::Metadata PerRecipeDelays::GetMetadata() const {
979  return GetMetadataStatic();
980 }
981 
982 
983 // ===================================================================
984 
986  public:
987 };
988 
989 PerSuccessorDelays::PerSuccessorDelays(::PROTOBUF_NAMESPACE_ID::Arena* arena)
990  : ::PROTOBUF_NAMESPACE_ID::Message(arena),
991  recipe_delays_(arena) {
992  SharedCtor();
993  RegisterArenaDtor(arena);
994  // @@protoc_insertion_point(arena_constructor:operations_research.data.rcpsp.PerSuccessorDelays)
995 }
996 PerSuccessorDelays::PerSuccessorDelays(const PerSuccessorDelays& from)
997  : ::PROTOBUF_NAMESPACE_ID::Message(),
998  recipe_delays_(from.recipe_delays_) {
999  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1000  // @@protoc_insertion_point(copy_constructor:operations_research.data.rcpsp.PerSuccessorDelays)
1001 }
1002 
1003 void PerSuccessorDelays::SharedCtor() {
1004 }
1005 
1006 PerSuccessorDelays::~PerSuccessorDelays() {
1007  // @@protoc_insertion_point(destructor:operations_research.data.rcpsp.PerSuccessorDelays)
1008  SharedDtor();
1009  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1010 }
1011 
1012 void PerSuccessorDelays::SharedDtor() {
1013  GOOGLE_DCHECK(GetArena() == nullptr);
1014 }
1015 
1016 void PerSuccessorDelays::ArenaDtor(void* object) {
1017  PerSuccessorDelays* _this = reinterpret_cast< PerSuccessorDelays* >(object);
1018  (void)_this;
1019 }
1020 void PerSuccessorDelays::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
1021 }
1022 void PerSuccessorDelays::SetCachedSize(int size) const {
1023  _cached_size_.Set(size);
1024 }
1025 
1026 void PerSuccessorDelays::Clear() {
1027 // @@protoc_insertion_point(message_clear_start:operations_research.data.rcpsp.PerSuccessorDelays)
1028  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1029  // Prevent compiler warnings about cached_has_bits being unused
1030  (void) cached_has_bits;
1031 
1032  recipe_delays_.Clear();
1033  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1034 }
1035 
1036 const char* PerSuccessorDelays::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1037 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1038  while (!ctx->Done(&ptr)) {
1039  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1040  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1041  CHK_(ptr);
1042  switch (tag >> 3) {
1043  // repeated .operations_research.data.rcpsp.PerRecipeDelays recipe_delays = 1;
1044  case 1:
1045  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
1046  ptr -= 1;
1047  do {
1048  ptr += 1;
1049  ptr = ctx->ParseMessage(_internal_add_recipe_delays(), ptr);
1050  CHK_(ptr);
1051  if (!ctx->DataAvailable(ptr)) break;
1052  } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
1053  } else goto handle_unusual;
1054  continue;
1055  default: {
1056  handle_unusual:
1057  if ((tag & 7) == 4 || tag == 0) {
1058  ctx->SetLastTag(tag);
1059  goto success;
1060  }
1061  ptr = UnknownFieldParse(tag,
1062  _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
1063  ptr, ctx);
1064  CHK_(ptr != nullptr);
1065  continue;
1066  }
1067  } // switch
1068  } // while
1069 success:
1070  return ptr;
1071 failure:
1072  ptr = nullptr;
1073  goto success;
1074 #undef CHK_
1075 }
1076 
1077 ::PROTOBUF_NAMESPACE_ID::uint8* PerSuccessorDelays::_InternalSerialize(
1078  ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1079  // @@protoc_insertion_point(serialize_to_array_start:operations_research.data.rcpsp.PerSuccessorDelays)
1080  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1081  (void) cached_has_bits;
1082 
1083  // repeated .operations_research.data.rcpsp.PerRecipeDelays recipe_delays = 1;
1084  for (unsigned int i = 0,
1085  n = static_cast<unsigned int>(this->_internal_recipe_delays_size()); i < n; i++) {
1086  target = stream->EnsureSpace(target);
1087  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1088  InternalWriteMessage(1, this->_internal_recipe_delays(i), target, stream);
1089  }
1090 
1091  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1092  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
1093  _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
1094  }
1095  // @@protoc_insertion_point(serialize_to_array_end:operations_research.data.rcpsp.PerSuccessorDelays)
1096  return target;
1097 }
1098 
1099 size_t PerSuccessorDelays::ByteSizeLong() const {
1100 // @@protoc_insertion_point(message_byte_size_start:operations_research.data.rcpsp.PerSuccessorDelays)
1101  size_t total_size = 0;
1102 
1103  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1104  // Prevent compiler warnings about cached_has_bits being unused
1105  (void) cached_has_bits;
1106 
1107  // repeated .operations_research.data.rcpsp.PerRecipeDelays recipe_delays = 1;
1108  total_size += 1UL * this->_internal_recipe_delays_size();
1109  for (const auto& msg : this->recipe_delays_) {
1110  total_size +=
1111  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1112  }
1113 
1114  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1115  return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
1116  _internal_metadata_, total_size, &_cached_size_);
1117  }
1118  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1119  SetCachedSize(cached_size);
1120  return total_size;
1121 }
1122 
1123 void PerSuccessorDelays::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1124 // @@protoc_insertion_point(generalized_merge_from_start:operations_research.data.rcpsp.PerSuccessorDelays)
1125  GOOGLE_DCHECK_NE(&from, this);
1126  const PerSuccessorDelays* source =
1127  ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<PerSuccessorDelays>(
1128  &from);
1129  if (source == nullptr) {
1130  // @@protoc_insertion_point(generalized_merge_from_cast_fail:operations_research.data.rcpsp.PerSuccessorDelays)
1131  ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1132  } else {
1133  // @@protoc_insertion_point(generalized_merge_from_cast_success:operations_research.data.rcpsp.PerSuccessorDelays)
1134  MergeFrom(*source);
1135  }
1136 }
1137 
1138 void PerSuccessorDelays::MergeFrom(const PerSuccessorDelays& from) {
1139 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.data.rcpsp.PerSuccessorDelays)
1140  GOOGLE_DCHECK_NE(&from, this);
1141  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1142  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1143  (void) cached_has_bits;
1144 
1145  recipe_delays_.MergeFrom(from.recipe_delays_);
1146 }
1147 
1148 void PerSuccessorDelays::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1149 // @@protoc_insertion_point(generalized_copy_from_start:operations_research.data.rcpsp.PerSuccessorDelays)
1150  if (&from == this) return;
1151  Clear();
1152  MergeFrom(from);
1153 }
1154 
1155 void PerSuccessorDelays::CopyFrom(const PerSuccessorDelays& from) {
1156 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.data.rcpsp.PerSuccessorDelays)
1157  if (&from == this) return;
1158  Clear();
1159  MergeFrom(from);
1160 }
1161 
1162 bool PerSuccessorDelays::IsInitialized() const {
1163  return true;
1164 }
1165 
1166 void PerSuccessorDelays::InternalSwap(PerSuccessorDelays* other) {
1167  using std::swap;
1168  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
1169  recipe_delays_.InternalSwap(&other->recipe_delays_);
1170 }
1171 
1172 ::PROTOBUF_NAMESPACE_ID::Metadata PerSuccessorDelays::GetMetadata() const {
1173  return GetMetadataStatic();
1174 }
1175 
1176 
1177 // ===================================================================
1178 
1180  public:
1181 };
1182 
1183 Task::Task(::PROTOBUF_NAMESPACE_ID::Arena* arena)
1184  : ::PROTOBUF_NAMESPACE_ID::Message(arena),
1185  successors_(arena),
1186  recipes_(arena),
1187  successor_delays_(arena) {
1188  SharedCtor();
1189  RegisterArenaDtor(arena);
1190  // @@protoc_insertion_point(arena_constructor:operations_research.data.rcpsp.Task)
1191 }
1192 Task::Task(const Task& from)
1193  : ::PROTOBUF_NAMESPACE_ID::Message(),
1194  successors_(from.successors_),
1195  recipes_(from.recipes_),
1196  successor_delays_(from.successor_delays_) {
1197  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1198  // @@protoc_insertion_point(copy_constructor:operations_research.data.rcpsp.Task)
1199 }
1200 
1201 void Task::SharedCtor() {
1202 }
1203 
1204 Task::~Task() {
1205  // @@protoc_insertion_point(destructor:operations_research.data.rcpsp.Task)
1206  SharedDtor();
1207  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1208 }
1209 
1210 void Task::SharedDtor() {
1211  GOOGLE_DCHECK(GetArena() == nullptr);
1212 }
1213 
1214 void Task::ArenaDtor(void* object) {
1215  Task* _this = reinterpret_cast< Task* >(object);
1216  (void)_this;
1217 }
1218 void Task::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
1219 }
1220 void Task::SetCachedSize(int size) const {
1221  _cached_size_.Set(size);
1222 }
1223 
1224 void Task::Clear() {
1225 // @@protoc_insertion_point(message_clear_start:operations_research.data.rcpsp.Task)
1226  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1227  // Prevent compiler warnings about cached_has_bits being unused
1228  (void) cached_has_bits;
1229 
1230  successors_.Clear();
1231  recipes_.Clear();
1232  successor_delays_.Clear();
1233  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1234 }
1235 
1236 const char* Task::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1237 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1238  while (!ctx->Done(&ptr)) {
1239  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1240  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1241  CHK_(ptr);
1242  switch (tag >> 3) {
1243  // repeated int32 successors = 1;
1244  case 1:
1245  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
1246  ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_successors(), ptr, ctx);
1247  CHK_(ptr);
1248  } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8) {
1249  _internal_add_successors(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
1250  CHK_(ptr);
1251  } else goto handle_unusual;
1252  continue;
1253  // repeated .operations_research.data.rcpsp.Recipe recipes = 2;
1254  case 2:
1255  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
1256  ptr -= 1;
1257  do {
1258  ptr += 1;
1259  ptr = ctx->ParseMessage(_internal_add_recipes(), ptr);
1260  CHK_(ptr);
1261  if (!ctx->DataAvailable(ptr)) break;
1262  } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
1263  } else goto handle_unusual;
1264  continue;
1265  // repeated .operations_research.data.rcpsp.PerSuccessorDelays successor_delays = 3;
1266  case 3:
1267  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
1268  ptr -= 1;
1269  do {
1270  ptr += 1;
1271  ptr = ctx->ParseMessage(_internal_add_successor_delays(), ptr);
1272  CHK_(ptr);
1273  if (!ctx->DataAvailable(ptr)) break;
1274  } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
1275  } else goto handle_unusual;
1276  continue;
1277  default: {
1278  handle_unusual:
1279  if ((tag & 7) == 4 || tag == 0) {
1280  ctx->SetLastTag(tag);
1281  goto success;
1282  }
1283  ptr = UnknownFieldParse(tag,
1284  _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
1285  ptr, ctx);
1286  CHK_(ptr != nullptr);
1287  continue;
1288  }
1289  } // switch
1290  } // while
1291 success:
1292  return ptr;
1293 failure:
1294  ptr = nullptr;
1295  goto success;
1296 #undef CHK_
1297 }
1298 
1299 ::PROTOBUF_NAMESPACE_ID::uint8* Task::_InternalSerialize(
1300  ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1301  // @@protoc_insertion_point(serialize_to_array_start:operations_research.data.rcpsp.Task)
1302  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1303  (void) cached_has_bits;
1304 
1305  // repeated int32 successors = 1;
1306  {
1307  int byte_size = _successors_cached_byte_size_.load(std::memory_order_relaxed);
1308  if (byte_size > 0) {
1309  target = stream->WriteInt32Packed(
1310  1, _internal_successors(), byte_size, target);
1311  }
1312  }
1313 
1314  // repeated .operations_research.data.rcpsp.Recipe recipes = 2;
1315  for (unsigned int i = 0,
1316  n = static_cast<unsigned int>(this->_internal_recipes_size()); i < n; i++) {
1317  target = stream->EnsureSpace(target);
1318  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1319  InternalWriteMessage(2, this->_internal_recipes(i), target, stream);
1320  }
1321 
1322  // repeated .operations_research.data.rcpsp.PerSuccessorDelays successor_delays = 3;
1323  for (unsigned int i = 0,
1324  n = static_cast<unsigned int>(this->_internal_successor_delays_size()); i < n; i++) {
1325  target = stream->EnsureSpace(target);
1326  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1327  InternalWriteMessage(3, this->_internal_successor_delays(i), target, stream);
1328  }
1329 
1330  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1331  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
1332  _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
1333  }
1334  // @@protoc_insertion_point(serialize_to_array_end:operations_research.data.rcpsp.Task)
1335  return target;
1336 }
1337 
1338 size_t Task::ByteSizeLong() const {
1339 // @@protoc_insertion_point(message_byte_size_start:operations_research.data.rcpsp.Task)
1340  size_t total_size = 0;
1341 
1342  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1343  // Prevent compiler warnings about cached_has_bits being unused
1344  (void) cached_has_bits;
1345 
1346  // repeated int32 successors = 1;
1347  {
1348  size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1349  Int32Size(this->successors_);
1350  if (data_size > 0) {
1351  total_size += 1 +
1352  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1353  static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
1354  }
1355  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
1356  _successors_cached_byte_size_.store(cached_size,
1357  std::memory_order_relaxed);
1358  total_size += data_size;
1359  }
1360 
1361  // repeated .operations_research.data.rcpsp.Recipe recipes = 2;
1362  total_size += 1UL * this->_internal_recipes_size();
1363  for (const auto& msg : this->recipes_) {
1364  total_size +=
1365  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1366  }
1367 
1368  // repeated .operations_research.data.rcpsp.PerSuccessorDelays successor_delays = 3;
1369  total_size += 1UL * this->_internal_successor_delays_size();
1370  for (const auto& msg : this->successor_delays_) {
1371  total_size +=
1372  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1373  }
1374 
1375  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1376  return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
1377  _internal_metadata_, total_size, &_cached_size_);
1378  }
1379  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1380  SetCachedSize(cached_size);
1381  return total_size;
1382 }
1383 
1384 void Task::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1385 // @@protoc_insertion_point(generalized_merge_from_start:operations_research.data.rcpsp.Task)
1386  GOOGLE_DCHECK_NE(&from, this);
1387  const Task* source =
1388  ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Task>(
1389  &from);
1390  if (source == nullptr) {
1391  // @@protoc_insertion_point(generalized_merge_from_cast_fail:operations_research.data.rcpsp.Task)
1392  ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1393  } else {
1394  // @@protoc_insertion_point(generalized_merge_from_cast_success:operations_research.data.rcpsp.Task)
1395  MergeFrom(*source);
1396  }
1397 }
1398 
1399 void Task::MergeFrom(const Task& from) {
1400 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.data.rcpsp.Task)
1401  GOOGLE_DCHECK_NE(&from, this);
1402  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1403  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1404  (void) cached_has_bits;
1405 
1406  successors_.MergeFrom(from.successors_);
1407  recipes_.MergeFrom(from.recipes_);
1408  successor_delays_.MergeFrom(from.successor_delays_);
1409 }
1410 
1411 void Task::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1412 // @@protoc_insertion_point(generalized_copy_from_start:operations_research.data.rcpsp.Task)
1413  if (&from == this) return;
1414  Clear();
1415  MergeFrom(from);
1416 }
1417 
1418 void Task::CopyFrom(const Task& from) {
1419 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.data.rcpsp.Task)
1420  if (&from == this) return;
1421  Clear();
1422  MergeFrom(from);
1423 }
1424 
1425 bool Task::IsInitialized() const {
1426  return true;
1427 }
1428 
1429 void Task::InternalSwap(Task* other) {
1430  using std::swap;
1431  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
1432  successors_.InternalSwap(&other->successors_);
1433  recipes_.InternalSwap(&other->recipes_);
1434  successor_delays_.InternalSwap(&other->successor_delays_);
1435 }
1436 
1437 ::PROTOBUF_NAMESPACE_ID::Metadata Task::GetMetadata() const {
1438  return GetMetadataStatic();
1439 }
1440 
1441 
1442 // ===================================================================
1443 
1445  public:
1446 };
1447 
1448 RcpspProblem::RcpspProblem(::PROTOBUF_NAMESPACE_ID::Arena* arena)
1449  : ::PROTOBUF_NAMESPACE_ID::Message(arena),
1450  resources_(arena),
1451  tasks_(arena) {
1452  SharedCtor();
1453  RegisterArenaDtor(arena);
1454  // @@protoc_insertion_point(arena_constructor:operations_research.data.rcpsp.RcpspProblem)
1455 }
1456 RcpspProblem::RcpspProblem(const RcpspProblem& from)
1457  : ::PROTOBUF_NAMESPACE_ID::Message(),
1458  resources_(from.resources_),
1459  tasks_(from.tasks_) {
1460  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1461  basedata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1462  if (!from._internal_basedata().empty()) {
1463  basedata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_basedata(),
1464  GetArena());
1465  }
1466  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1467  if (!from._internal_name().empty()) {
1468  name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
1469  GetArena());
1470  }
1471  ::memcpy(&is_consumer_producer_, &from.is_consumer_producer_,
1472  static_cast<size_t>(reinterpret_cast<char*>(&due_date_) -
1473  reinterpret_cast<char*>(&is_consumer_producer_)) + sizeof(due_date_));
1474  // @@protoc_insertion_point(copy_constructor:operations_research.data.rcpsp.RcpspProblem)
1475 }
1476 
1477 void RcpspProblem::SharedCtor() {
1478 basedata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1479 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1480 ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
1481  reinterpret_cast<char*>(&is_consumer_producer_) - reinterpret_cast<char*>(this)),
1482  0, static_cast<size_t>(reinterpret_cast<char*>(&due_date_) -
1483  reinterpret_cast<char*>(&is_consumer_producer_)) + sizeof(due_date_));
1484 }
1485 
1486 RcpspProblem::~RcpspProblem() {
1487  // @@protoc_insertion_point(destructor:operations_research.data.rcpsp.RcpspProblem)
1488  SharedDtor();
1489  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1490 }
1491 
1492 void RcpspProblem::SharedDtor() {
1493  GOOGLE_DCHECK(GetArena() == nullptr);
1494  basedata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1495  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1496 }
1497 
1498 void RcpspProblem::ArenaDtor(void* object) {
1499  RcpspProblem* _this = reinterpret_cast< RcpspProblem* >(object);
1500  (void)_this;
1501 }
1502 void RcpspProblem::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
1503 }
1504 void RcpspProblem::SetCachedSize(int size) const {
1505  _cached_size_.Set(size);
1506 }
1507 
1508 void RcpspProblem::Clear() {
1509 // @@protoc_insertion_point(message_clear_start:operations_research.data.rcpsp.RcpspProblem)
1510  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1511  // Prevent compiler warnings about cached_has_bits being unused
1512  (void) cached_has_bits;
1513 
1514  resources_.Clear();
1515  tasks_.Clear();
1516  basedata_.ClearToEmpty();
1517  name_.ClearToEmpty();
1518  ::memset(&is_consumer_producer_, 0, static_cast<size_t>(
1519  reinterpret_cast<char*>(&due_date_) -
1520  reinterpret_cast<char*>(&is_consumer_producer_)) + sizeof(due_date_));
1521  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
1522 }
1523 
1524 const char* RcpspProblem::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1525 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1526  while (!ctx->Done(&ptr)) {
1527  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1528  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1529  CHK_(ptr);
1530  switch (tag >> 3) {
1531  // repeated .operations_research.data.rcpsp.Resource resources = 1;
1532  case 1:
1533  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
1534  ptr -= 1;
1535  do {
1536  ptr += 1;
1537  ptr = ctx->ParseMessage(_internal_add_resources(), ptr);
1538  CHK_(ptr);
1539  if (!ctx->DataAvailable(ptr)) break;
1540  } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
1541  } else goto handle_unusual;
1542  continue;
1543  // repeated .operations_research.data.rcpsp.Task tasks = 2;
1544  case 2:
1545  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
1546  ptr -= 1;
1547  do {
1548  ptr += 1;
1549  ptr = ctx->ParseMessage(_internal_add_tasks(), ptr);
1550  CHK_(ptr);
1551  if (!ctx->DataAvailable(ptr)) break;
1552  } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
1553  } else goto handle_unusual;
1554  continue;
1555  // bool is_consumer_producer = 3;
1556  case 3:
1557  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
1558  is_consumer_producer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1559  CHK_(ptr);
1560  } else goto handle_unusual;
1561  continue;
1562  // bool is_resource_investment = 4;
1563  case 4:
1564  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
1565  is_resource_investment_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1566  CHK_(ptr);
1567  } else goto handle_unusual;
1568  continue;
1569  // bool is_rcpsp_max = 5;
1570  case 5:
1571  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
1572  is_rcpsp_max_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1573  CHK_(ptr);
1574  } else goto handle_unusual;
1575  continue;
1576  // int32 deadline = 6;
1577  case 6:
1578  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
1579  deadline_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1580  CHK_(ptr);
1581  } else goto handle_unusual;
1582  continue;
1583  // int32 horizon = 7;
1584  case 7:
1585  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
1586  horizon_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1587  CHK_(ptr);
1588  } else goto handle_unusual;
1589  continue;
1590  // int32 release_date = 8;
1591  case 8:
1592  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
1593  release_date_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1594  CHK_(ptr);
1595  } else goto handle_unusual;
1596  continue;
1597  // int32 tardiness_cost = 9;
1598  case 9:
1599  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) {
1600  tardiness_cost_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1601  CHK_(ptr);
1602  } else goto handle_unusual;
1603  continue;
1604  // int32 mpm_time = 10;
1605  case 10:
1606  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) {
1607  mpm_time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1608  CHK_(ptr);
1609  } else goto handle_unusual;
1610  continue;
1611  // int64 seed = 11;
1612  case 11:
1613  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) {
1614  seed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1615  CHK_(ptr);
1616  } else goto handle_unusual;
1617  continue;
1618  // string basedata = 12;
1619  case 12:
1620  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) {
1621  auto str = _internal_mutable_basedata();
1622  ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
1623  CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "operations_research.data.rcpsp.RcpspProblem.basedata"));
1624  CHK_(ptr);
1625  } else goto handle_unusual;
1626  continue;
1627  // int32 due_date = 13;
1628  case 13:
1629  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) {
1630  due_date_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1631  CHK_(ptr);
1632  } else goto handle_unusual;
1633  continue;
1634  // string name = 14;
1635  case 14:
1636  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 114)) {
1637  auto str = _internal_mutable_name();
1638  ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
1639  CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "operations_research.data.rcpsp.RcpspProblem.name"));
1640  CHK_(ptr);
1641  } else goto handle_unusual;
1642  continue;
1643  default: {
1644  handle_unusual:
1645  if ((tag & 7) == 4 || tag == 0) {
1646  ctx->SetLastTag(tag);
1647  goto success;
1648  }
1649  ptr = UnknownFieldParse(tag,
1650  _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
1651  ptr, ctx);
1652  CHK_(ptr != nullptr);
1653  continue;
1654  }
1655  } // switch
1656  } // while
1657 success:
1658  return ptr;
1659 failure:
1660  ptr = nullptr;
1661  goto success;
1662 #undef CHK_
1663 }
1664 
1665 ::PROTOBUF_NAMESPACE_ID::uint8* RcpspProblem::_InternalSerialize(
1666  ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1667  // @@protoc_insertion_point(serialize_to_array_start:operations_research.data.rcpsp.RcpspProblem)
1668  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1669  (void) cached_has_bits;
1670 
1671  // repeated .operations_research.data.rcpsp.Resource resources = 1;
1672  for (unsigned int i = 0,
1673  n = static_cast<unsigned int>(this->_internal_resources_size()); i < n; i++) {
1674  target = stream->EnsureSpace(target);
1675  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1676  InternalWriteMessage(1, this->_internal_resources(i), target, stream);
1677  }
1678 
1679  // repeated .operations_research.data.rcpsp.Task tasks = 2;
1680  for (unsigned int i = 0,
1681  n = static_cast<unsigned int>(this->_internal_tasks_size()); i < n; i++) {
1682  target = stream->EnsureSpace(target);
1683  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1684  InternalWriteMessage(2, this->_internal_tasks(i), target, stream);
1685  }
1686 
1687  // bool is_consumer_producer = 3;
1688  if (this->is_consumer_producer() != 0) {
1689  target = stream->EnsureSpace(target);
1690  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_is_consumer_producer(), target);
1691  }
1692 
1693  // bool is_resource_investment = 4;
1694  if (this->is_resource_investment() != 0) {
1695  target = stream->EnsureSpace(target);
1696  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_is_resource_investment(), target);
1697  }
1698 
1699  // bool is_rcpsp_max = 5;
1700  if (this->is_rcpsp_max() != 0) {
1701  target = stream->EnsureSpace(target);
1702  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_is_rcpsp_max(), target);
1703  }
1704 
1705  // int32 deadline = 6;
1706  if (this->deadline() != 0) {
1707  target = stream->EnsureSpace(target);
1708  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(6, this->_internal_deadline(), target);
1709  }
1710 
1711  // int32 horizon = 7;
1712  if (this->horizon() != 0) {
1713  target = stream->EnsureSpace(target);
1714  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_horizon(), target);
1715  }
1716 
1717  // int32 release_date = 8;
1718  if (this->release_date() != 0) {
1719  target = stream->EnsureSpace(target);
1720  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(8, this->_internal_release_date(), target);
1721  }
1722 
1723  // int32 tardiness_cost = 9;
1724  if (this->tardiness_cost() != 0) {
1725  target = stream->EnsureSpace(target);
1726  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(9, this->_internal_tardiness_cost(), target);
1727  }
1728 
1729  // int32 mpm_time = 10;
1730  if (this->mpm_time() != 0) {
1731  target = stream->EnsureSpace(target);
1732  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(10, this->_internal_mpm_time(), target);
1733  }
1734 
1735  // int64 seed = 11;
1736  if (this->seed() != 0) {
1737  target = stream->EnsureSpace(target);
1738  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(11, this->_internal_seed(), target);
1739  }
1740 
1741  // string basedata = 12;
1742  if (this->basedata().size() > 0) {
1743  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1744  this->_internal_basedata().data(), static_cast<int>(this->_internal_basedata().length()),
1745  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1746  "operations_research.data.rcpsp.RcpspProblem.basedata");
1747  target = stream->WriteStringMaybeAliased(
1748  12, this->_internal_basedata(), target);
1749  }
1750 
1751  // int32 due_date = 13;
1752  if (this->due_date() != 0) {
1753  target = stream->EnsureSpace(target);
1754  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(13, this->_internal_due_date(), target);
1755  }
1756 
1757  // string name = 14;
1758  if (this->name().size() > 0) {
1759  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1760  this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
1761  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1762  "operations_research.data.rcpsp.RcpspProblem.name");
1763  target = stream->WriteStringMaybeAliased(
1764  14, this->_internal_name(), target);
1765  }
1766 
1767  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1768  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
1769  _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
1770  }
1771  // @@protoc_insertion_point(serialize_to_array_end:operations_research.data.rcpsp.RcpspProblem)
1772  return target;
1773 }
1774 
1775 size_t RcpspProblem::ByteSizeLong() const {
1776 // @@protoc_insertion_point(message_byte_size_start:operations_research.data.rcpsp.RcpspProblem)
1777  size_t total_size = 0;
1778 
1779  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1780  // Prevent compiler warnings about cached_has_bits being unused
1781  (void) cached_has_bits;
1782 
1783  // repeated .operations_research.data.rcpsp.Resource resources = 1;
1784  total_size += 1UL * this->_internal_resources_size();
1785  for (const auto& msg : this->resources_) {
1786  total_size +=
1787  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1788  }
1789 
1790  // repeated .operations_research.data.rcpsp.Task tasks = 2;
1791  total_size += 1UL * this->_internal_tasks_size();
1792  for (const auto& msg : this->tasks_) {
1793  total_size +=
1794  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1795  }
1796 
1797  // string basedata = 12;
1798  if (this->basedata().size() > 0) {
1799  total_size += 1 +
1800  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1801  this->_internal_basedata());
1802  }
1803 
1804  // string name = 14;
1805  if (this->name().size() > 0) {
1806  total_size += 1 +
1807  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1808  this->_internal_name());
1809  }
1810 
1811  // bool is_consumer_producer = 3;
1812  if (this->is_consumer_producer() != 0) {
1813  total_size += 1 + 1;
1814  }
1815 
1816  // bool is_resource_investment = 4;
1817  if (this->is_resource_investment() != 0) {
1818  total_size += 1 + 1;
1819  }
1820 
1821  // bool is_rcpsp_max = 5;
1822  if (this->is_rcpsp_max() != 0) {
1823  total_size += 1 + 1;
1824  }
1825 
1826  // int32 deadline = 6;
1827  if (this->deadline() != 0) {
1828  total_size += 1 +
1829  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1830  this->_internal_deadline());
1831  }
1832 
1833  // int32 horizon = 7;
1834  if (this->horizon() != 0) {
1835  total_size += 1 +
1836  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1837  this->_internal_horizon());
1838  }
1839 
1840  // int32 release_date = 8;
1841  if (this->release_date() != 0) {
1842  total_size += 1 +
1843  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1844  this->_internal_release_date());
1845  }
1846 
1847  // int32 tardiness_cost = 9;
1848  if (this->tardiness_cost() != 0) {
1849  total_size += 1 +
1850  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1851  this->_internal_tardiness_cost());
1852  }
1853 
1854  // int32 mpm_time = 10;
1855  if (this->mpm_time() != 0) {
1856  total_size += 1 +
1857  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1858  this->_internal_mpm_time());
1859  }
1860 
1861  // int64 seed = 11;
1862  if (this->seed() != 0) {
1863  total_size += 1 +
1864  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1865  this->_internal_seed());
1866  }
1867 
1868  // int32 due_date = 13;
1869  if (this->due_date() != 0) {
1870  total_size += 1 +
1871  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1872  this->_internal_due_date());
1873  }
1874 
1875  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1876  return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
1877  _internal_metadata_, total_size, &_cached_size_);
1878  }
1879  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1880  SetCachedSize(cached_size);
1881  return total_size;
1882 }
1883 
1884 void RcpspProblem::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1885 // @@protoc_insertion_point(generalized_merge_from_start:operations_research.data.rcpsp.RcpspProblem)
1886  GOOGLE_DCHECK_NE(&from, this);
1887  const RcpspProblem* source =
1888  ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RcpspProblem>(
1889  &from);
1890  if (source == nullptr) {
1891  // @@protoc_insertion_point(generalized_merge_from_cast_fail:operations_research.data.rcpsp.RcpspProblem)
1892  ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1893  } else {
1894  // @@protoc_insertion_point(generalized_merge_from_cast_success:operations_research.data.rcpsp.RcpspProblem)
1895  MergeFrom(*source);
1896  }
1897 }
1898 
1899 void RcpspProblem::MergeFrom(const RcpspProblem& from) {
1900 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.data.rcpsp.RcpspProblem)
1901  GOOGLE_DCHECK_NE(&from, this);
1902  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
1903  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1904  (void) cached_has_bits;
1905 
1906  resources_.MergeFrom(from.resources_);
1907  tasks_.MergeFrom(from.tasks_);
1908  if (from.basedata().size() > 0) {
1909  _internal_set_basedata(from._internal_basedata());
1910  }
1911  if (from.name().size() > 0) {
1912  _internal_set_name(from._internal_name());
1913  }
1914  if (from.is_consumer_producer() != 0) {
1915  _internal_set_is_consumer_producer(from._internal_is_consumer_producer());
1916  }
1917  if (from.is_resource_investment() != 0) {
1918  _internal_set_is_resource_investment(from._internal_is_resource_investment());
1919  }
1920  if (from.is_rcpsp_max() != 0) {
1921  _internal_set_is_rcpsp_max(from._internal_is_rcpsp_max());
1922  }
1923  if (from.deadline() != 0) {
1924  _internal_set_deadline(from._internal_deadline());
1925  }
1926  if (from.horizon() != 0) {
1927  _internal_set_horizon(from._internal_horizon());
1928  }
1929  if (from.release_date() != 0) {
1930  _internal_set_release_date(from._internal_release_date());
1931  }
1932  if (from.tardiness_cost() != 0) {
1933  _internal_set_tardiness_cost(from._internal_tardiness_cost());
1934  }
1935  if (from.mpm_time() != 0) {
1936  _internal_set_mpm_time(from._internal_mpm_time());
1937  }
1938  if (from.seed() != 0) {
1939  _internal_set_seed(from._internal_seed());
1940  }
1941  if (from.due_date() != 0) {
1942  _internal_set_due_date(from._internal_due_date());
1943  }
1944 }
1945 
1946 void RcpspProblem::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1947 // @@protoc_insertion_point(generalized_copy_from_start:operations_research.data.rcpsp.RcpspProblem)
1948  if (&from == this) return;
1949  Clear();
1950  MergeFrom(from);
1951 }
1952 
1953 void RcpspProblem::CopyFrom(const RcpspProblem& from) {
1954 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.data.rcpsp.RcpspProblem)
1955  if (&from == this) return;
1956  Clear();
1957  MergeFrom(from);
1958 }
1959 
1960 bool RcpspProblem::IsInitialized() const {
1961  return true;
1962 }
1963 
1964 void RcpspProblem::InternalSwap(RcpspProblem* other) {
1965  using std::swap;
1966  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
1967  resources_.InternalSwap(&other->resources_);
1968  tasks_.InternalSwap(&other->tasks_);
1969  basedata_.Swap(&other->basedata_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
1970  name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
1971  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1972  PROTOBUF_FIELD_OFFSET(RcpspProblem, due_date_)
1973  + sizeof(RcpspProblem::due_date_)
1974  - PROTOBUF_FIELD_OFFSET(RcpspProblem, is_consumer_producer_)>(
1975  reinterpret_cast<char*>(&is_consumer_producer_),
1976  reinterpret_cast<char*>(&other->is_consumer_producer_));
1977 }
1978 
1979 ::PROTOBUF_NAMESPACE_ID::Metadata RcpspProblem::GetMetadata() const {
1980  return GetMetadataStatic();
1981 }
1982 
1983 
1984 // @@protoc_insertion_point(namespace_scope)
1985 } // namespace rcpsp
1986 } // namespace data
1987 } // namespace operations_research
1988 PROTOBUF_NAMESPACE_OPEN
1989 template<> PROTOBUF_NOINLINE ::operations_research::data::rcpsp::Resource* Arena::CreateMaybeMessage< ::operations_research::data::rcpsp::Resource >(Arena* arena) {
1990  return Arena::CreateMessageInternal< ::operations_research::data::rcpsp::Resource >(arena);
1991 }
1992 template<> PROTOBUF_NOINLINE ::operations_research::data::rcpsp::Recipe* Arena::CreateMaybeMessage< ::operations_research::data::rcpsp::Recipe >(Arena* arena) {
1993  return Arena::CreateMessageInternal< ::operations_research::data::rcpsp::Recipe >(arena);
1994 }
1995 template<> PROTOBUF_NOINLINE ::operations_research::data::rcpsp::PerRecipeDelays* Arena::CreateMaybeMessage< ::operations_research::data::rcpsp::PerRecipeDelays >(Arena* arena) {
1996  return Arena::CreateMessageInternal< ::operations_research::data::rcpsp::PerRecipeDelays >(arena);
1997 }
1998 template<> PROTOBUF_NOINLINE ::operations_research::data::rcpsp::PerSuccessorDelays* Arena::CreateMaybeMessage< ::operations_research::data::rcpsp::PerSuccessorDelays >(Arena* arena) {
1999  return Arena::CreateMessageInternal< ::operations_research::data::rcpsp::PerSuccessorDelays >(arena);
2000 }
2001 template<> PROTOBUF_NOINLINE ::operations_research::data::rcpsp::Task* Arena::CreateMaybeMessage< ::operations_research::data::rcpsp::Task >(Arena* arena) {
2002  return Arena::CreateMessageInternal< ::operations_research::data::rcpsp::Task >(arena);
2003 }
2004 template<> PROTOBUF_NOINLINE ::operations_research::data::rcpsp::RcpspProblem* Arena::CreateMaybeMessage< ::operations_research::data::rcpsp::RcpspProblem >(Arena* arena) {
2005  return Arena::CreateMessageInternal< ::operations_research::data::rcpsp::RcpspProblem >(arena);
2006 }
2007 PROTOBUF_NAMESPACE_CLOSE
2008 
2009 // @@protoc_insertion_point(global_scope)
2010 #include <google/protobuf/port_undef.inc>
const std::string name
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ResourceDefaultTypeInternal _Resource_default_instance_
Definition: rcpsp.pb.cc:36
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PerSuccessorDelaysDefaultTypeInternal _PerSuccessorDelays_default_instance_
Definition: rcpsp.pb.cc:77
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TaskDefaultTypeInternal _Task_default_instance_
Definition: rcpsp.pb.cc:92
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RcpspProblemDefaultTypeInternal _RcpspProblem_default_instance_
Definition: rcpsp.pb.cc:117
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PerRecipeDelaysDefaultTypeInternal _PerRecipeDelays_default_instance_
Definition: rcpsp.pb.cc:65
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RecipeDefaultTypeInternal _Recipe_default_instance_
Definition: rcpsp.pb.cc:52
void swap(IdMap< K, V > &a, IdMap< K, V > &b)
Definition: id_map.h:263
Collection of objects used to extend the Constraint Solver library.
static constexpr ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema * schemas
int index
Definition: pack.cc:509
PROTOBUF_NOINLINE ::operations_research::data::rcpsp::PerRecipeDelays * Arena::CreateMaybeMessage< ::operations_research::data::rcpsp::PerRecipeDelays >(Arena *arena)
Definition: rcpsp.pb.cc:1995
#define CHK_(x)
::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_ortools_2fdata_2frcpsp_2eproto[6]
Definition: rcpsp.pb.cc:121
PROTOBUF_NOINLINE ::operations_research::data::rcpsp::PerSuccessorDelays * Arena::CreateMaybeMessage< ::operations_research::data::rcpsp::PerSuccessorDelays >(Arena *arena)
Definition: rcpsp.pb.cc:1998
PROTOBUF_NOINLINE ::operations_research::data::rcpsp::Recipe * Arena::CreateMaybeMessage< ::operations_research::data::rcpsp::Recipe >(Arena *arena)
Definition: rcpsp.pb.cc:1992
::PROTOBUF_NAMESPACE_ID::Message const *const file_default_instances[]
Definition: rcpsp.pb.cc:192
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ortools_2fdata_2frcpsp_2eproto
Definition: rcpsp.pb.cc:229
PROTOBUF_NAMESPACE_OPEN PROTOBUF_NOINLINE ::operations_research::data::rcpsp::Resource * Arena::CreateMaybeMessage< ::operations_research::data::rcpsp::Resource >(Arena *arena)
Definition: rcpsp.pb.cc:1989
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const ** file_level_service_descriptors_ortools_2fdata_2frcpsp_2eproto
Definition: rcpsp.pb.cc:123
PROTOBUF_NOINLINE ::operations_research::data::rcpsp::Task * Arena::CreateMaybeMessage< ::operations_research::data::rcpsp::Task >(Arena *arena)
Definition: rcpsp.pb.cc:2001
PROTOBUF_NOINLINE ::operations_research::data::rcpsp::RcpspProblem * Arena::CreateMaybeMessage< ::operations_research::data::rcpsp::RcpspProblem >(Arena *arena)
Definition: rcpsp.pb.cc:2004
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const ** file_level_enum_descriptors_ortools_2fdata_2frcpsp_2eproto
Definition: rcpsp.pb.cc:122
::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ortools_2fdata_2frcpsp_2eproto_once
Definition: rcpsp.pb.cc:228
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_ortools_2fdata_2frcpsp_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold)
PROTOBUF_ATTRIBUTE_WEAK ::PROTOBUF_NAMESPACE_ID::Metadata descriptor_table_ortools_2fdata_2frcpsp_2eproto_metadata_getter(int index)
Definition: rcpsp.pb.cc:236
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]
Definition: rcpsp.pb.h:53