6package com.google.ortools.constraintsolver;
15public final class IteratedLocalSearchParameters
extends
16 com.google.protobuf.GeneratedMessage implements
19private static final long serialVersionUID = 0L;
21 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
22 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
27 IteratedLocalSearchParameters.class.getName());
30 private IteratedLocalSearchParameters(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
33 private IteratedLocalSearchParameters() {
34 perturbationStrategy_ = 0;
35 acceptanceStrategy_ = 0;
38 public static final com.google.protobuf.Descriptors.Descriptor
40 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_IteratedLocalSearchParameters_descriptor;
44 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
46 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_IteratedLocalSearchParameters_fieldAccessorTable
47 .ensureFieldAccessorsInitialized(
48 com.google.ortools.constraintsolver.IteratedLocalSearchParameters.class, com.google.ortools.constraintsolver.IteratedLocalSearchParameters.Builder.class);
51 private int bitField0_;
53 private int perturbationStrategy_ = 0;
64 return perturbationStrategy_;
92 return ((bitField0_ & 0x00000001) != 0);
104 return ruinRecreateParameters_ ==
null ? com.google.ortools.constraintsolver.RuinRecreateParameters.getDefaultInstance() : ruinRecreateParameters_;
115 return ruinRecreateParameters_ ==
null ? com.google.ortools.constraintsolver.RuinRecreateParameters.getDefaultInstance() : ruinRecreateParameters_;
119 private boolean improvePerturbedSolution_ =
false;
131 return ((bitField0_ & 0x00000002) != 0);
144 return improvePerturbedSolution_;
148 private int acceptanceStrategy_ = 0;
159 return acceptanceStrategy_;
188 return ((bitField0_ & 0x00000004) != 0);
201 return simulatedAnnealingParameters_ ==
null ? com.google.ortools.constraintsolver.SimulatedAnnealingParameters.getDefaultInstance() : simulatedAnnealingParameters_;
213 return simulatedAnnealingParameters_ ==
null ? com.google.ortools.constraintsolver.SimulatedAnnealingParameters.getDefaultInstance() : simulatedAnnealingParameters_;
216 private byte memoizedIsInitialized = -1;
223 memoizedIsInitialized = 1;
228 public void writeTo(com.google.protobuf.CodedOutputStream output)
229 throws java.io.IOException {
230 if (perturbationStrategy_ != com.google.ortools.constraintsolver.PerturbationStrategy.Value.UNSET.getNumber()) {
231 output.writeEnum(1, perturbationStrategy_);
233 if (((bitField0_ & 0x00000001) != 0)) {
236 if (((bitField0_ & 0x00000002) != 0)) {
237 output.writeBool(3, improvePerturbedSolution_);
239 if (acceptanceStrategy_ != com.google.ortools.constraintsolver.AcceptanceStrategy.Value.UNSET.getNumber()) {
240 output.writeEnum(4, acceptanceStrategy_);
242 if (((bitField0_ & 0x00000004) != 0)) {
245 getUnknownFields().writeTo(output);
250 int size = memoizedSize;
251 if (size != -1)
return size;
254 if (perturbationStrategy_ != com.google.ortools.constraintsolver.PerturbationStrategy.Value.UNSET.getNumber()) {
255 size += com.google.protobuf.CodedOutputStream
256 .computeEnumSize(1, perturbationStrategy_);
258 if (((bitField0_ & 0x00000001) != 0)) {
259 size += com.google.protobuf.CodedOutputStream
262 if (((bitField0_ & 0x00000002) != 0)) {
263 size += com.google.protobuf.CodedOutputStream
264 .computeBoolSize(3, improvePerturbedSolution_);
266 if (acceptanceStrategy_ != com.google.ortools.constraintsolver.AcceptanceStrategy.Value.UNSET.getNumber()) {
267 size += com.google.protobuf.CodedOutputStream
268 .computeEnumSize(4, acceptanceStrategy_);
270 if (((bitField0_ & 0x00000004) != 0)) {
271 size += com.google.protobuf.CodedOutputStream
274 size += getUnknownFields().getSerializedSize();
280 public boolean equals(
final java.lang.Object obj) {
284 if (!(obj instanceof com.google.ortools.constraintsolver.IteratedLocalSearchParameters)) {
285 return super.equals(obj);
289 if (perturbationStrategy_ != other.perturbationStrategy_)
return false;
300 if (acceptanceStrategy_ != other.acceptanceStrategy_)
return false;
306 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
312 if (memoizedHashCode != 0) {
313 return memoizedHashCode;
318 hash = (53 * hash) + perturbationStrategy_;
325 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
329 hash = (53 * hash) + acceptanceStrategy_;
334 hash = (29 * hash) + getUnknownFields().hashCode();
335 memoizedHashCode = hash;
340 java.nio.ByteBuffer data)
341 throws com.google.protobuf.InvalidProtocolBufferException {
342 return PARSER.parseFrom(data);
345 java.nio.ByteBuffer data,
346 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
347 throws com.google.protobuf.InvalidProtocolBufferException {
348 return PARSER.parseFrom(data, extensionRegistry);
351 com.google.protobuf.ByteString data)
352 throws com.google.protobuf.InvalidProtocolBufferException {
353 return PARSER.parseFrom(data);
356 com.google.protobuf.ByteString data,
357 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
358 throws com.google.protobuf.InvalidProtocolBufferException {
359 return PARSER.parseFrom(data, extensionRegistry);
362 throws com.google.protobuf.InvalidProtocolBufferException {
363 return PARSER.parseFrom(data);
367 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
368 throws com.google.protobuf.InvalidProtocolBufferException {
369 return PARSER.parseFrom(data, extensionRegistry);
372 throws java.io.IOException {
373 return com.google.protobuf.GeneratedMessage
374 .parseWithIOException(PARSER, input);
377 java.io.InputStream input,
378 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
379 throws java.io.IOException {
380 return com.google.protobuf.GeneratedMessage
381 .parseWithIOException(PARSER, input, extensionRegistry);
385 throws java.io.IOException {
386 return com.google.protobuf.GeneratedMessage
387 .parseDelimitedWithIOException(PARSER, input);
391 java.io.InputStream input,
392 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
393 throws java.io.IOException {
394 return com.google.protobuf.GeneratedMessage
395 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
398 com.google.protobuf.CodedInputStream input)
399 throws java.io.IOException {
400 return com.google.protobuf.GeneratedMessage
401 .parseWithIOException(PARSER, input);
404 com.google.protobuf.CodedInputStream input,
405 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
406 throws java.io.IOException {
407 return com.google.protobuf.GeneratedMessage
408 .parseWithIOException(PARSER, input, extensionRegistry);
414 return DEFAULT_INSTANCE.toBuilder();
416 public static Builder newBuilder(com.google.ortools.constraintsolver.IteratedLocalSearchParameters prototype) {
417 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
421 return this == DEFAULT_INSTANCE
427 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
438 public static final class Builder
extends
439 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
442 public static final com.google.protobuf.Descriptors.Descriptor
444 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_IteratedLocalSearchParameters_descriptor;
448 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
450 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_IteratedLocalSearchParameters_fieldAccessorTable
451 .ensureFieldAccessorsInitialized(
452 com.google.ortools.constraintsolver.IteratedLocalSearchParameters.class, com.google.ortools.constraintsolver.IteratedLocalSearchParameters.Builder.class);
457 maybeForceBuilderInitialization();
461 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
463 maybeForceBuilderInitialization();
465 private void maybeForceBuilderInitialization() {
466 if (com.google.protobuf.GeneratedMessage
467 .alwaysUseFieldBuilders) {
468 getRuinRecreateParametersFieldBuilder();
469 getSimulatedAnnealingParametersFieldBuilder();
476 perturbationStrategy_ = 0;
477 ruinRecreateParameters_ =
null;
478 if (ruinRecreateParametersBuilder_ !=
null) {
479 ruinRecreateParametersBuilder_.dispose();
480 ruinRecreateParametersBuilder_ =
null;
482 improvePerturbedSolution_ =
false;
483 acceptanceStrategy_ = 0;
484 simulatedAnnealingParameters_ =
null;
485 if (simulatedAnnealingParametersBuilder_ !=
null) {
486 simulatedAnnealingParametersBuilder_.dispose();
487 simulatedAnnealingParametersBuilder_ =
null;
493 public com.google.protobuf.Descriptors.Descriptor
495 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_IteratedLocalSearchParameters_descriptor;
500 return com.google.ortools.constraintsolver.IteratedLocalSearchParameters.getDefaultInstance();
507 throw newUninitializedMessageException(result);
515 if (bitField0_ != 0) { buildPartial0(result); }
520 private void buildPartial0(com.google.ortools.constraintsolver.IteratedLocalSearchParameters result) {
521 int from_bitField0_ = bitField0_;
522 if (((from_bitField0_ & 0x00000001) != 0)) {
523 result.perturbationStrategy_ = perturbationStrategy_;
525 int to_bitField0_ = 0;
526 if (((from_bitField0_ & 0x00000002) != 0)) {
527 result.ruinRecreateParameters_ = ruinRecreateParametersBuilder_ ==
null
528 ? ruinRecreateParameters_
529 : ruinRecreateParametersBuilder_.build();
530 to_bitField0_ |= 0x00000001;
532 if (((from_bitField0_ & 0x00000004) != 0)) {
533 result.improvePerturbedSolution_ = improvePerturbedSolution_;
534 to_bitField0_ |= 0x00000002;
536 if (((from_bitField0_ & 0x00000008) != 0)) {
537 result.acceptanceStrategy_ = acceptanceStrategy_;
539 if (((from_bitField0_ & 0x00000010) != 0)) {
540 result.simulatedAnnealingParameters_ = simulatedAnnealingParametersBuilder_ ==
null
541 ? simulatedAnnealingParameters_
542 : simulatedAnnealingParametersBuilder_.build();
543 to_bitField0_ |= 0x00000004;
545 result.bitField0_ |= to_bitField0_;
549 public Builder
mergeFrom(com.google.protobuf.Message other) {
550 if (other instanceof com.google.ortools.constraintsolver.IteratedLocalSearchParameters) {
551 return mergeFrom((com.google.ortools.constraintsolver.IteratedLocalSearchParameters)other);
553 super.mergeFrom(other);
558 public Builder
mergeFrom(com.google.ortools.constraintsolver.IteratedLocalSearchParameters other) {
559 if (other == com.google.ortools.constraintsolver.IteratedLocalSearchParameters.getDefaultInstance())
return this;
560 if (other.perturbationStrategy_ != 0) {
563 if (other.hasRuinRecreateParameters()) {
566 if (other.hasImprovePerturbedSolution()) {
569 if (other.acceptanceStrategy_ != 0) {
572 if (other.hasSimulatedAnnealingParameters()) {
575 this.mergeUnknownFields(other.getUnknownFields());
587 com.google.protobuf.CodedInputStream input,
588 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
589 throws java.io.IOException {
590 if (extensionRegistry ==
null) {
591 throw new java.lang.NullPointerException();
594 boolean done =
false;
596 int tag = input.readTag();
602 perturbationStrategy_ = input.readEnum();
603 bitField0_ |= 0x00000001;
608 getRuinRecreateParametersFieldBuilder().getBuilder(),
610 bitField0_ |= 0x00000002;
614 improvePerturbedSolution_ = input.readBool();
615 bitField0_ |= 0x00000004;
619 acceptanceStrategy_ = input.readEnum();
620 bitField0_ |= 0x00000008;
625 getSimulatedAnnealingParametersFieldBuilder().getBuilder(),
627 bitField0_ |= 0x00000010;
631 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
638 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
639 throw e.unwrapIOException();
645 private int bitField0_;
647 private int perturbationStrategy_ = 0;
658 return perturbationStrategy_;
671 perturbationStrategy_ = value;
672 bitField0_ |= 0x00000001;
702 throw new NullPointerException();
704 bitField0_ |= 0x00000001;
705 perturbationStrategy_ = value.getNumber();
719 bitField0_ = (bitField0_ & ~0x00000001);
720 perturbationStrategy_ = 0;
726 private com.google.protobuf.SingleFieldBuilder<
727 com.google.ortools.constraintsolver.RuinRecreateParameters, com.google.ortools.constraintsolver.RuinRecreateParameters.Builder, com.google.ortools.constraintsolver.RuinRecreateParametersOrBuilder> ruinRecreateParametersBuilder_;
737 return ((bitField0_ & 0x00000002) != 0);
748 if (ruinRecreateParametersBuilder_ ==
null) {
749 return ruinRecreateParameters_ ==
null ? com.google.ortools.constraintsolver.RuinRecreateParameters.getDefaultInstance() : ruinRecreateParameters_;
751 return ruinRecreateParametersBuilder_.getMessage();
762 if (ruinRecreateParametersBuilder_ ==
null) {
764 throw new NullPointerException();
766 ruinRecreateParameters_ = value;
768 ruinRecreateParametersBuilder_.setMessage(value);
770 bitField0_ |= 0x00000002;
782 com.google.ortools.constraintsolver.RuinRecreateParameters.Builder builderForValue) {
783 if (ruinRecreateParametersBuilder_ ==
null) {
784 ruinRecreateParameters_ = builderForValue.build();
786 ruinRecreateParametersBuilder_.setMessage(builderForValue.build());
788 bitField0_ |= 0x00000002;
800 if (ruinRecreateParametersBuilder_ ==
null) {
801 if (((bitField0_ & 0x00000002) != 0) &&
802 ruinRecreateParameters_ !=
null &&
803 ruinRecreateParameters_ != com.google.ortools.constraintsolver.RuinRecreateParameters.getDefaultInstance()) {
806 ruinRecreateParameters_ = value;
809 ruinRecreateParametersBuilder_.mergeFrom(value);
811 if (ruinRecreateParameters_ !=
null) {
812 bitField0_ |= 0x00000002;
825 bitField0_ = (bitField0_ & ~0x00000002);
826 ruinRecreateParameters_ =
null;
827 if (ruinRecreateParametersBuilder_ !=
null) {
828 ruinRecreateParametersBuilder_.dispose();
829 ruinRecreateParametersBuilder_ =
null;
842 bitField0_ |= 0x00000002;
844 return getRuinRecreateParametersFieldBuilder().getBuilder();
854 if (ruinRecreateParametersBuilder_ !=
null) {
855 return ruinRecreateParametersBuilder_.getMessageOrBuilder();
857 return ruinRecreateParameters_ ==
null ?
858 com.google.ortools.constraintsolver.RuinRecreateParameters.getDefaultInstance() : ruinRecreateParameters_;
868 private com.google.protobuf.SingleFieldBuilder<
869 com.google.ortools.constraintsolver.RuinRecreateParameters, com.google.ortools.constraintsolver.RuinRecreateParameters.Builder, com.google.ortools.constraintsolver.RuinRecreateParametersOrBuilder>
870 getRuinRecreateParametersFieldBuilder() {
871 if (ruinRecreateParametersBuilder_ ==
null) {
872 ruinRecreateParametersBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
873 com.google.ortools.constraintsolver.RuinRecreateParameters, com.google.ortools.constraintsolver.RuinRecreateParameters.Builder, com.google.ortools.constraintsolver.RuinRecreateParametersOrBuilder>(
875 getParentForChildren(),
877 ruinRecreateParameters_ =
null;
879 return ruinRecreateParametersBuilder_;
882 private boolean improvePerturbedSolution_ ;
894 return ((bitField0_ & 0x00000004) != 0);
907 return improvePerturbedSolution_;
921 improvePerturbedSolution_ = value;
922 bitField0_ |= 0x00000004;
936 bitField0_ = (bitField0_ & ~0x00000004);
937 improvePerturbedSolution_ =
false;
942 private int acceptanceStrategy_ = 0;
953 return acceptanceStrategy_;
966 acceptanceStrategy_ = value;
967 bitField0_ |= 0x00000008;
997 throw new NullPointerException();
999 bitField0_ |= 0x00000008;
1000 acceptanceStrategy_ = value.getNumber();
1014 bitField0_ = (bitField0_ & ~0x00000008);
1015 acceptanceStrategy_ = 0;
1021 private com.google.protobuf.SingleFieldBuilder<
1022 com.google.ortools.constraintsolver.SimulatedAnnealingParameters, com.google.ortools.constraintsolver.SimulatedAnnealingParameters.Builder, com.google.ortools.constraintsolver.SimulatedAnnealingParametersOrBuilder> simulatedAnnealingParametersBuilder_;
1033 return ((bitField0_ & 0x00000010) != 0);
1045 if (simulatedAnnealingParametersBuilder_ ==
null) {
1046 return simulatedAnnealingParameters_ ==
null ? com.google.ortools.constraintsolver.SimulatedAnnealingParameters.getDefaultInstance() : simulatedAnnealingParameters_;
1048 return simulatedAnnealingParametersBuilder_.getMessage();
1060 if (simulatedAnnealingParametersBuilder_ ==
null) {
1061 if (value ==
null) {
1062 throw new NullPointerException();
1064 simulatedAnnealingParameters_ = value;
1066 simulatedAnnealingParametersBuilder_.setMessage(value);
1068 bitField0_ |= 0x00000010;
1081 com.google.ortools.constraintsolver.SimulatedAnnealingParameters.Builder builderForValue) {
1082 if (simulatedAnnealingParametersBuilder_ ==
null) {
1083 simulatedAnnealingParameters_ = builderForValue.build();
1085 simulatedAnnealingParametersBuilder_.setMessage(builderForValue.build());
1087 bitField0_ |= 0x00000010;
1100 if (simulatedAnnealingParametersBuilder_ ==
null) {
1101 if (((bitField0_ & 0x00000010) != 0) &&
1102 simulatedAnnealingParameters_ !=
null &&
1103 simulatedAnnealingParameters_ != com.google.ortools.constraintsolver.SimulatedAnnealingParameters.getDefaultInstance()) {
1106 simulatedAnnealingParameters_ = value;
1109 simulatedAnnealingParametersBuilder_.mergeFrom(value);
1111 if (simulatedAnnealingParameters_ !=
null) {
1112 bitField0_ |= 0x00000010;
1126 bitField0_ = (bitField0_ & ~0x00000010);
1127 simulatedAnnealingParameters_ =
null;
1128 if (simulatedAnnealingParametersBuilder_ !=
null) {
1129 simulatedAnnealingParametersBuilder_.dispose();
1130 simulatedAnnealingParametersBuilder_ =
null;
1144 bitField0_ |= 0x00000010;
1146 return getSimulatedAnnealingParametersFieldBuilder().getBuilder();
1157 if (simulatedAnnealingParametersBuilder_ !=
null) {
1158 return simulatedAnnealingParametersBuilder_.getMessageOrBuilder();
1160 return simulatedAnnealingParameters_ ==
null ?
1161 com.google.ortools.constraintsolver.SimulatedAnnealingParameters.getDefaultInstance() : simulatedAnnealingParameters_;
1172 private com.google.protobuf.SingleFieldBuilder<
1173 com.google.ortools.constraintsolver.SimulatedAnnealingParameters, com.google.ortools.constraintsolver.SimulatedAnnealingParameters.Builder, com.google.ortools.constraintsolver.SimulatedAnnealingParametersOrBuilder>
1174 getSimulatedAnnealingParametersFieldBuilder() {
1175 if (simulatedAnnealingParametersBuilder_ ==
null) {
1176 simulatedAnnealingParametersBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1177 com.google.ortools.constraintsolver.SimulatedAnnealingParameters, com.google.ortools.constraintsolver.SimulatedAnnealingParameters.Builder, com.google.ortools.constraintsolver.SimulatedAnnealingParametersOrBuilder>(
1179 getParentForChildren(),
1181 simulatedAnnealingParameters_ =
null;
1183 return simulatedAnnealingParametersBuilder_;
1192 DEFAULT_INSTANCE =
new com.google.ortools.constraintsolver.IteratedLocalSearchParameters();
1196 return DEFAULT_INSTANCE;
1203 com.google.protobuf.CodedInputStream input,
1204 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1205 throws com.google.protobuf.InvalidProtocolBufferException {
1208 builder.mergeFrom(input, extensionRegistry);
1209 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1210 throw e.setUnfinishedMessage(builder.buildPartial());
1211 }
catch (com.google.protobuf.UninitializedMessageException e) {
1212 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1213 }
catch (java.io.IOException e) {
1214 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1215 .setUnfinishedMessage(builder.buildPartial());
1217 return builder.buildPartial();
1221 public static com.google.protobuf.Parser<IteratedLocalSearchParameters>
parser() {
1232 return DEFAULT_INSTANCE;