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