6package com.google.ortools.constraintsolver;
15@com.google.protobuf.Generated
16public final class SimulatedAnnealingParameters
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 SimulatedAnnealingParameters.class.getName());
31 private SimulatedAnnealingParameters(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 private SimulatedAnnealingParameters() {
35 coolingScheduleStrategy_ = 0;
38 public static final com.google.protobuf.Descriptors.Descriptor
40 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingParameters_descriptor;
44 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
46 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingParameters_fieldAccessorTable
47 .ensureFieldAccessorsInitialized(
48 com.google.ortools.constraintsolver.SimulatedAnnealingParameters.class, com.google.ortools.constraintsolver.SimulatedAnnealingParameters.Builder.class);
51 private int bitField0_;
53 private int coolingScheduleStrategy_ = 0;
64 return coolingScheduleStrategy_;
81 private double initialTemperature_ = 0D;
92 return ((bitField0_ & 0x00000001) != 0);
104 return initialTemperature_;
108 private double finalTemperature_ = 0D;
119 return ((bitField0_ & 0x00000002) != 0);
131 return finalTemperature_;
135 private boolean automaticTemperatures_ =
false;
155 return ((bitField0_ & 0x00000004) != 0);
176 return automaticTemperatures_;
179 private byte memoizedIsInitialized = -1;
186 memoizedIsInitialized = 1;
191 public void writeTo(com.google.protobuf.CodedOutputStream output)
192 throws java.io.IOException {
193 if (coolingScheduleStrategy_ != com.google.ortools.constraintsolver.CoolingScheduleStrategy.Value.UNSET.getNumber()) {
194 output.writeEnum(1, coolingScheduleStrategy_);
196 if (((bitField0_ & 0x00000001) != 0)) {
197 output.writeDouble(2, initialTemperature_);
199 if (((bitField0_ & 0x00000002) != 0)) {
200 output.writeDouble(3, finalTemperature_);
202 if (((bitField0_ & 0x00000004) != 0)) {
203 output.writeBool(4, automaticTemperatures_);
205 getUnknownFields().writeTo(output);
210 int size = memoizedSize;
211 if (size != -1)
return size;
214 if (coolingScheduleStrategy_ != com.google.ortools.constraintsolver.CoolingScheduleStrategy.Value.UNSET.getNumber()) {
215 size += com.google.protobuf.CodedOutputStream
216 .computeEnumSize(1, coolingScheduleStrategy_);
218 if (((bitField0_ & 0x00000001) != 0)) {
219 size += com.google.protobuf.CodedOutputStream
220 .computeDoubleSize(2, initialTemperature_);
222 if (((bitField0_ & 0x00000002) != 0)) {
223 size += com.google.protobuf.CodedOutputStream
224 .computeDoubleSize(3, finalTemperature_);
226 if (((bitField0_ & 0x00000004) != 0)) {
227 size += com.google.protobuf.CodedOutputStream
228 .computeBoolSize(4, automaticTemperatures_);
230 size += getUnknownFields().getSerializedSize();
236 public boolean equals(
final java.lang.Object obj) {
240 if (!(obj instanceof com.google.ortools.constraintsolver.SimulatedAnnealingParameters)) {
241 return super.equals(obj);
245 if (coolingScheduleStrategy_ != other.coolingScheduleStrategy_)
return false;
249 != java.lang.Double.doubleToLongBits(
255 != java.lang.Double.doubleToLongBits(
263 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
269 if (memoizedHashCode != 0) {
270 return memoizedHashCode;
275 hash = (53 * hash) + coolingScheduleStrategy_;
278 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
283 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
288 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
291 hash = (29 * hash) + getUnknownFields().hashCode();
292 memoizedHashCode = hash;
297 java.nio.ByteBuffer data)
298 throws com.google.protobuf.InvalidProtocolBufferException {
299 return PARSER.parseFrom(data);
302 java.nio.ByteBuffer data,
303 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
304 throws com.google.protobuf.InvalidProtocolBufferException {
305 return PARSER.parseFrom(data, extensionRegistry);
308 com.google.protobuf.ByteString data)
309 throws com.google.protobuf.InvalidProtocolBufferException {
310 return PARSER.parseFrom(data);
313 com.google.protobuf.ByteString data,
314 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
315 throws com.google.protobuf.InvalidProtocolBufferException {
316 return PARSER.parseFrom(data, extensionRegistry);
319 throws com.google.protobuf.InvalidProtocolBufferException {
320 return PARSER.parseFrom(data);
324 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
325 throws com.google.protobuf.InvalidProtocolBufferException {
326 return PARSER.parseFrom(data, extensionRegistry);
329 throws java.io.IOException {
330 return com.google.protobuf.GeneratedMessage
331 .parseWithIOException(PARSER, input);
334 java.io.InputStream input,
335 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
336 throws java.io.IOException {
337 return com.google.protobuf.GeneratedMessage
338 .parseWithIOException(PARSER, input, extensionRegistry);
342 throws java.io.IOException {
343 return com.google.protobuf.GeneratedMessage
344 .parseDelimitedWithIOException(PARSER, input);
348 java.io.InputStream input,
349 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
350 throws java.io.IOException {
351 return com.google.protobuf.GeneratedMessage
352 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
355 com.google.protobuf.CodedInputStream input)
356 throws java.io.IOException {
357 return com.google.protobuf.GeneratedMessage
358 .parseWithIOException(PARSER, input);
361 com.google.protobuf.CodedInputStream input,
362 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
363 throws java.io.IOException {
364 return com.google.protobuf.GeneratedMessage
365 .parseWithIOException(PARSER, input, extensionRegistry);
371 return DEFAULT_INSTANCE.toBuilder();
373 public static Builder newBuilder(com.google.ortools.constraintsolver.SimulatedAnnealingParameters prototype) {
374 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
378 return this == DEFAULT_INSTANCE
384 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
395 public static final class Builder
extends
396 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
399 public static final com.google.protobuf.Descriptors.Descriptor
401 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingParameters_descriptor;
405 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
407 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingParameters_fieldAccessorTable
408 .ensureFieldAccessorsInitialized(
409 com.google.ortools.constraintsolver.SimulatedAnnealingParameters.class, com.google.ortools.constraintsolver.SimulatedAnnealingParameters.Builder.class);
418 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
426 coolingScheduleStrategy_ = 0;
427 initialTemperature_ = 0D;
428 finalTemperature_ = 0D;
429 automaticTemperatures_ =
false;
434 public com.google.protobuf.Descriptors.Descriptor
436 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingParameters_descriptor;
441 return com.google.ortools.constraintsolver.SimulatedAnnealingParameters.getDefaultInstance();
448 throw newUninitializedMessageException(result);
456 if (bitField0_ != 0) { buildPartial0(result); }
461 private void buildPartial0(com.google.ortools.constraintsolver.SimulatedAnnealingParameters result) {
462 int from_bitField0_ = bitField0_;
463 if (((from_bitField0_ & 0x00000001) != 0)) {
464 result.coolingScheduleStrategy_ = coolingScheduleStrategy_;
466 int to_bitField0_ = 0;
467 if (((from_bitField0_ & 0x00000002) != 0)) {
468 result.initialTemperature_ = initialTemperature_;
469 to_bitField0_ |= 0x00000001;
471 if (((from_bitField0_ & 0x00000004) != 0)) {
472 result.finalTemperature_ = finalTemperature_;
473 to_bitField0_ |= 0x00000002;
475 if (((from_bitField0_ & 0x00000008) != 0)) {
476 result.automaticTemperatures_ = automaticTemperatures_;
477 to_bitField0_ |= 0x00000004;
479 result.bitField0_ |= to_bitField0_;
483 public Builder
mergeFrom(com.google.protobuf.Message other) {
484 if (other instanceof com.google.ortools.constraintsolver.SimulatedAnnealingParameters) {
485 return mergeFrom((com.google.ortools.constraintsolver.SimulatedAnnealingParameters)other);
487 super.mergeFrom(other);
492 public Builder
mergeFrom(com.google.ortools.constraintsolver.SimulatedAnnealingParameters other) {
493 if (other == com.google.ortools.constraintsolver.SimulatedAnnealingParameters.getDefaultInstance())
return this;
494 if (other.coolingScheduleStrategy_ != 0) {
497 if (other.hasInitialTemperature()) {
500 if (other.hasFinalTemperature()) {
503 if (other.hasAutomaticTemperatures()) {
506 this.mergeUnknownFields(other.getUnknownFields());
518 com.google.protobuf.CodedInputStream input,
519 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
520 throws java.io.IOException {
521 if (extensionRegistry ==
null) {
522 throw new java.lang.NullPointerException();
525 boolean done =
false;
527 int tag = input.readTag();
533 coolingScheduleStrategy_ = input.readEnum();
534 bitField0_ |= 0x00000001;
538 initialTemperature_ = input.readDouble();
539 bitField0_ |= 0x00000002;
543 finalTemperature_ = input.readDouble();
544 bitField0_ |= 0x00000004;
548 automaticTemperatures_ = input.readBool();
549 bitField0_ |= 0x00000008;
553 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
560 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
561 throw e.unwrapIOException();
567 private int bitField0_;
569 private int coolingScheduleStrategy_ = 0;
580 return coolingScheduleStrategy_;
593 coolingScheduleStrategy_ = value;
594 bitField0_ |= 0x00000001;
623 if (value ==
null) {
throw new NullPointerException(); }
624 bitField0_ |= 0x00000001;
625 coolingScheduleStrategy_ = value.getNumber();
639 bitField0_ = (bitField0_ & ~0x00000001);
640 coolingScheduleStrategy_ = 0;
645 private double initialTemperature_ ;
656 return ((bitField0_ & 0x00000002) != 0);
668 return initialTemperature_;
681 initialTemperature_ = value;
682 bitField0_ |= 0x00000002;
695 bitField0_ = (bitField0_ & ~0x00000002);
696 initialTemperature_ = 0D;
701 private double finalTemperature_ ;
712 return ((bitField0_ & 0x00000004) != 0);
724 return finalTemperature_;
737 finalTemperature_ = value;
738 bitField0_ |= 0x00000004;
751 bitField0_ = (bitField0_ & ~0x00000004);
752 finalTemperature_ = 0D;
757 private boolean automaticTemperatures_ ;
777 return ((bitField0_ & 0x00000008) != 0);
798 return automaticTemperatures_;
820 automaticTemperatures_ = value;
821 bitField0_ |= 0x00000008;
843 bitField0_ = (bitField0_ & ~0x00000008);
844 automaticTemperatures_ =
false;
855 DEFAULT_INSTANCE =
new com.google.ortools.constraintsolver.SimulatedAnnealingParameters();
859 return DEFAULT_INSTANCE;
866 com.google.protobuf.CodedInputStream input,
867 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
868 throws com.google.protobuf.InvalidProtocolBufferException {
871 builder.mergeFrom(input, extensionRegistry);
872 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
873 throw e.setUnfinishedMessage(builder.buildPartial());
874 }
catch (com.google.protobuf.UninitializedMessageException e) {
875 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
876 }
catch (java.io.IOException e) {
877 throw new com.google.protobuf.InvalidProtocolBufferException(e)
878 .setUnfinishedMessage(builder.buildPartial());
880 return builder.buildPartial();
884 public static com.google.protobuf.Parser<SimulatedAnnealingParameters>
parser() {
895 return DEFAULT_INSTANCE;