Google OR-Tools v9.15
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.33.1
5
6package com.google.ortools.constraintsolver;
7
84@com.google.protobuf.Generated
85public final class SISRRuinStrategy extends
86 com.google.protobuf.GeneratedMessage implements
87 // @@protoc_insertion_point(message_implements:operations_research.SISRRuinStrategy)
89private static final long serialVersionUID = 0L;
90 static {
91 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
92 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
93 /* major= */ 4,
94 /* minor= */ 33,
95 /* patch= */ 1,
96 /* suffix= */ "",
97 "SISRRuinStrategy");
98 }
99 // Use SISRRuinStrategy.newBuilder() to construct.
100 private SISRRuinStrategy(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
101 super(builder);
102 }
103 private SISRRuinStrategy() {
104 }
105
106 public static final com.google.protobuf.Descriptors.Descriptor
108 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SISRRuinStrategy_descriptor;
109 }
110
111 @java.lang.Override
112 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
114 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SISRRuinStrategy_fieldAccessorTable
115 .ensureFieldAccessorsInitialized(
116 com.google.ortools.constraintsolver.SISRRuinStrategy.class, com.google.ortools.constraintsolver.SISRRuinStrategy.Builder.class);
117 }
118
119 private int bitField0_;
120 public static final int MAX_REMOVED_SEQUENCE_SIZE_FIELD_NUMBER = 1;
121 private int maxRemovedSequenceSize_ = 0;
131 @java.lang.Override
132 public boolean hasMaxRemovedSequenceSize() {
133 return ((bitField0_ & 0x00000001) != 0);
134 }
135
144 @java.lang.Override
146 return maxRemovedSequenceSize_;
147 }
148
149 public static final int AVG_NUM_REMOVED_VISITS_FIELD_NUMBER = 2;
150 private int avgNumRemovedVisits_ = 0;
160 @java.lang.Override
161 public boolean hasAvgNumRemovedVisits() {
162 return ((bitField0_ & 0x00000002) != 0);
163 }
164
173 @java.lang.Override
175 return avgNumRemovedVisits_;
176 }
177
178 public static final int BYPASS_FACTOR_FIELD_NUMBER = 3;
179 private double bypassFactor_ = 0D;
190 @java.lang.Override
191 public boolean hasBypassFactor() {
192 return ((bitField0_ & 0x00000004) != 0);
193 }
194
204 @java.lang.Override
205 public double getBypassFactor() {
206 return bypassFactor_;
207 }
208
209 private byte memoizedIsInitialized = -1;
210 @java.lang.Override
211 public final boolean isInitialized() {
212 byte isInitialized = memoizedIsInitialized;
213 if (isInitialized == 1) return true;
214 if (isInitialized == 0) return false;
215
216 memoizedIsInitialized = 1;
217 return true;
218 }
219
220 @java.lang.Override
221 public void writeTo(com.google.protobuf.CodedOutputStream output)
222 throws java.io.IOException {
223 if (((bitField0_ & 0x00000001) != 0)) {
224 output.writeUInt32(1, maxRemovedSequenceSize_);
225 }
226 if (((bitField0_ & 0x00000002) != 0)) {
227 output.writeUInt32(2, avgNumRemovedVisits_);
228 }
229 if (((bitField0_ & 0x00000004) != 0)) {
230 output.writeDouble(3, bypassFactor_);
231 }
232 getUnknownFields().writeTo(output);
233 }
234
235 @java.lang.Override
236 public int getSerializedSize() {
237 int size = memoizedSize;
238 if (size != -1) return size;
239
240 size = 0;
241 if (((bitField0_ & 0x00000001) != 0)) {
242 size += com.google.protobuf.CodedOutputStream
243 .computeUInt32Size(1, maxRemovedSequenceSize_);
244 }
245 if (((bitField0_ & 0x00000002) != 0)) {
246 size += com.google.protobuf.CodedOutputStream
247 .computeUInt32Size(2, avgNumRemovedVisits_);
248 }
249 if (((bitField0_ & 0x00000004) != 0)) {
250 size += com.google.protobuf.CodedOutputStream
251 .computeDoubleSize(3, bypassFactor_);
252 }
253 size += getUnknownFields().getSerializedSize();
254 memoizedSize = size;
255 return size;
256 }
257
258 @java.lang.Override
259 public boolean equals(final java.lang.Object obj) {
260 if (obj == this) {
261 return true;
262 }
263 if (!(obj instanceof com.google.ortools.constraintsolver.SISRRuinStrategy)) {
264 return super.equals(obj);
265 }
266 com.google.ortools.constraintsolver.SISRRuinStrategy other = (com.google.ortools.constraintsolver.SISRRuinStrategy) obj;
267
268 if (hasMaxRemovedSequenceSize() != other.hasMaxRemovedSequenceSize()) return false;
271 != other.getMaxRemovedSequenceSize()) return false;
272 }
273 if (hasAvgNumRemovedVisits() != other.hasAvgNumRemovedVisits()) return false;
276 != other.getAvgNumRemovedVisits()) return false;
277 }
278 if (hasBypassFactor() != other.hasBypassFactor()) return false;
279 if (hasBypassFactor()) {
280 if (java.lang.Double.doubleToLongBits(getBypassFactor())
281 != java.lang.Double.doubleToLongBits(
282 other.getBypassFactor())) return false;
283 }
284 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
285 return true;
286 }
287
288 @java.lang.Override
289 public int hashCode() {
290 if (memoizedHashCode != 0) {
291 return memoizedHashCode;
292 }
293 int hash = 41;
294 hash = (19 * hash) + getDescriptor().hashCode();
296 hash = (37 * hash) + MAX_REMOVED_SEQUENCE_SIZE_FIELD_NUMBER;
297 hash = (53 * hash) + getMaxRemovedSequenceSize();
298 }
300 hash = (37 * hash) + AVG_NUM_REMOVED_VISITS_FIELD_NUMBER;
301 hash = (53 * hash) + getAvgNumRemovedVisits();
302 }
303 if (hasBypassFactor()) {
304 hash = (37 * hash) + BYPASS_FACTOR_FIELD_NUMBER;
305 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
306 java.lang.Double.doubleToLongBits(getBypassFactor()));
307 }
308 hash = (29 * hash) + getUnknownFields().hashCode();
309 memoizedHashCode = hash;
310 return hash;
311 }
312
314 java.nio.ByteBuffer data)
315 throws com.google.protobuf.InvalidProtocolBufferException {
316 return PARSER.parseFrom(data);
317 }
319 java.nio.ByteBuffer data,
320 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
321 throws com.google.protobuf.InvalidProtocolBufferException {
322 return PARSER.parseFrom(data, extensionRegistry);
323 }
325 com.google.protobuf.ByteString data)
326 throws com.google.protobuf.InvalidProtocolBufferException {
327 return PARSER.parseFrom(data);
328 }
330 com.google.protobuf.ByteString data,
331 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
332 throws com.google.protobuf.InvalidProtocolBufferException {
333 return PARSER.parseFrom(data, extensionRegistry);
334 }
336 throws com.google.protobuf.InvalidProtocolBufferException {
337 return PARSER.parseFrom(data);
338 }
340 byte[] data,
341 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
342 throws com.google.protobuf.InvalidProtocolBufferException {
343 return PARSER.parseFrom(data, extensionRegistry);
344 }
346 throws java.io.IOException {
347 return com.google.protobuf.GeneratedMessage
348 .parseWithIOException(PARSER, input);
349 }
351 java.io.InputStream input,
352 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
353 throws java.io.IOException {
354 return com.google.protobuf.GeneratedMessage
355 .parseWithIOException(PARSER, input, extensionRegistry);
356 }
357
359 throws java.io.IOException {
360 return com.google.protobuf.GeneratedMessage
361 .parseDelimitedWithIOException(PARSER, input);
362 }
363
365 java.io.InputStream input,
366 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
367 throws java.io.IOException {
368 return com.google.protobuf.GeneratedMessage
369 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
370 }
372 com.google.protobuf.CodedInputStream input)
373 throws java.io.IOException {
374 return com.google.protobuf.GeneratedMessage
375 .parseWithIOException(PARSER, input);
376 }
378 com.google.protobuf.CodedInputStream input,
379 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
380 throws java.io.IOException {
381 return com.google.protobuf.GeneratedMessage
382 .parseWithIOException(PARSER, input, extensionRegistry);
383 }
384
385 @java.lang.Override
386 public Builder newBuilderForType() { return newBuilder(); }
387 public static Builder newBuilder() {
388 return DEFAULT_INSTANCE.toBuilder();
389 }
390 public static Builder newBuilder(com.google.ortools.constraintsolver.SISRRuinStrategy prototype) {
391 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
392 }
393 @java.lang.Override
395 return this == DEFAULT_INSTANCE
396 ? new Builder() : new Builder().mergeFrom(this);
397 }
398
399 @java.lang.Override
401 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
402 Builder builder = new Builder(parent);
403 return builder;
404 }
405
481 public static final class Builder extends
482 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
483 // @@protoc_insertion_point(builder_implements:operations_research.SISRRuinStrategy)
485 public static final com.google.protobuf.Descriptors.Descriptor
487 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SISRRuinStrategy_descriptor;
488 }
489
490 @java.lang.Override
491 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
493 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SISRRuinStrategy_fieldAccessorTable
494 .ensureFieldAccessorsInitialized(
495 com.google.ortools.constraintsolver.SISRRuinStrategy.class, com.google.ortools.constraintsolver.SISRRuinStrategy.Builder.class);
496 }
497
498 // Construct using com.google.ortools.constraintsolver.SISRRuinStrategy.newBuilder()
499 private Builder() {
500
501 }
502
503 private Builder(
504 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
505 super(parent);
506
507 }
508 @java.lang.Override
509 public Builder clear() {
510 super.clear();
511 bitField0_ = 0;
512 maxRemovedSequenceSize_ = 0;
513 avgNumRemovedVisits_ = 0;
514 bypassFactor_ = 0D;
515 return this;
516 }
517
518 @java.lang.Override
519 public com.google.protobuf.Descriptors.Descriptor
521 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SISRRuinStrategy_descriptor;
522 }
523
524 @java.lang.Override
526 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
527 }
528
529 @java.lang.Override
532 if (!result.isInitialized()) {
533 throw newUninitializedMessageException(result);
534 }
535 return result;
536 }
537
538 @java.lang.Override
540 com.google.ortools.constraintsolver.SISRRuinStrategy result = new com.google.ortools.constraintsolver.SISRRuinStrategy(this);
541 if (bitField0_ != 0) { buildPartial0(result); }
542 onBuilt();
543 return result;
544 }
545
546 private void buildPartial0(com.google.ortools.constraintsolver.SISRRuinStrategy result) {
547 int from_bitField0_ = bitField0_;
548 int to_bitField0_ = 0;
549 if (((from_bitField0_ & 0x00000001) != 0)) {
550 result.maxRemovedSequenceSize_ = maxRemovedSequenceSize_;
551 to_bitField0_ |= 0x00000001;
552 }
553 if (((from_bitField0_ & 0x00000002) != 0)) {
554 result.avgNumRemovedVisits_ = avgNumRemovedVisits_;
555 to_bitField0_ |= 0x00000002;
556 }
557 if (((from_bitField0_ & 0x00000004) != 0)) {
558 result.bypassFactor_ = bypassFactor_;
559 to_bitField0_ |= 0x00000004;
560 }
561 result.bitField0_ |= to_bitField0_;
562 }
563
564 @java.lang.Override
565 public Builder mergeFrom(com.google.protobuf.Message other) {
566 if (other instanceof com.google.ortools.constraintsolver.SISRRuinStrategy) {
567 return mergeFrom((com.google.ortools.constraintsolver.SISRRuinStrategy)other);
568 } else {
569 super.mergeFrom(other);
570 return this;
571 }
572 }
573
574 public Builder mergeFrom(com.google.ortools.constraintsolver.SISRRuinStrategy other) {
575 if (other == com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance()) return this;
576 if (other.hasMaxRemovedSequenceSize()) {
577 setMaxRemovedSequenceSize(other.getMaxRemovedSequenceSize());
578 }
579 if (other.hasAvgNumRemovedVisits()) {
580 setAvgNumRemovedVisits(other.getAvgNumRemovedVisits());
581 }
582 if (other.hasBypassFactor()) {
583 setBypassFactor(other.getBypassFactor());
584 }
585 this.mergeUnknownFields(other.getUnknownFields());
586 onChanged();
587 return this;
588 }
589
590 @java.lang.Override
591 public final boolean isInitialized() {
592 return true;
593 }
594
595 @java.lang.Override
596 public Builder mergeFrom(
597 com.google.protobuf.CodedInputStream input,
598 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
599 throws java.io.IOException {
600 if (extensionRegistry == null) {
601 throw new java.lang.NullPointerException();
602 }
603 try {
604 boolean done = false;
605 while (!done) {
606 int tag = input.readTag();
607 switch (tag) {
608 case 0:
609 done = true;
610 break;
611 case 8: {
612 maxRemovedSequenceSize_ = input.readUInt32();
613 bitField0_ |= 0x00000001;
614 break;
615 } // case 8
616 case 16: {
617 avgNumRemovedVisits_ = input.readUInt32();
618 bitField0_ |= 0x00000002;
619 break;
620 } // case 16
621 case 25: {
622 bypassFactor_ = input.readDouble();
623 bitField0_ |= 0x00000004;
624 break;
625 } // case 25
626 default: {
627 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
628 done = true; // was an endgroup tag
629 }
630 break;
631 } // default:
632 } // switch (tag)
633 } // while (!done)
634 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
635 throw e.unwrapIOException();
636 } finally {
637 onChanged();
638 } // finally
639 return this;
640 }
641 private int bitField0_;
642
643 private int maxRemovedSequenceSize_ ;
653 @java.lang.Override
654 public boolean hasMaxRemovedSequenceSize() {
655 return ((bitField0_ & 0x00000001) != 0);
656 }
657
666 @java.lang.Override
668 return maxRemovedSequenceSize_;
669 }
670
680 public Builder setMaxRemovedSequenceSize(int value) {
681
682 maxRemovedSequenceSize_ = value;
683 bitField0_ |= 0x00000001;
684 onChanged();
685 return this;
686 }
687
697 bitField0_ = (bitField0_ & ~0x00000001);
698 maxRemovedSequenceSize_ = 0;
699 onChanged();
700 return this;
701 }
702
703 private int avgNumRemovedVisits_ ;
713 @java.lang.Override
714 public boolean hasAvgNumRemovedVisits() {
715 return ((bitField0_ & 0x00000002) != 0);
716 }
717
726 @java.lang.Override
728 return avgNumRemovedVisits_;
729 }
730
740 public Builder setAvgNumRemovedVisits(int value) {
741
742 avgNumRemovedVisits_ = value;
743 bitField0_ |= 0x00000002;
744 onChanged();
745 return this;
746 }
747
756 public Builder clearAvgNumRemovedVisits() {
757 bitField0_ = (bitField0_ & ~0x00000002);
758 avgNumRemovedVisits_ = 0;
759 onChanged();
760 return this;
761 }
762
763 private double bypassFactor_ ;
774 @java.lang.Override
775 public boolean hasBypassFactor() {
776 return ((bitField0_ & 0x00000004) != 0);
777 }
778
788 @java.lang.Override
789 public double getBypassFactor() {
790 return bypassFactor_;
791 }
792
803 public Builder setBypassFactor(double value) {
804
805 bypassFactor_ = value;
806 bitField0_ |= 0x00000004;
807 onChanged();
808 return this;
809 }
810
820 public Builder clearBypassFactor() {
821 bitField0_ = (bitField0_ & ~0x00000004);
822 bypassFactor_ = 0D;
823 onChanged();
824 return this;
825 }
826
827 // @@protoc_insertion_point(builder_scope:operations_research.SISRRuinStrategy)
828 }
829
830 // @@protoc_insertion_point(class_scope:operations_research.SISRRuinStrategy)
831 private static final com.google.ortools.constraintsolver.SISRRuinStrategy DEFAULT_INSTANCE;
832 static {
833 DEFAULT_INSTANCE = new com.google.ortools.constraintsolver.SISRRuinStrategy();
834 }
835
837 return DEFAULT_INSTANCE;
838 }
839
840 private static final com.google.protobuf.Parser<SISRRuinStrategy>
841 PARSER = new com.google.protobuf.AbstractParser<SISRRuinStrategy>() {
842 @java.lang.Override
843 public SISRRuinStrategy parsePartialFrom(
844 com.google.protobuf.CodedInputStream input,
845 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
846 throws com.google.protobuf.InvalidProtocolBufferException {
847 Builder builder = newBuilder();
848 try {
849 builder.mergeFrom(input, extensionRegistry);
850 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
851 throw e.setUnfinishedMessage(builder.buildPartial());
852 } catch (com.google.protobuf.UninitializedMessageException e) {
853 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
854 } catch (java.io.IOException e) {
855 throw new com.google.protobuf.InvalidProtocolBufferException(e)
856 .setUnfinishedMessage(builder.buildPartial());
857 }
858 return builder.buildPartial();
859 }
860 };
861
862 public static com.google.protobuf.Parser<SISRRuinStrategy> parser() {
863 return PARSER;
864 }
865
866 @java.lang.Override
867 public com.google.protobuf.Parser<SISRRuinStrategy> getParserForType() {
868 return PARSER;
869 }
870
871 @java.lang.Override
875
876}
877
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()