6package com.google.ortools.constraintsolver;
15@com.google.protobuf.Generated
16public final class IteratedLocalSearchParameters
extends
17 com.google.protobuf.GeneratedMessage implements
20private static final long serialVersionUID = 0L;
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
28 IteratedLocalSearchParameters.class.getName());
31 private IteratedLocalSearchParameters(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 private IteratedLocalSearchParameters() {
35 perturbationStrategy_ = 0;
36 acceptanceStrategy_ = 0;
39 public static final com.google.protobuf.Descriptors.Descriptor
41 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_IteratedLocalSearchParameters_descriptor;
45 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
47 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_IteratedLocalSearchParameters_fieldAccessorTable
48 .ensureFieldAccessorsInitialized(
49 com.google.ortools.constraintsolver.IteratedLocalSearchParameters.class, com.google.ortools.constraintsolver.IteratedLocalSearchParameters.Builder.class);
52 private int bitField0_;
54 private int perturbationStrategy_ = 0;
65 return perturbationStrategy_;
93 return ((bitField0_ & 0x00000001) != 0);
105 return ruinRecreateParameters_ ==
null ? com.google.ortools.constraintsolver.RuinRecreateParameters.getDefaultInstance() : ruinRecreateParameters_;
116 return ruinRecreateParameters_ ==
null ? com.google.ortools.constraintsolver.RuinRecreateParameters.getDefaultInstance() : ruinRecreateParameters_;
120 private boolean improvePerturbedSolution_ =
false;
132 return ((bitField0_ & 0x00000002) != 0);
145 return improvePerturbedSolution_;
149 private int acceptanceStrategy_ = 0;
160 return acceptanceStrategy_;
189 return ((bitField0_ & 0x00000004) != 0);
202 return simulatedAnnealingParameters_ ==
null ? com.google.ortools.constraintsolver.SimulatedAnnealingParameters.getDefaultInstance() : simulatedAnnealingParameters_;
214 return simulatedAnnealingParameters_ ==
null ? com.google.ortools.constraintsolver.SimulatedAnnealingParameters.getDefaultInstance() : simulatedAnnealingParameters_;
217 private byte memoizedIsInitialized = -1;
224 memoizedIsInitialized = 1;
229 public void writeTo(com.google.protobuf.CodedOutputStream output)
230 throws java.io.IOException {
231 if (perturbationStrategy_ != com.google.ortools.constraintsolver.PerturbationStrategy.Value.UNSET.getNumber()) {
232 output.writeEnum(1, perturbationStrategy_);
234 if (((bitField0_ & 0x00000001) != 0)) {
237 if (((bitField0_ & 0x00000002) != 0)) {
238 output.writeBool(3, improvePerturbedSolution_);
240 if (acceptanceStrategy_ != com.google.ortools.constraintsolver.AcceptanceStrategy.Value.UNSET.getNumber()) {
241 output.writeEnum(4, acceptanceStrategy_);
243 if (((bitField0_ & 0x00000004) != 0)) {
246 getUnknownFields().writeTo(output);
251 int size = memoizedSize;
252 if (size != -1)
return size;
255 if (perturbationStrategy_ != com.google.ortools.constraintsolver.PerturbationStrategy.Value.UNSET.getNumber()) {
256 size += com.google.protobuf.CodedOutputStream
257 .computeEnumSize(1, perturbationStrategy_);
259 if (((bitField0_ & 0x00000001) != 0)) {
260 size += com.google.protobuf.CodedOutputStream
263 if (((bitField0_ & 0x00000002) != 0)) {
264 size += com.google.protobuf.CodedOutputStream
265 .computeBoolSize(3, improvePerturbedSolution_);
267 if (acceptanceStrategy_ != com.google.ortools.constraintsolver.AcceptanceStrategy.Value.UNSET.getNumber()) {
268 size += com.google.protobuf.CodedOutputStream
269 .computeEnumSize(4, acceptanceStrategy_);
271 if (((bitField0_ & 0x00000004) != 0)) {
272 size += com.google.protobuf.CodedOutputStream
275 size += getUnknownFields().getSerializedSize();
281 public boolean equals(
final java.lang.Object obj) {
285 if (!(obj instanceof com.google.ortools.constraintsolver.IteratedLocalSearchParameters)) {
286 return super.equals(obj);
290 if (perturbationStrategy_ != other.perturbationStrategy_)
return false;
301 if (acceptanceStrategy_ != other.acceptanceStrategy_)
return false;
307 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
313 if (memoizedHashCode != 0) {
314 return memoizedHashCode;
319 hash = (53 * hash) + perturbationStrategy_;
326 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
330 hash = (53 * hash) + acceptanceStrategy_;
335 hash = (29 * hash) + getUnknownFields().hashCode();
336 memoizedHashCode = hash;
341 java.nio.ByteBuffer data)
342 throws com.google.protobuf.InvalidProtocolBufferException {
343 return PARSER.parseFrom(data);
346 java.nio.ByteBuffer data,
347 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
348 throws com.google.protobuf.InvalidProtocolBufferException {
349 return PARSER.parseFrom(data, extensionRegistry);
352 com.google.protobuf.ByteString data)
353 throws com.google.protobuf.InvalidProtocolBufferException {
354 return PARSER.parseFrom(data);
357 com.google.protobuf.ByteString data,
358 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
359 throws com.google.protobuf.InvalidProtocolBufferException {
360 return PARSER.parseFrom(data, extensionRegistry);
363 throws com.google.protobuf.InvalidProtocolBufferException {
364 return PARSER.parseFrom(data);
368 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
369 throws com.google.protobuf.InvalidProtocolBufferException {
370 return PARSER.parseFrom(data, extensionRegistry);
373 throws java.io.IOException {
374 return com.google.protobuf.GeneratedMessage
375 .parseWithIOException(PARSER, input);
378 java.io.InputStream input,
379 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
380 throws java.io.IOException {
381 return com.google.protobuf.GeneratedMessage
382 .parseWithIOException(PARSER, input, extensionRegistry);
386 throws java.io.IOException {
387 return com.google.protobuf.GeneratedMessage
388 .parseDelimitedWithIOException(PARSER, input);
392 java.io.InputStream input,
393 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
394 throws java.io.IOException {
395 return com.google.protobuf.GeneratedMessage
396 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
399 com.google.protobuf.CodedInputStream input)
400 throws java.io.IOException {
401 return com.google.protobuf.GeneratedMessage
402 .parseWithIOException(PARSER, input);
405 com.google.protobuf.CodedInputStream input,
406 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
407 throws java.io.IOException {
408 return com.google.protobuf.GeneratedMessage
409 .parseWithIOException(PARSER, input, extensionRegistry);
415 return DEFAULT_INSTANCE.toBuilder();
417 public static Builder newBuilder(com.google.ortools.constraintsolver.IteratedLocalSearchParameters prototype) {
418 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
422 return this == DEFAULT_INSTANCE
428 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
439 public static final class Builder
extends
440 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
443 public static final com.google.protobuf.Descriptors.Descriptor
445 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_IteratedLocalSearchParameters_descriptor;
449 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
451 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_IteratedLocalSearchParameters_fieldAccessorTable
452 .ensureFieldAccessorsInitialized(
453 com.google.ortools.constraintsolver.IteratedLocalSearchParameters.class, com.google.ortools.constraintsolver.IteratedLocalSearchParameters.Builder.class);
458 maybeForceBuilderInitialization();
462 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
464 maybeForceBuilderInitialization();
466 private void maybeForceBuilderInitialization() {
467 if (com.google.protobuf.GeneratedMessage
468 .alwaysUseFieldBuilders) {
469 internalGetRuinRecreateParametersFieldBuilder();
470 internalGetSimulatedAnnealingParametersFieldBuilder();
477 perturbationStrategy_ = 0;
478 ruinRecreateParameters_ =
null;
479 if (ruinRecreateParametersBuilder_ !=
null) {
480 ruinRecreateParametersBuilder_.dispose();
481 ruinRecreateParametersBuilder_ =
null;
483 improvePerturbedSolution_ =
false;
484 acceptanceStrategy_ = 0;
485 simulatedAnnealingParameters_ =
null;
486 if (simulatedAnnealingParametersBuilder_ !=
null) {
487 simulatedAnnealingParametersBuilder_.dispose();
488 simulatedAnnealingParametersBuilder_ =
null;
494 public com.google.protobuf.Descriptors.Descriptor
496 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_IteratedLocalSearchParameters_descriptor;
501 return com.google.ortools.constraintsolver.IteratedLocalSearchParameters.getDefaultInstance();
508 throw newUninitializedMessageException(result);
516 if (bitField0_ != 0) { buildPartial0(result); }
521 private void buildPartial0(com.google.ortools.constraintsolver.IteratedLocalSearchParameters result) {
522 int from_bitField0_ = bitField0_;
523 if (((from_bitField0_ & 0x00000001) != 0)) {
524 result.perturbationStrategy_ = perturbationStrategy_;
526 int to_bitField0_ = 0;
527 if (((from_bitField0_ & 0x00000002) != 0)) {
528 result.ruinRecreateParameters_ = ruinRecreateParametersBuilder_ ==
null
529 ? ruinRecreateParameters_
530 : ruinRecreateParametersBuilder_.build();
531 to_bitField0_ |= 0x00000001;
533 if (((from_bitField0_ & 0x00000004) != 0)) {
534 result.improvePerturbedSolution_ = improvePerturbedSolution_;
535 to_bitField0_ |= 0x00000002;
537 if (((from_bitField0_ & 0x00000008) != 0)) {
538 result.acceptanceStrategy_ = acceptanceStrategy_;
540 if (((from_bitField0_ & 0x00000010) != 0)) {
541 result.simulatedAnnealingParameters_ = simulatedAnnealingParametersBuilder_ ==
null
542 ? simulatedAnnealingParameters_
543 : simulatedAnnealingParametersBuilder_.build();
544 to_bitField0_ |= 0x00000004;
546 result.bitField0_ |= to_bitField0_;
550 public Builder
mergeFrom(com.google.protobuf.Message other) {
551 if (other instanceof com.google.ortools.constraintsolver.IteratedLocalSearchParameters) {
552 return mergeFrom((com.google.ortools.constraintsolver.IteratedLocalSearchParameters)other);
554 super.mergeFrom(other);
559 public Builder
mergeFrom(com.google.ortools.constraintsolver.IteratedLocalSearchParameters other) {
560 if (other == com.google.ortools.constraintsolver.IteratedLocalSearchParameters.getDefaultInstance())
return this;
561 if (other.perturbationStrategy_ != 0) {
564 if (other.hasRuinRecreateParameters()) {
567 if (other.hasImprovePerturbedSolution()) {
570 if (other.acceptanceStrategy_ != 0) {
573 if (other.hasSimulatedAnnealingParameters()) {
576 this.mergeUnknownFields(other.getUnknownFields());
588 com.google.protobuf.CodedInputStream input,
589 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
590 throws java.io.IOException {
591 if (extensionRegistry ==
null) {
592 throw new java.lang.NullPointerException();
595 boolean done =
false;
597 int tag = input.readTag();
603 perturbationStrategy_ = input.readEnum();
604 bitField0_ |= 0x00000001;
609 internalGetRuinRecreateParametersFieldBuilder().getBuilder(),
611 bitField0_ |= 0x00000002;
615 improvePerturbedSolution_ = input.readBool();
616 bitField0_ |= 0x00000004;
620 acceptanceStrategy_ = input.readEnum();
621 bitField0_ |= 0x00000008;
626 internalGetSimulatedAnnealingParametersFieldBuilder().getBuilder(),
628 bitField0_ |= 0x00000010;
632 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
639 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
640 throw e.unwrapIOException();
646 private int bitField0_;
648 private int perturbationStrategy_ = 0;
659 return perturbationStrategy_;
672 perturbationStrategy_ = value;
673 bitField0_ |= 0x00000001;
702 if (value ==
null) {
throw new NullPointerException(); }
703 bitField0_ |= 0x00000001;
704 perturbationStrategy_ = value.getNumber();
718 bitField0_ = (bitField0_ & ~0x00000001);
719 perturbationStrategy_ = 0;
725 private com.google.protobuf.SingleFieldBuilder<
726 com.google.ortools.constraintsolver.RuinRecreateParameters, com.google.ortools.constraintsolver.RuinRecreateParameters.Builder, com.google.ortools.constraintsolver.RuinRecreateParametersOrBuilder> ruinRecreateParametersBuilder_;
736 return ((bitField0_ & 0x00000002) != 0);
747 if (ruinRecreateParametersBuilder_ ==
null) {
748 return ruinRecreateParameters_ ==
null ? com.google.ortools.constraintsolver.RuinRecreateParameters.getDefaultInstance() : ruinRecreateParameters_;
750 return ruinRecreateParametersBuilder_.getMessage();
761 if (ruinRecreateParametersBuilder_ ==
null) {
763 throw new NullPointerException();
765 ruinRecreateParameters_ = value;
767 ruinRecreateParametersBuilder_.setMessage(value);
769 bitField0_ |= 0x00000002;
781 com.google.ortools.constraintsolver.RuinRecreateParameters.Builder builderForValue) {
782 if (ruinRecreateParametersBuilder_ ==
null) {
783 ruinRecreateParameters_ = builderForValue.build();
785 ruinRecreateParametersBuilder_.setMessage(builderForValue.build());
787 bitField0_ |= 0x00000002;
799 if (ruinRecreateParametersBuilder_ ==
null) {
800 if (((bitField0_ & 0x00000002) != 0) &&
801 ruinRecreateParameters_ !=
null &&
802 ruinRecreateParameters_ != com.google.ortools.constraintsolver.RuinRecreateParameters.getDefaultInstance()) {
805 ruinRecreateParameters_ = value;
808 ruinRecreateParametersBuilder_.mergeFrom(value);
810 if (ruinRecreateParameters_ !=
null) {
811 bitField0_ |= 0x00000002;
824 bitField0_ = (bitField0_ & ~0x00000002);
825 ruinRecreateParameters_ =
null;
826 if (ruinRecreateParametersBuilder_ !=
null) {
827 ruinRecreateParametersBuilder_.dispose();
828 ruinRecreateParametersBuilder_ =
null;
841 bitField0_ |= 0x00000002;
843 return internalGetRuinRecreateParametersFieldBuilder().getBuilder();
853 if (ruinRecreateParametersBuilder_ !=
null) {
854 return ruinRecreateParametersBuilder_.getMessageOrBuilder();
856 return ruinRecreateParameters_ ==
null ?
857 com.google.ortools.constraintsolver.RuinRecreateParameters.getDefaultInstance() : ruinRecreateParameters_;
867 private com.google.protobuf.SingleFieldBuilder<
868 com.google.ortools.constraintsolver.RuinRecreateParameters, com.google.ortools.constraintsolver.RuinRecreateParameters.Builder, com.google.ortools.constraintsolver.RuinRecreateParametersOrBuilder>
869 internalGetRuinRecreateParametersFieldBuilder() {
870 if (ruinRecreateParametersBuilder_ ==
null) {
871 ruinRecreateParametersBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
872 com.google.ortools.constraintsolver.RuinRecreateParameters, com.google.ortools.constraintsolver.RuinRecreateParameters.Builder, com.google.ortools.constraintsolver.RuinRecreateParametersOrBuilder>(
874 getParentForChildren(),
876 ruinRecreateParameters_ =
null;
878 return ruinRecreateParametersBuilder_;
881 private boolean improvePerturbedSolution_ ;
893 return ((bitField0_ & 0x00000004) != 0);
906 return improvePerturbedSolution_;
920 improvePerturbedSolution_ = value;
921 bitField0_ |= 0x00000004;
935 bitField0_ = (bitField0_ & ~0x00000004);
936 improvePerturbedSolution_ =
false;
941 private int acceptanceStrategy_ = 0;
952 return acceptanceStrategy_;
965 acceptanceStrategy_ = value;
966 bitField0_ |= 0x00000008;
995 if (value ==
null) {
throw new NullPointerException(); }
996 bitField0_ |= 0x00000008;
997 acceptanceStrategy_ = value.getNumber();
1011 bitField0_ = (bitField0_ & ~0x00000008);
1012 acceptanceStrategy_ = 0;
1018 private com.google.protobuf.SingleFieldBuilder<
1019 com.google.ortools.constraintsolver.SimulatedAnnealingParameters, com.google.ortools.constraintsolver.SimulatedAnnealingParameters.Builder, com.google.ortools.constraintsolver.SimulatedAnnealingParametersOrBuilder> simulatedAnnealingParametersBuilder_;
1030 return ((bitField0_ & 0x00000010) != 0);
1042 if (simulatedAnnealingParametersBuilder_ ==
null) {
1043 return simulatedAnnealingParameters_ ==
null ? com.google.ortools.constraintsolver.SimulatedAnnealingParameters.getDefaultInstance() : simulatedAnnealingParameters_;
1045 return simulatedAnnealingParametersBuilder_.getMessage();
1057 if (simulatedAnnealingParametersBuilder_ ==
null) {
1058 if (value ==
null) {
1059 throw new NullPointerException();
1061 simulatedAnnealingParameters_ = value;
1063 simulatedAnnealingParametersBuilder_.setMessage(value);
1065 bitField0_ |= 0x00000010;
1078 com.google.ortools.constraintsolver.SimulatedAnnealingParameters.Builder builderForValue) {
1079 if (simulatedAnnealingParametersBuilder_ ==
null) {
1080 simulatedAnnealingParameters_ = builderForValue.build();
1082 simulatedAnnealingParametersBuilder_.setMessage(builderForValue.build());
1084 bitField0_ |= 0x00000010;
1097 if (simulatedAnnealingParametersBuilder_ ==
null) {
1098 if (((bitField0_ & 0x00000010) != 0) &&
1099 simulatedAnnealingParameters_ !=
null &&
1100 simulatedAnnealingParameters_ != com.google.ortools.constraintsolver.SimulatedAnnealingParameters.getDefaultInstance()) {
1103 simulatedAnnealingParameters_ = value;
1106 simulatedAnnealingParametersBuilder_.mergeFrom(value);
1108 if (simulatedAnnealingParameters_ !=
null) {
1109 bitField0_ |= 0x00000010;
1123 bitField0_ = (bitField0_ & ~0x00000010);
1124 simulatedAnnealingParameters_ =
null;
1125 if (simulatedAnnealingParametersBuilder_ !=
null) {
1126 simulatedAnnealingParametersBuilder_.dispose();
1127 simulatedAnnealingParametersBuilder_ =
null;
1141 bitField0_ |= 0x00000010;
1143 return internalGetSimulatedAnnealingParametersFieldBuilder().getBuilder();
1154 if (simulatedAnnealingParametersBuilder_ !=
null) {
1155 return simulatedAnnealingParametersBuilder_.getMessageOrBuilder();
1157 return simulatedAnnealingParameters_ ==
null ?
1158 com.google.ortools.constraintsolver.SimulatedAnnealingParameters.getDefaultInstance() : simulatedAnnealingParameters_;
1169 private com.google.protobuf.SingleFieldBuilder<
1170 com.google.ortools.constraintsolver.SimulatedAnnealingParameters, com.google.ortools.constraintsolver.SimulatedAnnealingParameters.Builder, com.google.ortools.constraintsolver.SimulatedAnnealingParametersOrBuilder>
1171 internalGetSimulatedAnnealingParametersFieldBuilder() {
1172 if (simulatedAnnealingParametersBuilder_ ==
null) {
1173 simulatedAnnealingParametersBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1174 com.google.ortools.constraintsolver.SimulatedAnnealingParameters, com.google.ortools.constraintsolver.SimulatedAnnealingParameters.Builder, com.google.ortools.constraintsolver.SimulatedAnnealingParametersOrBuilder>(
1176 getParentForChildren(),
1178 simulatedAnnealingParameters_ =
null;
1180 return simulatedAnnealingParametersBuilder_;
1189 DEFAULT_INSTANCE =
new com.google.ortools.constraintsolver.IteratedLocalSearchParameters();
1193 return DEFAULT_INSTANCE;
1200 com.google.protobuf.CodedInputStream input,
1201 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1202 throws com.google.protobuf.InvalidProtocolBufferException {
1205 builder.mergeFrom(input, extensionRegistry);
1206 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1207 throw e.setUnfinishedMessage(builder.buildPartial());
1208 }
catch (com.google.protobuf.UninitializedMessageException e) {
1209 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1210 }
catch (java.io.IOException e) {
1211 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1212 .setUnfinishedMessage(builder.buildPartial());
1214 return builder.buildPartial();
1218 public static com.google.protobuf.Parser<IteratedLocalSearchParameters>
parser() {
1229 return DEFAULT_INSTANCE;