Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
BooleanProblem.pb.cs
Go to the documentation of this file.
1// <auto-generated>
2// Generated by the protocol buffer compiler. DO NOT EDIT!
3// source: ortools/sat/boolean_problem.proto
4// </auto-generated>
5#pragma warning disable 1591, 0612, 3021, 8981
6#region Designer generated code
7
8using pb = global::Google.Protobuf;
9using pbc = global::Google.Protobuf.Collections;
10using pbr = global::Google.Protobuf.Reflection;
11using scg = global::System.Collections.Generic;
12namespace Google.OrTools.Sat {
13
15 public static partial class BooleanProblemReflection {
16
17 #region Descriptor
19 public static pbr::FileDescriptor Descriptor {
20 get { return descriptor; }
21 }
22 private static pbr::FileDescriptor descriptor;
23
25 byte[] descriptorData = global::System.Convert.FromBase64String(
26 string.Concat(
27 "CiFvcnRvb2xzL3NhdC9ib29sZWFuX3Byb2JsZW0ucHJvdG8SF29wZXJhdGlv",
28 "bnNfcmVzZWFyY2guc2F0InsKF0xpbmVhckJvb2xlYW5Db25zdHJhaW50EhAK",
29 "CGxpdGVyYWxzGAEgAygFEhQKDGNvZWZmaWNpZW50cxgCIAMoAxITCgtsb3dl",
30 "cl9ib3VuZBgDIAEoAxITCgt1cHBlcl9ib3VuZBgEIAEoAxIOCgRuYW1lGAUg",
31 "ASgJOgAiZwoPTGluZWFyT2JqZWN0aXZlEhAKCGxpdGVyYWxzGAEgAygFEhQK",
32 "DGNvZWZmaWNpZW50cxgCIAMoAxIRCgZvZmZzZXQYAyABKAE6ATASGQoOc2Nh",
33 "bGluZ19mYWN0b3IYBCABKAE6ATEiJQoRQm9vbGVhbkFzc2lnbm1lbnQSEAoI",
34 "bGl0ZXJhbHMYASADKAUitAIKFExpbmVhckJvb2xlYW5Qcm9ibGVtEg4KBG5h",
35 "bWUYASABKAk6ABIVCg1udW1fdmFyaWFibGVzGAMgASgFEkUKC2NvbnN0cmFp",
36 "bnRzGAQgAygLMjAub3BlcmF0aW9uc19yZXNlYXJjaC5zYXQuTGluZWFyQm9v",
37 "bGVhbkNvbnN0cmFpbnQSOwoJb2JqZWN0aXZlGAUgASgLMigub3BlcmF0aW9u",
38 "c19yZXNlYXJjaC5zYXQuTGluZWFyT2JqZWN0aXZlEhEKCXZhcl9uYW1lcxgG",
39 "IAMoCRI+Cgphc3NpZ25tZW50GAcgASgLMioub3BlcmF0aW9uc19yZXNlYXJj",
40 "aC5zYXQuQm9vbGVhbkFzc2lnbm1lbnQSHgoWb3JpZ2luYWxfbnVtX3Zhcmlh",
41 "YmxlcxgIIAEoBUIvChZjb20uZ29vZ2xlLm9ydG9vbHMuc2F0UAGqAhJHb29n",
42 "bGUuT3JUb29scy5TYXQ="));
43 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
44 new pbr::FileDescriptor[] { },
45 new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
46 new pbr::GeneratedClrTypeInfo(typeof(global::Google.OrTools.Sat.LinearBooleanConstraint), global::Google.OrTools.Sat.LinearBooleanConstraint.Parser, new[]{ "Literals", "Coefficients", "LowerBound", "UpperBound", "Name" }, null, null, null, null),
47 new pbr::GeneratedClrTypeInfo(typeof(global::Google.OrTools.Sat.LinearObjective), global::Google.OrTools.Sat.LinearObjective.Parser, new[]{ "Literals", "Coefficients", "Offset", "ScalingFactor" }, null, null, null, null),
48 new pbr::GeneratedClrTypeInfo(typeof(global::Google.OrTools.Sat.BooleanAssignment), global::Google.OrTools.Sat.BooleanAssignment.Parser, new[]{ "Literals" }, null, null, null, null),
49 new pbr::GeneratedClrTypeInfo(typeof(global::Google.OrTools.Sat.LinearBooleanProblem), global::Google.OrTools.Sat.LinearBooleanProblem.Parser, new[]{ "Name", "NumVariables", "Constraints", "Objective", "VarNames", "Assignment", "OriginalNumVariables" }, null, null, null, null)
50 }));
51 }
52 #endregion
53
54 }
55 #region Messages
62 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
63 public sealed partial class LinearBooleanConstraint : pb::IMessage<LinearBooleanConstraint>
64 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
65 , pb::IBufferMessage
66 #endif
67 {
68 private static readonly pb::MessageParser<LinearBooleanConstraint> _parser = new pb::MessageParser<LinearBooleanConstraint>(() => new LinearBooleanConstraint());
69 private pb::UnknownFieldSet _unknownFields;
70 private int _hasBits0;
71 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
72 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
73 public static pb::MessageParser<LinearBooleanConstraint> Parser { get { return _parser; } }
74
75 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
76 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
77 public static pbr::MessageDescriptor Descriptor {
78 get { return global::Google.OrTools.Sat.BooleanProblemReflection.Descriptor.MessageTypes[0]; }
79 }
80
81 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
82 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
83 pbr::MessageDescriptor pb::IMessage.Descriptor {
84 get { return Descriptor; }
85 }
86
87 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
88 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
90 OnConstruction();
91 }
92
93 partial void OnConstruction();
94
95 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
96 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
98 _hasBits0 = other._hasBits0;
99 literals_ = other.literals_.Clone();
100 coefficients_ = other.coefficients_.Clone();
101 lowerBound_ = other.lowerBound_;
102 upperBound_ = other.upperBound_;
103 name_ = other.name_;
104 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
105 }
106
107 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
108 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
110 return new LinearBooleanConstraint(this);
111 }
112
114 public const int LiteralsFieldNumber = 1;
115 private static readonly pb::FieldCodec<int> _repeated_literals_codec
116 = pb::FieldCodec.ForInt32(8);
117 private readonly pbc::RepeatedField<int> literals_ = new pbc::RepeatedField<int>();
129 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
130 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
131 public pbc::RepeatedField<int> Literals {
132 get { return literals_; }
134
136 public const int CoefficientsFieldNumber = 2;
137 private static readonly pb::FieldCodec<long> _repeated_coefficients_codec
138 = pb::FieldCodec.ForInt64(16);
139 private readonly pbc::RepeatedField<long> coefficients_ = new pbc::RepeatedField<long>();
140 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
141 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
142 public pbc::RepeatedField<long> Coefficients {
143 get { return coefficients_; }
145
147 public const int LowerBoundFieldNumber = 3;
148 private readonly static long LowerBoundDefaultValue = 0L;
150 private long lowerBound_;
156 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
157 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
158 public long LowerBound {
159 get { if ((_hasBits0 & 1) != 0) { return lowerBound_; } else { return LowerBoundDefaultValue; } }
160 set {
161 _hasBits0 |= 1;
162 lowerBound_ = value;
163 }
164 }
166 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
167 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
168 public bool HasLowerBound {
169 get { return (_hasBits0 & 1) != 0; }
172 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
173 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
174 public void ClearLowerBound() {
175 _hasBits0 &= ~1;
177
179 public const int UpperBoundFieldNumber = 4;
180 private readonly static long UpperBoundDefaultValue = 0L;
182 private long upperBound_;
183 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
184 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
185 public long UpperBound {
186 get { if ((_hasBits0 & 2) != 0) { return upperBound_; } else { return UpperBoundDefaultValue; } }
187 set {
188 _hasBits0 |= 2;
189 upperBound_ = value;
190 }
191 }
193 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
194 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
195 public bool HasUpperBound {
196 get { return (_hasBits0 & 2) != 0; }
199 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
200 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
201 public void ClearUpperBound() {
202 _hasBits0 &= ~2;
204
206 public const int NameFieldNumber = 5;
207 private readonly static string NameDefaultValue = "";
209 private string name_;
213 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
214 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
215 public string Name {
216 get { return name_ ?? NameDefaultValue; }
217 set {
218 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
219 }
220 }
222 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
223 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
224 public bool HasName {
225 get { return name_ != null; }
228 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
229 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
230 public void ClearName() {
231 name_ = null;
233
234 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
235 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
236 public override bool Equals(object other) {
237 return Equals(other as LinearBooleanConstraint);
239
240 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
241 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
242 public bool Equals(LinearBooleanConstraint other) {
243 if (ReferenceEquals(other, null)) {
244 return false;
245 }
246 if (ReferenceEquals(other, this)) {
247 return true;
248 }
249 if(!literals_.Equals(other.literals_)) return false;
250 if(!coefficients_.Equals(other.coefficients_)) return false;
251 if (LowerBound != other.LowerBound) return false;
252 if (UpperBound != other.UpperBound) return false;
253 if (Name != other.Name) return false;
254 return Equals(_unknownFields, other._unknownFields);
255 }
256
257 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
258 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
259 public override int GetHashCode() {
260 int hash = 1;
261 hash ^= literals_.GetHashCode();
262 hash ^= coefficients_.GetHashCode();
263 if (HasLowerBound) hash ^= LowerBound.GetHashCode();
264 if (HasUpperBound) hash ^= UpperBound.GetHashCode();
265 if (HasName) hash ^= Name.GetHashCode();
266 if (_unknownFields != null) {
267 hash ^= _unknownFields.GetHashCode();
268 }
269 return hash;
270 }
271
272 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
273 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
274 public override string ToString() {
275 return pb::JsonFormatter.ToDiagnosticString(this);
277
278 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
279 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
280 public void WriteTo(pb::CodedOutputStream output) {
281 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
282 output.WriteRawMessage(this);
283 #else
284 literals_.WriteTo(output, _repeated_literals_codec);
285 coefficients_.WriteTo(output, _repeated_coefficients_codec);
286 if (HasLowerBound) {
287 output.WriteRawTag(24);
288 output.WriteInt64(LowerBound);
289 }
290 if (HasUpperBound) {
291 output.WriteRawTag(32);
292 output.WriteInt64(UpperBound);
293 }
294 if (HasName) {
295 output.WriteRawTag(42);
296 output.WriteString(Name);
297 }
298 if (_unknownFields != null) {
299 _unknownFields.WriteTo(output);
300 }
301 #endif
302 }
303
304 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
305 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
306 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
307 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
308 literals_.WriteTo(ref output, _repeated_literals_codec);
309 coefficients_.WriteTo(ref output, _repeated_coefficients_codec);
310 if (HasLowerBound) {
311 output.WriteRawTag(24);
312 output.WriteInt64(LowerBound);
313 }
314 if (HasUpperBound) {
315 output.WriteRawTag(32);
316 output.WriteInt64(UpperBound);
317 }
318 if (HasName) {
319 output.WriteRawTag(42);
320 output.WriteString(Name);
321 }
322 if (_unknownFields != null) {
323 _unknownFields.WriteTo(ref output);
324 }
325 }
326 #endif
327
328 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
329 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
330 public int CalculateSize() {
331 int size = 0;
332 size += literals_.CalculateSize(_repeated_literals_codec);
333 size += coefficients_.CalculateSize(_repeated_coefficients_codec);
334 if (HasLowerBound) {
335 size += 1 + pb::CodedOutputStream.ComputeInt64Size(LowerBound);
336 }
337 if (HasUpperBound) {
338 size += 1 + pb::CodedOutputStream.ComputeInt64Size(UpperBound);
339 }
340 if (HasName) {
341 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
342 }
343 if (_unknownFields != null) {
344 size += _unknownFields.CalculateSize();
345 }
346 return size;
347 }
348
349 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
350 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
351 public void MergeFrom(LinearBooleanConstraint other) {
352 if (other == null) {
353 return;
354 }
355 literals_.Add(other.literals_);
356 coefficients_.Add(other.coefficients_);
357 if (other.HasLowerBound) {
358 LowerBound = other.LowerBound;
359 }
360 if (other.HasUpperBound) {
361 UpperBound = other.UpperBound;
362 }
363 if (other.HasName) {
364 Name = other.Name;
365 }
366 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
367 }
368
369 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
370 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
371 public void MergeFrom(pb::CodedInputStream input) {
372 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
373 input.ReadRawMessage(this);
374 #else
375 uint tag;
376 while ((tag = input.ReadTag()) != 0) {
377 switch(tag) {
378 default:
379 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
380 break;
381 case 10:
382 case 8: {
383 literals_.AddEntriesFrom(input, _repeated_literals_codec);
384 break;
385 }
386 case 18:
387 case 16: {
388 coefficients_.AddEntriesFrom(input, _repeated_coefficients_codec);
389 break;
390 }
391 case 24: {
392 LowerBound = input.ReadInt64();
393 break;
394 }
395 case 32: {
396 UpperBound = input.ReadInt64();
397 break;
398 }
399 case 42: {
400 Name = input.ReadString();
401 break;
402 }
403 }
404 }
405 #endif
406 }
407
408 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
409 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
410 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
411 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
412 uint tag;
413 while ((tag = input.ReadTag()) != 0) {
414 switch(tag) {
415 default:
416 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
417 break;
418 case 10:
419 case 8: {
420 literals_.AddEntriesFrom(ref input, _repeated_literals_codec);
421 break;
422 }
423 case 18:
424 case 16: {
425 coefficients_.AddEntriesFrom(ref input, _repeated_coefficients_codec);
426 break;
427 }
428 case 24: {
429 LowerBound = input.ReadInt64();
430 break;
431 }
432 case 32: {
433 UpperBound = input.ReadInt64();
434 break;
435 }
436 case 42: {
437 Name = input.ReadString();
438 break;
439 }
440 }
441 }
442 }
443 #endif
444
445 }
446
450 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
451 public sealed partial class LinearObjective : pb::IMessage<LinearObjective>
452 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
453 , pb::IBufferMessage
454 #endif
455 {
456 private static readonly pb::MessageParser<LinearObjective> _parser = new pb::MessageParser<LinearObjective>(() => new LinearObjective());
457 private pb::UnknownFieldSet _unknownFields;
458 private int _hasBits0;
459 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
460 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
461 public static pb::MessageParser<LinearObjective> Parser { get { return _parser; } }
462
463 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
464 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
465 public static pbr::MessageDescriptor Descriptor {
466 get { return global::Google.OrTools.Sat.BooleanProblemReflection.Descriptor.MessageTypes[1]; }
468
469 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
470 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
471 pbr::MessageDescriptor pb::IMessage.Descriptor {
472 get { return Descriptor; }
473 }
474
475 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
476 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
477 public LinearObjective() {
478 OnConstruction();
480
481 partial void OnConstruction();
482
483 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
484 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
485 public LinearObjective(LinearObjective other) : this() {
486 _hasBits0 = other._hasBits0;
487 literals_ = other.literals_.Clone();
488 coefficients_ = other.coefficients_.Clone();
489 offset_ = other.offset_;
490 scalingFactor_ = other.scalingFactor_;
491 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
492 }
493
494 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
495 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
496 public LinearObjective Clone() {
497 return new LinearObjective(this);
499
501 public const int LiteralsFieldNumber = 1;
502 private static readonly pb::FieldCodec<int> _repeated_literals_codec
503 = pb::FieldCodec.ForInt32(8);
504 private readonly pbc::RepeatedField<int> literals_ = new pbc::RepeatedField<int>();
513 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
514 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
515 public pbc::RepeatedField<int> Literals {
516 get { return literals_; }
517 }
520 public const int CoefficientsFieldNumber = 2;
521 private static readonly pb::FieldCodec<long> _repeated_coefficients_codec
522 = pb::FieldCodec.ForInt64(16);
523 private readonly pbc::RepeatedField<long> coefficients_ = new pbc::RepeatedField<long>();
524 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
525 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
526 public pbc::RepeatedField<long> Coefficients {
527 get { return coefficients_; }
528 }
531 public const int OffsetFieldNumber = 3;
532 private readonly static double OffsetDefaultValue = 0D;
533
534 private double offset_;
544 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
545 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
546 public double Offset {
547 get { if ((_hasBits0 & 1) != 0) { return offset_; } else { return OffsetDefaultValue; } }
548 set {
549 _hasBits0 |= 1;
550 offset_ = value;
551 }
552 }
554 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
555 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
556 public bool HasOffset {
557 get { return (_hasBits0 & 1) != 0; }
558 }
560 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
561 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
562 public void ClearOffset() {
563 _hasBits0 &= ~1;
564 }
565
567 public const int ScalingFactorFieldNumber = 4;
568 private readonly static double ScalingFactorDefaultValue = 1D;
569
570 private double scalingFactor_;
571 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
572 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
573 public double ScalingFactor {
574 get { if ((_hasBits0 & 2) != 0) { return scalingFactor_; } else { return ScalingFactorDefaultValue; } }
575 set {
576 _hasBits0 |= 2;
577 scalingFactor_ = value;
578 }
579 }
581 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
582 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
583 public bool HasScalingFactor {
584 get { return (_hasBits0 & 2) != 0; }
585 }
587 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
588 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
589 public void ClearScalingFactor() {
590 _hasBits0 &= ~2;
591 }
592
593 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
594 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
595 public override bool Equals(object other) {
596 return Equals(other as LinearObjective);
597 }
598
599 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
600 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
601 public bool Equals(LinearObjective other) {
602 if (ReferenceEquals(other, null)) {
603 return false;
604 }
605 if (ReferenceEquals(other, this)) {
606 return true;
607 }
608 if(!literals_.Equals(other.literals_)) return false;
609 if(!coefficients_.Equals(other.coefficients_)) return false;
610 if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Offset, other.Offset)) return false;
611 if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(ScalingFactor, other.ScalingFactor)) return false;
612 return Equals(_unknownFields, other._unknownFields);
613 }
614
615 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
616 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
617 public override int GetHashCode() {
618 int hash = 1;
619 hash ^= literals_.GetHashCode();
620 hash ^= coefficients_.GetHashCode();
621 if (HasOffset) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Offset);
622 if (HasScalingFactor) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(ScalingFactor);
623 if (_unknownFields != null) {
624 hash ^= _unknownFields.GetHashCode();
625 }
626 return hash;
627 }
628
629 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
630 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
631 public override string ToString() {
632 return pb::JsonFormatter.ToDiagnosticString(this);
633 }
634
635 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
636 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
637 public void WriteTo(pb::CodedOutputStream output) {
638 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
639 output.WriteRawMessage(this);
640 #else
641 literals_.WriteTo(output, _repeated_literals_codec);
642 coefficients_.WriteTo(output, _repeated_coefficients_codec);
643 if (HasOffset) {
644 output.WriteRawTag(25);
645 output.WriteDouble(Offset);
646 }
647 if (HasScalingFactor) {
648 output.WriteRawTag(33);
649 output.WriteDouble(ScalingFactor);
650 }
651 if (_unknownFields != null) {
652 _unknownFields.WriteTo(output);
653 }
654 #endif
655 }
656
657 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
658 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
659 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
660 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
661 literals_.WriteTo(ref output, _repeated_literals_codec);
662 coefficients_.WriteTo(ref output, _repeated_coefficients_codec);
663 if (HasOffset) {
664 output.WriteRawTag(25);
665 output.WriteDouble(Offset);
666 }
667 if (HasScalingFactor) {
668 output.WriteRawTag(33);
669 output.WriteDouble(ScalingFactor);
670 }
671 if (_unknownFields != null) {
672 _unknownFields.WriteTo(ref output);
673 }
674 }
675 #endif
676
677 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
678 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
679 public int CalculateSize() {
680 int size = 0;
681 size += literals_.CalculateSize(_repeated_literals_codec);
682 size += coefficients_.CalculateSize(_repeated_coefficients_codec);
684 size += 1 + 8;
685 }
686 if (HasScalingFactor) {
687 size += 1 + 8;
688 }
689 if (_unknownFields != null) {
690 size += _unknownFields.CalculateSize();
691 }
692 return size;
693 }
694
695 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
696 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
697 public void MergeFrom(LinearObjective other) {
698 if (other == null) {
699 return;
700 }
701 literals_.Add(other.literals_);
702 coefficients_.Add(other.coefficients_);
703 if (other.HasOffset) {
704 Offset = other.Offset;
705 }
706 if (other.HasScalingFactor) {
707 ScalingFactor = other.ScalingFactor;
708 }
709 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
710 }
711
712 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
713 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
714 public void MergeFrom(pb::CodedInputStream input) {
715 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
716 input.ReadRawMessage(this);
717 #else
718 uint tag;
719 while ((tag = input.ReadTag()) != 0) {
720 switch(tag) {
721 default:
722 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
723 break;
724 case 10:
725 case 8: {
726 literals_.AddEntriesFrom(input, _repeated_literals_codec);
727 break;
728 }
729 case 18:
730 case 16: {
731 coefficients_.AddEntriesFrom(input, _repeated_coefficients_codec);
732 break;
733 }
734 case 25: {
735 Offset = input.ReadDouble();
736 break;
737 }
738 case 33: {
739 ScalingFactor = input.ReadDouble();
740 break;
741 }
742 }
743 }
744 #endif
745 }
746
747 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
748 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
749 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
750 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
751 uint tag;
752 while ((tag = input.ReadTag()) != 0) {
753 switch(tag) {
754 default:
755 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
756 break;
757 case 10:
758 case 8: {
759 literals_.AddEntriesFrom(ref input, _repeated_literals_codec);
760 break;
761 }
762 case 18:
763 case 16: {
764 coefficients_.AddEntriesFrom(ref input, _repeated_coefficients_codec);
765 break;
766 }
767 case 25: {
768 Offset = input.ReadDouble();
769 break;
770 }
771 case 33: {
772 ScalingFactor = input.ReadDouble();
773 break;
774 }
775 }
776 }
777 }
778 #endif
779
780 }
781
789 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
790 public sealed partial class BooleanAssignment : pb::IMessage<BooleanAssignment>
791 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
792 , pb::IBufferMessage
793 #endif
795 private static readonly pb::MessageParser<BooleanAssignment> _parser = new pb::MessageParser<BooleanAssignment>(() => new BooleanAssignment());
796 private pb::UnknownFieldSet _unknownFields;
797 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
798 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
799 public static pb::MessageParser<BooleanAssignment> Parser { get { return _parser; } }
800
801 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
802 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
803 public static pbr::MessageDescriptor Descriptor {
804 get { return global::Google.OrTools.Sat.BooleanProblemReflection.Descriptor.MessageTypes[2]; }
805 }
806
807 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
808 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
809 pbr::MessageDescriptor pb::IMessage.Descriptor {
810 get { return Descriptor; }
811 }
812
813 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
814 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
815 public BooleanAssignment() {
816 OnConstruction();
817 }
818
819 partial void OnConstruction();
820
821 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
822 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
823 public BooleanAssignment(BooleanAssignment other) : this() {
824 literals_ = other.literals_.Clone();
825 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
826 }
828 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
829 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
830 public BooleanAssignment Clone() {
831 return new BooleanAssignment(this);
832 }
833
835 public const int LiteralsFieldNumber = 1;
836 private static readonly pb::FieldCodec<int> _repeated_literals_codec
837 = pb::FieldCodec.ForInt32(8);
838 private readonly pbc::RepeatedField<int> literals_ = new pbc::RepeatedField<int>();
839 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
840 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
841 public pbc::RepeatedField<int> Literals {
842 get { return literals_; }
843 }
844
845 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
846 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
847 public override bool Equals(object other) {
848 return Equals(other as BooleanAssignment);
849 }
850
851 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
852 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
853 public bool Equals(BooleanAssignment other) {
854 if (ReferenceEquals(other, null)) {
855 return false;
856 }
857 if (ReferenceEquals(other, this)) {
858 return true;
859 }
860 if(!literals_.Equals(other.literals_)) return false;
861 return Equals(_unknownFields, other._unknownFields);
862 }
863
864 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
865 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
866 public override int GetHashCode() {
867 int hash = 1;
868 hash ^= literals_.GetHashCode();
869 if (_unknownFields != null) {
870 hash ^= _unknownFields.GetHashCode();
871 }
872 return hash;
873 }
874
875 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
876 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
877 public override string ToString() {
878 return pb::JsonFormatter.ToDiagnosticString(this);
879 }
880
881 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
882 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
883 public void WriteTo(pb::CodedOutputStream output) {
884 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
885 output.WriteRawMessage(this);
886 #else
887 literals_.WriteTo(output, _repeated_literals_codec);
888 if (_unknownFields != null) {
889 _unknownFields.WriteTo(output);
890 }
891 #endif
892 }
893
894 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
895 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
896 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
897 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
898 literals_.WriteTo(ref output, _repeated_literals_codec);
899 if (_unknownFields != null) {
900 _unknownFields.WriteTo(ref output);
901 }
902 }
903 #endif
904
905 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
906 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
907 public int CalculateSize() {
908 int size = 0;
909 size += literals_.CalculateSize(_repeated_literals_codec);
910 if (_unknownFields != null) {
911 size += _unknownFields.CalculateSize();
912 }
913 return size;
914 }
915
916 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
917 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
918 public void MergeFrom(BooleanAssignment other) {
919 if (other == null) {
920 return;
921 }
922 literals_.Add(other.literals_);
923 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
924 }
925
926 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
927 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
928 public void MergeFrom(pb::CodedInputStream input) {
929 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
930 input.ReadRawMessage(this);
931 #else
932 uint tag;
933 while ((tag = input.ReadTag()) != 0) {
934 switch(tag) {
935 default:
936 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
937 break;
938 case 10:
939 case 8: {
940 literals_.AddEntriesFrom(input, _repeated_literals_codec);
941 break;
942 }
943 }
944 }
945 #endif
946 }
947
948 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
949 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
950 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
951 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
952 uint tag;
953 while ((tag = input.ReadTag()) != 0) {
954 switch(tag) {
955 default:
956 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
957 break;
958 case 10:
959 case 8: {
960 literals_.AddEntriesFrom(ref input, _repeated_literals_codec);
961 break;
962 }
963 }
964 }
965 }
966 #endif
967
968 }
969
973 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
974 public sealed partial class LinearBooleanProblem : pb::IMessage<LinearBooleanProblem>
975 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
976 , pb::IBufferMessage
977 #endif
979 private static readonly pb::MessageParser<LinearBooleanProblem> _parser = new pb::MessageParser<LinearBooleanProblem>(() => new LinearBooleanProblem());
980 private pb::UnknownFieldSet _unknownFields;
981 private int _hasBits0;
982 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
983 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
984 public static pb::MessageParser<LinearBooleanProblem> Parser { get { return _parser; } }
985
986 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
987 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
988 public static pbr::MessageDescriptor Descriptor {
989 get { return global::Google.OrTools.Sat.BooleanProblemReflection.Descriptor.MessageTypes[3]; }
990 }
991
992 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
993 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
994 pbr::MessageDescriptor pb::IMessage.Descriptor {
995 get { return Descriptor; }
996 }
997
998 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
999 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1000 public LinearBooleanProblem() {
1001 OnConstruction();
1002 }
1003
1004 partial void OnConstruction();
1005
1006 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1007 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1008 public LinearBooleanProblem(LinearBooleanProblem other) : this() {
1009 _hasBits0 = other._hasBits0;
1010 name_ = other.name_;
1011 numVariables_ = other.numVariables_;
1012 constraints_ = other.constraints_.Clone();
1013 objective_ = other.objective_ != null ? other.objective_.Clone() : null;
1014 varNames_ = other.varNames_.Clone();
1015 assignment_ = other.assignment_ != null ? other.assignment_.Clone() : null;
1016 originalNumVariables_ = other.originalNumVariables_;
1017 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
1018 }
1019
1020 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1021 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1022 public LinearBooleanProblem Clone() {
1023 return new LinearBooleanProblem(this);
1024 }
1025
1027 public const int NameFieldNumber = 1;
1028 private readonly static string NameDefaultValue = "";
1029
1030 private string name_;
1034 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1035 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1036 public string Name {
1037 get { return name_ ?? NameDefaultValue; }
1038 set {
1039 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
1041 }
1043 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1044 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1045 public bool HasName {
1046 get { return name_ != null; }
1047 }
1049 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1050 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1051 public void ClearName() {
1052 name_ = null;
1053 }
1054
1056 public const int NumVariablesFieldNumber = 3;
1057 private readonly static int NumVariablesDefaultValue = 0;
1058
1059 private int numVariables_;
1065 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1066 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1067 public int NumVariables {
1068 get { if ((_hasBits0 & 1) != 0) { return numVariables_; } else { return NumVariablesDefaultValue; } }
1069 set {
1070 _hasBits0 |= 1;
1071 numVariables_ = value;
1072 }
1073 }
1075 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1076 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1077 public bool HasNumVariables {
1078 get { return (_hasBits0 & 1) != 0; }
1079 }
1081 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1082 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1083 public void ClearNumVariables() {
1084 _hasBits0 &= ~1;
1085 }
1086
1088 public const int ConstraintsFieldNumber = 4;
1089 private static readonly pb::FieldCodec<global::Google.OrTools.Sat.LinearBooleanConstraint> _repeated_constraints_codec
1090 = pb::FieldCodec.ForMessage(34, global::Google.OrTools.Sat.LinearBooleanConstraint.Parser);
1091 private readonly pbc::RepeatedField<global::Google.OrTools.Sat.LinearBooleanConstraint> constraints_ = new pbc::RepeatedField<global::Google.OrTools.Sat.LinearBooleanConstraint>();
1095 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1096 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1097 public pbc::RepeatedField<global::Google.OrTools.Sat.LinearBooleanConstraint> Constraints {
1098 get { return constraints_; }
1099 }
1100
1102 public const int ObjectiveFieldNumber = 5;
1103 private global::Google.OrTools.Sat.LinearObjective objective_;
1108 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1109 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1110 public global::Google.OrTools.Sat.LinearObjective Objective {
1111 get { return objective_; }
1112 set {
1113 objective_ = value;
1115 }
1116
1118 public const int VarNamesFieldNumber = 6;
1119 private static readonly pb::FieldCodec<string> _repeated_varNames_codec
1120 = pb::FieldCodec.ForString(50);
1121 private readonly pbc::RepeatedField<string> varNames_ = new pbc::RepeatedField<string>();
1127 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1128 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1129 public pbc::RepeatedField<string> VarNames {
1130 get { return varNames_; }
1131 }
1132
1134 public const int AssignmentFieldNumber = 7;
1135 private global::Google.OrTools.Sat.BooleanAssignment assignment_;
1140 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1141 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1142 public global::Google.OrTools.Sat.BooleanAssignment Assignment {
1143 get { return assignment_; }
1144 set {
1145 assignment_ = value;
1147 }
1148
1150 public const int OriginalNumVariablesFieldNumber = 8;
1151 private readonly static int OriginalNumVariablesDefaultValue = 0;
1152
1153 private int originalNumVariables_;
1160 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1161 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1162 public int OriginalNumVariables {
1163 get { if ((_hasBits0 & 2) != 0) { return originalNumVariables_; } else { return OriginalNumVariablesDefaultValue; } }
1164 set {
1165 _hasBits0 |= 2;
1166 originalNumVariables_ = value;
1167 }
1168 }
1170 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1171 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1172 public bool HasOriginalNumVariables {
1173 get { return (_hasBits0 & 2) != 0; }
1174 }
1176 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1177 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1178 public void ClearOriginalNumVariables() {
1179 _hasBits0 &= ~2;
1180 }
1181
1182 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1183 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1184 public override bool Equals(object other) {
1185 return Equals(other as LinearBooleanProblem);
1186 }
1187
1188 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1189 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1190 public bool Equals(LinearBooleanProblem other) {
1191 if (ReferenceEquals(other, null)) {
1192 return false;
1193 }
1194 if (ReferenceEquals(other, this)) {
1195 return true;
1196 }
1197 if (Name != other.Name) return false;
1198 if (NumVariables != other.NumVariables) return false;
1199 if(!constraints_.Equals(other.constraints_)) return false;
1200 if (!object.Equals(Objective, other.Objective)) return false;
1201 if(!varNames_.Equals(other.varNames_)) return false;
1202 if (!object.Equals(Assignment, other.Assignment)) return false;
1203 if (OriginalNumVariables != other.OriginalNumVariables) return false;
1204 return Equals(_unknownFields, other._unknownFields);
1205 }
1206
1207 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1208 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1209 public override int GetHashCode() {
1210 int hash = 1;
1211 if (HasName) hash ^= Name.GetHashCode();
1212 if (HasNumVariables) hash ^= NumVariables.GetHashCode();
1213 hash ^= constraints_.GetHashCode();
1214 if (objective_ != null) hash ^= Objective.GetHashCode();
1215 hash ^= varNames_.GetHashCode();
1216 if (assignment_ != null) hash ^= Assignment.GetHashCode();
1217 if (HasOriginalNumVariables) hash ^= OriginalNumVariables.GetHashCode();
1218 if (_unknownFields != null) {
1219 hash ^= _unknownFields.GetHashCode();
1220 }
1221 return hash;
1222 }
1223
1224 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1225 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1226 public override string ToString() {
1227 return pb::JsonFormatter.ToDiagnosticString(this);
1228 }
1229
1230 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1231 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1232 public void WriteTo(pb::CodedOutputStream output) {
1233 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1234 output.WriteRawMessage(this);
1235 #else
1236 if (HasName) {
1237 output.WriteRawTag(10);
1238 output.WriteString(Name);
1239 }
1240 if (HasNumVariables) {
1241 output.WriteRawTag(24);
1242 output.WriteInt32(NumVariables);
1243 }
1244 constraints_.WriteTo(output, _repeated_constraints_codec);
1245 if (objective_ != null) {
1246 output.WriteRawTag(42);
1247 output.WriteMessage(Objective);
1248 }
1249 varNames_.WriteTo(output, _repeated_varNames_codec);
1250 if (assignment_ != null) {
1251 output.WriteRawTag(58);
1252 output.WriteMessage(Assignment);
1253 }
1254 if (HasOriginalNumVariables) {
1255 output.WriteRawTag(64);
1256 output.WriteInt32(OriginalNumVariables);
1257 }
1258 if (_unknownFields != null) {
1259 _unknownFields.WriteTo(output);
1260 }
1261 #endif
1262 }
1263
1264 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1265 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1266 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1267 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
1268 if (HasName) {
1269 output.WriteRawTag(10);
1270 output.WriteString(Name);
1271 }
1272 if (HasNumVariables) {
1273 output.WriteRawTag(24);
1274 output.WriteInt32(NumVariables);
1275 }
1276 constraints_.WriteTo(ref output, _repeated_constraints_codec);
1277 if (objective_ != null) {
1278 output.WriteRawTag(42);
1279 output.WriteMessage(Objective);
1280 }
1281 varNames_.WriteTo(ref output, _repeated_varNames_codec);
1282 if (assignment_ != null) {
1283 output.WriteRawTag(58);
1284 output.WriteMessage(Assignment);
1285 }
1286 if (HasOriginalNumVariables) {
1287 output.WriteRawTag(64);
1288 output.WriteInt32(OriginalNumVariables);
1289 }
1290 if (_unknownFields != null) {
1291 _unknownFields.WriteTo(ref output);
1292 }
1293 }
1294 #endif
1295
1296 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1297 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1298 public int CalculateSize() {
1299 int size = 0;
1300 if (HasName) {
1301 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
1303 if (HasNumVariables) {
1304 size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumVariables);
1305 }
1306 size += constraints_.CalculateSize(_repeated_constraints_codec);
1307 if (objective_ != null) {
1308 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Objective);
1309 }
1310 size += varNames_.CalculateSize(_repeated_varNames_codec);
1311 if (assignment_ != null) {
1312 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Assignment);
1313 }
1314 if (HasOriginalNumVariables) {
1315 size += 1 + pb::CodedOutputStream.ComputeInt32Size(OriginalNumVariables);
1316 }
1317 if (_unknownFields != null) {
1318 size += _unknownFields.CalculateSize();
1319 }
1320 return size;
1321 }
1322
1323 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1324 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1325 public void MergeFrom(LinearBooleanProblem other) {
1326 if (other == null) {
1327 return;
1328 }
1329 if (other.HasName) {
1330 Name = other.Name;
1331 }
1332 if (other.HasNumVariables) {
1333 NumVariables = other.NumVariables;
1334 }
1335 constraints_.Add(other.constraints_);
1336 if (other.objective_ != null) {
1337 if (objective_ == null) {
1338 Objective = new global::Google.OrTools.Sat.LinearObjective();
1339 }
1340 Objective.MergeFrom(other.Objective);
1341 }
1342 varNames_.Add(other.varNames_);
1343 if (other.assignment_ != null) {
1344 if (assignment_ == null) {
1345 Assignment = new global::Google.OrTools.Sat.BooleanAssignment();
1346 }
1347 Assignment.MergeFrom(other.Assignment);
1348 }
1349 if (other.HasOriginalNumVariables) {
1350 OriginalNumVariables = other.OriginalNumVariables;
1351 }
1352 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
1353 }
1354
1355 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1356 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1357 public void MergeFrom(pb::CodedInputStream input) {
1358 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1359 input.ReadRawMessage(this);
1360 #else
1361 uint tag;
1362 while ((tag = input.ReadTag()) != 0) {
1363 switch(tag) {
1364 default:
1365 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
1366 break;
1367 case 10: {
1368 Name = input.ReadString();
1369 break;
1370 }
1371 case 24: {
1372 NumVariables = input.ReadInt32();
1373 break;
1374 }
1375 case 34: {
1376 constraints_.AddEntriesFrom(input, _repeated_constraints_codec);
1377 break;
1378 }
1379 case 42: {
1380 if (objective_ == null) {
1381 Objective = new global::Google.OrTools.Sat.LinearObjective();
1382 }
1383 input.ReadMessage(Objective);
1384 break;
1385 }
1386 case 50: {
1387 varNames_.AddEntriesFrom(input, _repeated_varNames_codec);
1388 break;
1389 }
1390 case 58: {
1391 if (assignment_ == null) {
1392 Assignment = new global::Google.OrTools.Sat.BooleanAssignment();
1393 }
1394 input.ReadMessage(Assignment);
1395 break;
1396 }
1397 case 64: {
1398 OriginalNumVariables = input.ReadInt32();
1399 break;
1400 }
1401 }
1402 }
1403 #endif
1404 }
1405
1406 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1407 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1408 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1409 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
1410 uint tag;
1411 while ((tag = input.ReadTag()) != 0) {
1412 switch(tag) {
1413 default:
1414 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
1415 break;
1416 case 10: {
1417 Name = input.ReadString();
1418 break;
1419 }
1420 case 24: {
1421 NumVariables = input.ReadInt32();
1422 break;
1423 }
1424 case 34: {
1425 constraints_.AddEntriesFrom(ref input, _repeated_constraints_codec);
1426 break;
1427 }
1428 case 42: {
1429 if (objective_ == null) {
1430 Objective = new global::Google.OrTools.Sat.LinearObjective();
1431 }
1432 input.ReadMessage(Objective);
1433 break;
1434 }
1435 case 50: {
1436 varNames_.AddEntriesFrom(ref input, _repeated_varNames_codec);
1437 break;
1438 }
1439 case 58: {
1440 if (assignment_ == null) {
1441 Assignment = new global::Google.OrTools.Sat.BooleanAssignment();
1442 }
1443 input.ReadMessage(Assignment);
1444 break;
1445 }
1446 case 64: {
1447 OriginalNumVariables = input.ReadInt32();
1448 break;
1449 }
1450 }
1451 }
1452 }
1453 #endif
1454
1455 }
1456
1457 #endregion
1458
1459}
1460
1461#endregion Designer generated code
global::Google.Protobuf.Reflection pbr
global::System.Collections.Generic scg
global::Google.Protobuf.Collections pbc
Definition SetCover.pb.cs:9
global::Google.Protobuf pb
Definition SetCover.pb.cs:8
Stores an assignment of variables as a list of true literals using their signed representation....
const int LiteralsFieldNumber
Field number for the "literals" field.
static pb::MessageParser< BooleanAssignment > Parser
override bool Equals(object other)
static pbr::MessageDescriptor Descriptor
void MergeFrom(BooleanAssignment other)
void WriteTo(pb::CodedOutputStream output)
Holder for reflection information generated from ortools/sat/boolean_problem.proto.
static pbr::FileDescriptor Descriptor
File descriptor for ortools/sat/boolean_problem.proto.
A linear Boolean constraint which is a bounded sum of linear terms. Each term beeing a literal times ...
bool HasName
Gets whether the "name" field is set.
const int CoefficientsFieldNumber
Field number for the "coefficients" field.
void ClearLowerBound()
Clears the value of the "lower_bound" field.
static pb::MessageParser< LinearBooleanConstraint > Parser
pbc::RepeatedField< int > Literals
Linear terms involved in this constraint.
const int LiteralsFieldNumber
Field number for the "literals" field.
LinearBooleanConstraint(LinearBooleanConstraint other)
bool HasLowerBound
Gets whether the "lower_bound" field is set.
bool HasUpperBound
Gets whether the "upper_bound" field is set.
void ClearUpperBound()
Clears the value of the "upper_bound" field.
string Name
The name of this constraint.
long LowerBound
Optional lower (resp. upper) bound of the constraint. If not present, it means that the constraint is...
void ClearName()
Clears the value of the "name" field.
static pbr::MessageDescriptor Descriptor
void MergeFrom(LinearBooleanConstraint other)
const int LowerBoundFieldNumber
Field number for the "lower_bound" field.
const int NameFieldNumber
Field number for the "name" field.
const int UpperBoundFieldNumber
Field number for the "upper_bound" field.
void WriteTo(pb::CodedOutputStream output)
string Name
The name of the problem.
const int ConstraintsFieldNumber
Field number for the "constraints" field.
void ClearNumVariables()
Clears the value of the "num_variables" field.
static pb::MessageParser< LinearBooleanProblem > Parser
int NumVariables
The number of variables in the problem. All the signed representation of the problem literals must be...
global::Google.OrTools.Sat.LinearObjective Objective
The objective of the problem. If left empty, we just have a satisfiability problem.
static pbr::MessageDescriptor Descriptor
const int NameFieldNumber
Field number for the "name" field.
pbc::RepeatedField< global::Google.OrTools.Sat.LinearBooleanConstraint > Constraints
The constraints of the problem.
bool HasName
Gets whether the "name" field is set.
global::Google.OrTools.Sat.BooleanAssignment Assignment
Stores an assignment of the problem variables. That may be an initial feasible solution,...
const int NumVariablesFieldNumber
Field number for the "num_variables" field.
void ClearName()
Clears the value of the "name" field.
int OriginalNumVariables
Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created....
bool HasNumVariables
Gets whether the "num_variables" field is set.
The objective of an optimization problem.
pbc::RepeatedField< long > Coefficients
double Offset
For a given variable assignment, the "real" problem objective value is 'scaling_factor * (minimizatio...
pbc::RepeatedField< int > Literals
The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_...
void ClearScalingFactor()
Clears the value of the "scaling_factor" field.
void MergeFrom(LinearObjective other)
void WriteTo(pb::CodedOutputStream output)
static pbr::MessageDescriptor Descriptor
const int OffsetFieldNumber
Field number for the "offset" field.
const int LiteralsFieldNumber
Field number for the "literals" field.
override bool Equals(object other)
bool HasScalingFactor
Gets whether the "scaling_factor" field is set.
const int CoefficientsFieldNumber
Field number for the "coefficients" field.
static pb::MessageParser< LinearObjective > Parser
const int ScalingFactorFieldNumber
Field number for the "scaling_factor" field.
bool HasOffset
Gets whether the "offset" field is set.
void ClearOffset()
Clears the value of the "offset" field.