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