6package com.google.ortools.constraintsolver;
16@com.google.protobuf.Generated
17public final class SimulatedAnnealingAcceptanceStrategy
extends
18 com.google.protobuf.GeneratedMessage implements
21private static final long serialVersionUID = 0L;
23 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
24 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
29 "SimulatedAnnealingAcceptanceStrategy");
32 private SimulatedAnnealingAcceptanceStrategy(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
35 private SimulatedAnnealingAcceptanceStrategy() {
36 coolingScheduleStrategy_ = 0;
39 public static final com.google.protobuf.Descriptors.Descriptor
41 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingAcceptanceStrategy_descriptor;
45 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
47 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingAcceptanceStrategy_fieldAccessorTable
48 .ensureFieldAccessorsInitialized(
49 com.google.ortools.constraintsolver.SimulatedAnnealingAcceptanceStrategy.class, com.google.ortools.constraintsolver.SimulatedAnnealingAcceptanceStrategy.Builder.class);
52 private int bitField0_;
54 private int coolingScheduleStrategy_ = 0;
65 return coolingScheduleStrategy_;
82 private double initialTemperature_ = 0D;
93 return ((bitField0_ & 0x00000001) != 0);
105 return initialTemperature_;
109 private double finalTemperature_ = 0D;
120 return ((bitField0_ & 0x00000002) != 0);
132 return finalTemperature_;
136 private boolean automaticTemperatures_ =
false;
156 return ((bitField0_ & 0x00000004) != 0);
177 return automaticTemperatures_;
180 private byte memoizedIsInitialized = -1;
187 memoizedIsInitialized = 1;
192 public void writeTo(com.google.protobuf.CodedOutputStream output)
193 throws java.io.IOException {
194 if (coolingScheduleStrategy_ != com.google.ortools.constraintsolver.CoolingScheduleStrategy.Value.UNSET.getNumber()) {
195 output.writeEnum(1, coolingScheduleStrategy_);
197 if (((bitField0_ & 0x00000001) != 0)) {
198 output.writeDouble(2, initialTemperature_);
200 if (((bitField0_ & 0x00000002) != 0)) {
201 output.writeDouble(3, finalTemperature_);
203 if (((bitField0_ & 0x00000004) != 0)) {
204 output.writeBool(4, automaticTemperatures_);
206 getUnknownFields().writeTo(output);
211 int size = memoizedSize;
212 if (size != -1)
return size;
215 if (coolingScheduleStrategy_ != com.google.ortools.constraintsolver.CoolingScheduleStrategy.Value.UNSET.getNumber()) {
216 size += com.google.protobuf.CodedOutputStream
217 .computeEnumSize(1, coolingScheduleStrategy_);
219 if (((bitField0_ & 0x00000001) != 0)) {
220 size += com.google.protobuf.CodedOutputStream
221 .computeDoubleSize(2, initialTemperature_);
223 if (((bitField0_ & 0x00000002) != 0)) {
224 size += com.google.protobuf.CodedOutputStream
225 .computeDoubleSize(3, finalTemperature_);
227 if (((bitField0_ & 0x00000004) != 0)) {
228 size += com.google.protobuf.CodedOutputStream
229 .computeBoolSize(4, automaticTemperatures_);
231 size += getUnknownFields().getSerializedSize();
237 public boolean equals(
final java.lang.Object obj) {
241 if (!(obj instanceof com.google.ortools.constraintsolver.SimulatedAnnealingAcceptanceStrategy)) {
242 return super.equals(obj);
246 if (coolingScheduleStrategy_ != other.coolingScheduleStrategy_)
return false;
250 != java.lang.Double.doubleToLongBits(
256 != java.lang.Double.doubleToLongBits(
264 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
270 if (memoizedHashCode != 0) {
271 return memoizedHashCode;
276 hash = (53 * hash) + coolingScheduleStrategy_;
279 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
284 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
289 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
292 hash = (29 * hash) + getUnknownFields().hashCode();
293 memoizedHashCode = hash;
298 java.nio.ByteBuffer data)
299 throws com.google.protobuf.InvalidProtocolBufferException {
300 return PARSER.parseFrom(data);
303 java.nio.ByteBuffer data,
304 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
305 throws com.google.protobuf.InvalidProtocolBufferException {
306 return PARSER.parseFrom(data, extensionRegistry);
309 com.google.protobuf.ByteString data)
310 throws com.google.protobuf.InvalidProtocolBufferException {
311 return PARSER.parseFrom(data);
314 com.google.protobuf.ByteString data,
315 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
316 throws com.google.protobuf.InvalidProtocolBufferException {
317 return PARSER.parseFrom(data, extensionRegistry);
320 throws com.google.protobuf.InvalidProtocolBufferException {
321 return PARSER.parseFrom(data);
325 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
326 throws com.google.protobuf.InvalidProtocolBufferException {
327 return PARSER.parseFrom(data, extensionRegistry);
330 throws java.io.IOException {
331 return com.google.protobuf.GeneratedMessage
332 .parseWithIOException(PARSER, input);
335 java.io.InputStream input,
336 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
337 throws java.io.IOException {
338 return com.google.protobuf.GeneratedMessage
339 .parseWithIOException(PARSER, input, extensionRegistry);
343 throws java.io.IOException {
344 return com.google.protobuf.GeneratedMessage
345 .parseDelimitedWithIOException(PARSER, input);
349 java.io.InputStream input,
350 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
351 throws java.io.IOException {
352 return com.google.protobuf.GeneratedMessage
353 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
356 com.google.protobuf.CodedInputStream input)
357 throws java.io.IOException {
358 return com.google.protobuf.GeneratedMessage
359 .parseWithIOException(PARSER, input);
362 com.google.protobuf.CodedInputStream input,
363 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
364 throws java.io.IOException {
365 return com.google.protobuf.GeneratedMessage
366 .parseWithIOException(PARSER, input, extensionRegistry);
372 return DEFAULT_INSTANCE.toBuilder();
374 public static Builder newBuilder(com.google.ortools.constraintsolver.SimulatedAnnealingAcceptanceStrategy prototype) {
375 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
379 return this == DEFAULT_INSTANCE
385 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
397 public static final class Builder
extends
398 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
401 public static final com.google.protobuf.Descriptors.Descriptor
403 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingAcceptanceStrategy_descriptor;
407 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
409 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingAcceptanceStrategy_fieldAccessorTable
410 .ensureFieldAccessorsInitialized(
411 com.google.ortools.constraintsolver.SimulatedAnnealingAcceptanceStrategy.class, com.google.ortools.constraintsolver.SimulatedAnnealingAcceptanceStrategy.Builder.class);
420 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
428 coolingScheduleStrategy_ = 0;
429 initialTemperature_ = 0D;
430 finalTemperature_ = 0D;
431 automaticTemperatures_ =
false;
436 public com.google.protobuf.Descriptors.Descriptor
438 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingAcceptanceStrategy_descriptor;
443 return com.google.ortools.constraintsolver.SimulatedAnnealingAcceptanceStrategy.getDefaultInstance();
450 throw newUninitializedMessageException(result);
458 if (bitField0_ != 0) { buildPartial0(result); }
463 private void buildPartial0(com.google.ortools.constraintsolver.SimulatedAnnealingAcceptanceStrategy result) {
464 int from_bitField0_ = bitField0_;
465 if (((from_bitField0_ & 0x00000001) != 0)) {
466 result.coolingScheduleStrategy_ = coolingScheduleStrategy_;
468 int to_bitField0_ = 0;
469 if (((from_bitField0_ & 0x00000002) != 0)) {
470 result.initialTemperature_ = initialTemperature_;
471 to_bitField0_ |= 0x00000001;
473 if (((from_bitField0_ & 0x00000004) != 0)) {
474 result.finalTemperature_ = finalTemperature_;
475 to_bitField0_ |= 0x00000002;
477 if (((from_bitField0_ & 0x00000008) != 0)) {
478 result.automaticTemperatures_ = automaticTemperatures_;
479 to_bitField0_ |= 0x00000004;
481 result.bitField0_ |= to_bitField0_;
485 public Builder
mergeFrom(com.google.protobuf.Message other) {
486 if (other instanceof com.google.ortools.constraintsolver.SimulatedAnnealingAcceptanceStrategy) {
487 return mergeFrom((com.google.ortools.constraintsolver.SimulatedAnnealingAcceptanceStrategy)other);
489 super.mergeFrom(other);
494 public Builder
mergeFrom(com.google.ortools.constraintsolver.SimulatedAnnealingAcceptanceStrategy other) {
495 if (other == com.google.ortools.constraintsolver.SimulatedAnnealingAcceptanceStrategy.getDefaultInstance())
return this;
496 if (other.coolingScheduleStrategy_ != 0) {
499 if (other.hasInitialTemperature()) {
502 if (other.hasFinalTemperature()) {
505 if (other.hasAutomaticTemperatures()) {
508 this.mergeUnknownFields(other.getUnknownFields());
520 com.google.protobuf.CodedInputStream input,
521 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
522 throws java.io.IOException {
523 if (extensionRegistry ==
null) {
524 throw new java.lang.NullPointerException();
527 boolean done =
false;
529 int tag = input.readTag();
535 coolingScheduleStrategy_ = input.readEnum();
536 bitField0_ |= 0x00000001;
540 initialTemperature_ = input.readDouble();
541 bitField0_ |= 0x00000002;
545 finalTemperature_ = input.readDouble();
546 bitField0_ |= 0x00000004;
550 automaticTemperatures_ = input.readBool();
551 bitField0_ |= 0x00000008;
555 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
562 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
563 throw e.unwrapIOException();
569 private int bitField0_;
571 private int coolingScheduleStrategy_ = 0;
582 return coolingScheduleStrategy_;
595 coolingScheduleStrategy_ = value;
596 bitField0_ |= 0x00000001;
625 if (value ==
null) {
throw new NullPointerException(); }
626 bitField0_ |= 0x00000001;
627 coolingScheduleStrategy_ = value.getNumber();
641 bitField0_ = (bitField0_ & ~0x00000001);
642 coolingScheduleStrategy_ = 0;
647 private double initialTemperature_ ;
658 return ((bitField0_ & 0x00000002) != 0);
670 return initialTemperature_;
683 initialTemperature_ = value;
684 bitField0_ |= 0x00000002;
697 bitField0_ = (bitField0_ & ~0x00000002);
698 initialTemperature_ = 0D;
703 private double finalTemperature_ ;
714 return ((bitField0_ & 0x00000004) != 0);
726 return finalTemperature_;
739 finalTemperature_ = value;
740 bitField0_ |= 0x00000004;
753 bitField0_ = (bitField0_ & ~0x00000004);
754 finalTemperature_ = 0D;
759 private boolean automaticTemperatures_ ;
779 return ((bitField0_ & 0x00000008) != 0);
800 return automaticTemperatures_;
822 automaticTemperatures_ = value;
823 bitField0_ |= 0x00000008;
845 bitField0_ = (bitField0_ & ~0x00000008);
846 automaticTemperatures_ =
false;
857 DEFAULT_INSTANCE =
new com.google.ortools.constraintsolver.SimulatedAnnealingAcceptanceStrategy();
861 return DEFAULT_INSTANCE;
868 com.google.protobuf.CodedInputStream input,
869 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
870 throws com.google.protobuf.InvalidProtocolBufferException {
873 builder.mergeFrom(input, extensionRegistry);
874 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
875 throw e.setUnfinishedMessage(builder.buildPartial());
876 }
catch (com.google.protobuf.UninitializedMessageException e) {
877 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
878 }
catch (java.io.IOException e) {
879 throw new com.google.protobuf.InvalidProtocolBufferException(e)
880 .setUnfinishedMessage(builder.buildPartial());
882 return builder.buildPartial();
886 public static com.google.protobuf.Parser<SimulatedAnnealingAcceptanceStrategy>
parser() {
891 public com.google.protobuf.Parser<SimulatedAnnealingAcceptanceStrategy>
getParserForType() {
897 return DEFAULT_INSTANCE;