Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
SISRRuinStrategy.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// NO CHECKED-IN PROTOBUF GENCODE
3// source: ortools/constraint_solver/routing_ils.proto
4// Protobuf Java Version: 4.29.3
5
6package com.google.ortools.constraintsolver;
7
86public final class SISRRuinStrategy extends
87 com.google.protobuf.GeneratedMessage implements
88 // @@protoc_insertion_point(message_implements:operations_research.SISRRuinStrategy)
90private static final long serialVersionUID = 0L;
91 static {
92 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
93 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
94 /* major= */ 4,
95 /* minor= */ 29,
96 /* patch= */ 3,
97 /* suffix= */ "",
98 SISRRuinStrategy.class.getName());
99 }
100 // Use SISRRuinStrategy.newBuilder() to construct.
101 private SISRRuinStrategy(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
102 super(builder);
103 }
104 private SISRRuinStrategy() {
105 }
106
107 public static final com.google.protobuf.Descriptors.Descriptor
109 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SISRRuinStrategy_descriptor;
110 }
111
112 @java.lang.Override
113 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
115 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SISRRuinStrategy_fieldAccessorTable
116 .ensureFieldAccessorsInitialized(
117 com.google.ortools.constraintsolver.SISRRuinStrategy.class, com.google.ortools.constraintsolver.SISRRuinStrategy.Builder.class);
118 }
119
120 private int bitField0_;
121 public static final int MAX_REMOVED_SEQUENCE_SIZE_FIELD_NUMBER = 1;
122 private int maxRemovedSequenceSize_ = 0;
132 @java.lang.Override
133 public boolean hasMaxRemovedSequenceSize() {
134 return ((bitField0_ & 0x00000001) != 0);
135 }
136
145 @java.lang.Override
147 return maxRemovedSequenceSize_;
148 }
149
150 public static final int AVG_NUM_REMOVED_VISITS_FIELD_NUMBER = 2;
151 private int avgNumRemovedVisits_ = 0;
161 @java.lang.Override
162 public boolean hasAvgNumRemovedVisits() {
163 return ((bitField0_ & 0x00000002) != 0);
164 }
165
174 @java.lang.Override
176 return avgNumRemovedVisits_;
177 }
178
179 public static final int BYPASS_FACTOR_FIELD_NUMBER = 3;
180 private double bypassFactor_ = 0D;
191 @java.lang.Override
192 public boolean hasBypassFactor() {
193 return ((bitField0_ & 0x00000004) != 0);
194 }
195
205 @java.lang.Override
206 public double getBypassFactor() {
207 return bypassFactor_;
208 }
209
210 private byte memoizedIsInitialized = -1;
211 @java.lang.Override
212 public final boolean isInitialized() {
213 byte isInitialized = memoizedIsInitialized;
214 if (isInitialized == 1) return true;
215 if (isInitialized == 0) return false;
216
217 memoizedIsInitialized = 1;
218 return true;
219 }
220
221 @java.lang.Override
222 public void writeTo(com.google.protobuf.CodedOutputStream output)
223 throws java.io.IOException {
224 if (((bitField0_ & 0x00000001) != 0)) {
225 output.writeUInt32(1, maxRemovedSequenceSize_);
226 }
227 if (((bitField0_ & 0x00000002) != 0)) {
228 output.writeUInt32(2, avgNumRemovedVisits_);
229 }
230 if (((bitField0_ & 0x00000004) != 0)) {
231 output.writeDouble(3, bypassFactor_);
232 }
233 getUnknownFields().writeTo(output);
234 }
235
236 @java.lang.Override
237 public int getSerializedSize() {
238 int size = memoizedSize;
239 if (size != -1) return size;
240
241 size = 0;
242 if (((bitField0_ & 0x00000001) != 0)) {
243 size += com.google.protobuf.CodedOutputStream
244 .computeUInt32Size(1, maxRemovedSequenceSize_);
245 }
246 if (((bitField0_ & 0x00000002) != 0)) {
247 size += com.google.protobuf.CodedOutputStream
248 .computeUInt32Size(2, avgNumRemovedVisits_);
249 }
250 if (((bitField0_ & 0x00000004) != 0)) {
251 size += com.google.protobuf.CodedOutputStream
252 .computeDoubleSize(3, bypassFactor_);
253 }
254 size += getUnknownFields().getSerializedSize();
255 memoizedSize = size;
256 return size;
257 }
258
259 @java.lang.Override
260 public boolean equals(final java.lang.Object obj) {
261 if (obj == this) {
262 return true;
263 }
264 if (!(obj instanceof com.google.ortools.constraintsolver.SISRRuinStrategy)) {
265 return super.equals(obj);
266 }
267 com.google.ortools.constraintsolver.SISRRuinStrategy other = (com.google.ortools.constraintsolver.SISRRuinStrategy) obj;
268
269 if (hasMaxRemovedSequenceSize() != other.hasMaxRemovedSequenceSize()) return false;
272 != other.getMaxRemovedSequenceSize()) return false;
273 }
274 if (hasAvgNumRemovedVisits() != other.hasAvgNumRemovedVisits()) return false;
277 != other.getAvgNumRemovedVisits()) return false;
278 }
279 if (hasBypassFactor() != other.hasBypassFactor()) return false;
280 if (hasBypassFactor()) {
281 if (java.lang.Double.doubleToLongBits(getBypassFactor())
282 != java.lang.Double.doubleToLongBits(
283 other.getBypassFactor())) return false;
284 }
285 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
286 return true;
287 }
288
289 @java.lang.Override
290 public int hashCode() {
291 if (memoizedHashCode != 0) {
292 return memoizedHashCode;
293 }
294 int hash = 41;
295 hash = (19 * hash) + getDescriptor().hashCode();
297 hash = (37 * hash) + MAX_REMOVED_SEQUENCE_SIZE_FIELD_NUMBER;
298 hash = (53 * hash) + getMaxRemovedSequenceSize();
299 }
301 hash = (37 * hash) + AVG_NUM_REMOVED_VISITS_FIELD_NUMBER;
302 hash = (53 * hash) + getAvgNumRemovedVisits();
303 }
304 if (hasBypassFactor()) {
305 hash = (37 * hash) + BYPASS_FACTOR_FIELD_NUMBER;
306 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
307 java.lang.Double.doubleToLongBits(getBypassFactor()));
308 }
309 hash = (29 * hash) + getUnknownFields().hashCode();
310 memoizedHashCode = hash;
311 return hash;
312 }
313
315 java.nio.ByteBuffer data)
316 throws com.google.protobuf.InvalidProtocolBufferException {
317 return PARSER.parseFrom(data);
318 }
320 java.nio.ByteBuffer data,
321 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
322 throws com.google.protobuf.InvalidProtocolBufferException {
323 return PARSER.parseFrom(data, extensionRegistry);
324 }
326 com.google.protobuf.ByteString data)
327 throws com.google.protobuf.InvalidProtocolBufferException {
328 return PARSER.parseFrom(data);
329 }
331 com.google.protobuf.ByteString data,
332 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
333 throws com.google.protobuf.InvalidProtocolBufferException {
334 return PARSER.parseFrom(data, extensionRegistry);
335 }
337 throws com.google.protobuf.InvalidProtocolBufferException {
338 return PARSER.parseFrom(data);
339 }
341 byte[] data,
342 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
343 throws com.google.protobuf.InvalidProtocolBufferException {
344 return PARSER.parseFrom(data, extensionRegistry);
345 }
347 throws java.io.IOException {
348 return com.google.protobuf.GeneratedMessage
349 .parseWithIOException(PARSER, input);
350 }
352 java.io.InputStream input,
353 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
354 throws java.io.IOException {
355 return com.google.protobuf.GeneratedMessage
356 .parseWithIOException(PARSER, input, extensionRegistry);
357 }
358
360 throws java.io.IOException {
361 return com.google.protobuf.GeneratedMessage
362 .parseDelimitedWithIOException(PARSER, input);
363 }
364
366 java.io.InputStream input,
367 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
368 throws java.io.IOException {
369 return com.google.protobuf.GeneratedMessage
370 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
371 }
373 com.google.protobuf.CodedInputStream input)
374 throws java.io.IOException {
375 return com.google.protobuf.GeneratedMessage
376 .parseWithIOException(PARSER, input);
377 }
379 com.google.protobuf.CodedInputStream input,
380 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
381 throws java.io.IOException {
382 return com.google.protobuf.GeneratedMessage
383 .parseWithIOException(PARSER, input, extensionRegistry);
384 }
385
386 @java.lang.Override
387 public Builder newBuilderForType() { return newBuilder(); }
388 public static Builder newBuilder() {
389 return DEFAULT_INSTANCE.toBuilder();
390 }
391 public static Builder newBuilder(com.google.ortools.constraintsolver.SISRRuinStrategy prototype) {
392 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
393 }
394 @java.lang.Override
396 return this == DEFAULT_INSTANCE
397 ? new Builder() : new Builder().mergeFrom(this);
398 }
399
400 @java.lang.Override
402 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
403 Builder builder = new Builder(parent);
404 return builder;
405 }
406
484 public static final class Builder extends
485 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
486 // @@protoc_insertion_point(builder_implements:operations_research.SISRRuinStrategy)
488 public static final com.google.protobuf.Descriptors.Descriptor
490 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SISRRuinStrategy_descriptor;
491 }
492
493 @java.lang.Override
494 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
496 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SISRRuinStrategy_fieldAccessorTable
497 .ensureFieldAccessorsInitialized(
498 com.google.ortools.constraintsolver.SISRRuinStrategy.class, com.google.ortools.constraintsolver.SISRRuinStrategy.Builder.class);
499 }
500
501 // Construct using com.google.ortools.constraintsolver.SISRRuinStrategy.newBuilder()
502 private Builder() {
503
504 }
505
506 private Builder(
507 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
508 super(parent);
509
510 }
511 @java.lang.Override
512 public Builder clear() {
513 super.clear();
514 bitField0_ = 0;
515 maxRemovedSequenceSize_ = 0;
516 avgNumRemovedVisits_ = 0;
517 bypassFactor_ = 0D;
518 return this;
519 }
520
521 @java.lang.Override
522 public com.google.protobuf.Descriptors.Descriptor
524 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SISRRuinStrategy_descriptor;
525 }
526
527 @java.lang.Override
529 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
530 }
531
532 @java.lang.Override
535 if (!result.isInitialized()) {
536 throw newUninitializedMessageException(result);
537 }
538 return result;
539 }
540
541 @java.lang.Override
543 com.google.ortools.constraintsolver.SISRRuinStrategy result = new com.google.ortools.constraintsolver.SISRRuinStrategy(this);
544 if (bitField0_ != 0) { buildPartial0(result); }
545 onBuilt();
546 return result;
547 }
548
549 private void buildPartial0(com.google.ortools.constraintsolver.SISRRuinStrategy result) {
550 int from_bitField0_ = bitField0_;
551 int to_bitField0_ = 0;
552 if (((from_bitField0_ & 0x00000001) != 0)) {
553 result.maxRemovedSequenceSize_ = maxRemovedSequenceSize_;
554 to_bitField0_ |= 0x00000001;
555 }
556 if (((from_bitField0_ & 0x00000002) != 0)) {
557 result.avgNumRemovedVisits_ = avgNumRemovedVisits_;
558 to_bitField0_ |= 0x00000002;
559 }
560 if (((from_bitField0_ & 0x00000004) != 0)) {
561 result.bypassFactor_ = bypassFactor_;
562 to_bitField0_ |= 0x00000004;
563 }
564 result.bitField0_ |= to_bitField0_;
565 }
566
567 @java.lang.Override
568 public Builder mergeFrom(com.google.protobuf.Message other) {
569 if (other instanceof com.google.ortools.constraintsolver.SISRRuinStrategy) {
570 return mergeFrom((com.google.ortools.constraintsolver.SISRRuinStrategy)other);
571 } else {
572 super.mergeFrom(other);
573 return this;
574 }
575 }
576
577 public Builder mergeFrom(com.google.ortools.constraintsolver.SISRRuinStrategy other) {
578 if (other == com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance()) return this;
579 if (other.hasMaxRemovedSequenceSize()) {
580 setMaxRemovedSequenceSize(other.getMaxRemovedSequenceSize());
581 }
582 if (other.hasAvgNumRemovedVisits()) {
583 setAvgNumRemovedVisits(other.getAvgNumRemovedVisits());
584 }
585 if (other.hasBypassFactor()) {
586 setBypassFactor(other.getBypassFactor());
587 }
588 this.mergeUnknownFields(other.getUnknownFields());
589 onChanged();
590 return this;
591 }
592
593 @java.lang.Override
594 public final boolean isInitialized() {
595 return true;
596 }
597
598 @java.lang.Override
599 public Builder mergeFrom(
600 com.google.protobuf.CodedInputStream input,
601 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
602 throws java.io.IOException {
603 if (extensionRegistry == null) {
604 throw new java.lang.NullPointerException();
605 }
606 try {
607 boolean done = false;
608 while (!done) {
609 int tag = input.readTag();
610 switch (tag) {
611 case 0:
612 done = true;
613 break;
614 case 8: {
615 maxRemovedSequenceSize_ = input.readUInt32();
616 bitField0_ |= 0x00000001;
617 break;
618 } // case 8
619 case 16: {
620 avgNumRemovedVisits_ = input.readUInt32();
621 bitField0_ |= 0x00000002;
622 break;
623 } // case 16
624 case 25: {
625 bypassFactor_ = input.readDouble();
626 bitField0_ |= 0x00000004;
627 break;
628 } // case 25
629 default: {
630 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
631 done = true; // was an endgroup tag
632 }
633 break;
634 } // default:
635 } // switch (tag)
636 } // while (!done)
637 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
638 throw e.unwrapIOException();
639 } finally {
640 onChanged();
641 } // finally
642 return this;
643 }
644 private int bitField0_;
645
646 private int maxRemovedSequenceSize_ ;
656 @java.lang.Override
657 public boolean hasMaxRemovedSequenceSize() {
658 return ((bitField0_ & 0x00000001) != 0);
659 }
660
669 @java.lang.Override
671 return maxRemovedSequenceSize_;
672 }
673
683 public Builder setMaxRemovedSequenceSize(int value) {
684
685 maxRemovedSequenceSize_ = value;
686 bitField0_ |= 0x00000001;
687 onChanged();
688 return this;
689 }
690
700 bitField0_ = (bitField0_ & ~0x00000001);
701 maxRemovedSequenceSize_ = 0;
702 onChanged();
703 return this;
704 }
705
706 private int avgNumRemovedVisits_ ;
716 @java.lang.Override
717 public boolean hasAvgNumRemovedVisits() {
718 return ((bitField0_ & 0x00000002) != 0);
719 }
720
729 @java.lang.Override
731 return avgNumRemovedVisits_;
732 }
733
743 public Builder setAvgNumRemovedVisits(int value) {
744
745 avgNumRemovedVisits_ = value;
746 bitField0_ |= 0x00000002;
747 onChanged();
748 return this;
749 }
750
759 public Builder clearAvgNumRemovedVisits() {
760 bitField0_ = (bitField0_ & ~0x00000002);
761 avgNumRemovedVisits_ = 0;
762 onChanged();
763 return this;
764 }
765
766 private double bypassFactor_ ;
777 @java.lang.Override
778 public boolean hasBypassFactor() {
779 return ((bitField0_ & 0x00000004) != 0);
780 }
781
791 @java.lang.Override
792 public double getBypassFactor() {
793 return bypassFactor_;
794 }
795
806 public Builder setBypassFactor(double value) {
807
808 bypassFactor_ = value;
809 bitField0_ |= 0x00000004;
810 onChanged();
811 return this;
812 }
813
823 public Builder clearBypassFactor() {
824 bitField0_ = (bitField0_ & ~0x00000004);
825 bypassFactor_ = 0D;
826 onChanged();
827 return this;
828 }
829
830 // @@protoc_insertion_point(builder_scope:operations_research.SISRRuinStrategy)
831 }
832
833 // @@protoc_insertion_point(class_scope:operations_research.SISRRuinStrategy)
834 private static final com.google.ortools.constraintsolver.SISRRuinStrategy DEFAULT_INSTANCE;
835 static {
836 DEFAULT_INSTANCE = new com.google.ortools.constraintsolver.SISRRuinStrategy();
837 }
838
840 return DEFAULT_INSTANCE;
841 }
842
843 private static final com.google.protobuf.Parser<SISRRuinStrategy>
844 PARSER = new com.google.protobuf.AbstractParser<SISRRuinStrategy>() {
845 @java.lang.Override
846 public SISRRuinStrategy parsePartialFrom(
847 com.google.protobuf.CodedInputStream input,
848 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
849 throws com.google.protobuf.InvalidProtocolBufferException {
850 Builder builder = newBuilder();
851 try {
852 builder.mergeFrom(input, extensionRegistry);
853 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
854 throw e.setUnfinishedMessage(builder.buildPartial());
855 } catch (com.google.protobuf.UninitializedMessageException e) {
856 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
857 } catch (java.io.IOException e) {
858 throw new com.google.protobuf.InvalidProtocolBufferException(e)
859 .setUnfinishedMessage(builder.buildPartial());
860 }
861 return builder.buildPartial();
862 }
863 };
864
865 public static com.google.protobuf.Parser<SISRRuinStrategy> parser() {
866 return PARSER;
867 }
868
869 @java.lang.Override
870 public com.google.protobuf.Parser<SISRRuinStrategy> getParserForType() {
871 return PARSER;
872 }
873
874 @java.lang.Override
878
879}
880
Builder mergeFrom(com.google.ortools.constraintsolver.SISRRuinStrategy other)
com.google.ortools.constraintsolver.SISRRuinStrategy buildPartial()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.ortools.constraintsolver.SISRRuinStrategy getDefaultInstanceForType()
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.constraintsolver.SISRRuinStrategy build()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.constraintsolver.SISRRuinStrategy parseFrom(byte[] data)
static com.google.ortools.constraintsolver.SISRRuinStrategy parseFrom(com.google.protobuf.CodedInputStream input)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static Builder newBuilder(com.google.ortools.constraintsolver.SISRRuinStrategy prototype)
static com.google.ortools.constraintsolver.SISRRuinStrategy parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.SISRRuinStrategy parseFrom(java.nio.ByteBuffer data)
static com.google.ortools.constraintsolver.SISRRuinStrategy parseFrom(com.google.protobuf.ByteString data)
com.google.ortools.constraintsolver.SISRRuinStrategy getDefaultInstanceForType()
com.google.protobuf.Parser< SISRRuinStrategy > getParserForType()
static com.google.ortools.constraintsolver.SISRRuinStrategy parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser< SISRRuinStrategy > parser()
static com.google.ortools.constraintsolver.SISRRuinStrategy parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.constraintsolver.SISRRuinStrategy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.SISRRuinStrategy parseFrom(java.io.InputStream input)
static com.google.ortools.constraintsolver.SISRRuinStrategy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.SISRRuinStrategy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.constraintsolver.SISRRuinStrategy parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.constraintsolver.SISRRuinStrategy getDefaultInstance()