6package com.google.ortools.constraintsolver;
15public final class SimulatedAnnealingParameters
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 SimulatedAnnealingParameters.class.getName());
30 private SimulatedAnnealingParameters(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
33 private SimulatedAnnealingParameters() {
34 coolingScheduleStrategy_ = 0;
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingParameters_descriptor;
43 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
45 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingParameters_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.constraintsolver.SimulatedAnnealingParameters.class, com.google.ortools.constraintsolver.SimulatedAnnealingParameters.Builder.class);
50 private int bitField0_;
52 private int coolingScheduleStrategy_ = 0;
63 return coolingScheduleStrategy_;
80 private double initialTemperature_ = 0D;
91 return ((bitField0_ & 0x00000001) != 0);
103 return initialTemperature_;
107 private double finalTemperature_ = 0D;
118 return ((bitField0_ & 0x00000002) != 0);
130 return finalTemperature_;
134 private boolean automaticTemperatures_ =
false;
154 return ((bitField0_ & 0x00000004) != 0);
175 return automaticTemperatures_;
178 private byte memoizedIsInitialized = -1;
185 memoizedIsInitialized = 1;
190 public void writeTo(com.google.protobuf.CodedOutputStream output)
191 throws java.io.IOException {
192 if (coolingScheduleStrategy_ != com.google.ortools.constraintsolver.CoolingScheduleStrategy.Value.UNSET.getNumber()) {
193 output.writeEnum(1, coolingScheduleStrategy_);
195 if (((bitField0_ & 0x00000001) != 0)) {
196 output.writeDouble(2, initialTemperature_);
198 if (((bitField0_ & 0x00000002) != 0)) {
199 output.writeDouble(3, finalTemperature_);
201 if (((bitField0_ & 0x00000004) != 0)) {
202 output.writeBool(4, automaticTemperatures_);
204 getUnknownFields().writeTo(output);
209 int size = memoizedSize;
210 if (size != -1)
return size;
213 if (coolingScheduleStrategy_ != com.google.ortools.constraintsolver.CoolingScheduleStrategy.Value.UNSET.getNumber()) {
214 size += com.google.protobuf.CodedOutputStream
215 .computeEnumSize(1, coolingScheduleStrategy_);
217 if (((bitField0_ & 0x00000001) != 0)) {
218 size += com.google.protobuf.CodedOutputStream
219 .computeDoubleSize(2, initialTemperature_);
221 if (((bitField0_ & 0x00000002) != 0)) {
222 size += com.google.protobuf.CodedOutputStream
223 .computeDoubleSize(3, finalTemperature_);
225 if (((bitField0_ & 0x00000004) != 0)) {
226 size += com.google.protobuf.CodedOutputStream
227 .computeBoolSize(4, automaticTemperatures_);
229 size += getUnknownFields().getSerializedSize();
235 public boolean equals(
final java.lang.Object obj) {
239 if (!(obj instanceof com.google.ortools.constraintsolver.SimulatedAnnealingParameters)) {
240 return super.equals(obj);
244 if (coolingScheduleStrategy_ != other.coolingScheduleStrategy_)
return false;
248 != java.lang.Double.doubleToLongBits(
254 != java.lang.Double.doubleToLongBits(
262 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
268 if (memoizedHashCode != 0) {
269 return memoizedHashCode;
274 hash = (53 * hash) + coolingScheduleStrategy_;
277 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
282 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
287 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
290 hash = (29 * hash) + getUnknownFields().hashCode();
291 memoizedHashCode = hash;
296 java.nio.ByteBuffer data)
297 throws com.google.protobuf.InvalidProtocolBufferException {
298 return PARSER.parseFrom(data);
301 java.nio.ByteBuffer data,
302 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
303 throws com.google.protobuf.InvalidProtocolBufferException {
304 return PARSER.parseFrom(data, extensionRegistry);
307 com.google.protobuf.ByteString data)
308 throws com.google.protobuf.InvalidProtocolBufferException {
309 return PARSER.parseFrom(data);
312 com.google.protobuf.ByteString data,
313 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
314 throws com.google.protobuf.InvalidProtocolBufferException {
315 return PARSER.parseFrom(data, extensionRegistry);
318 throws com.google.protobuf.InvalidProtocolBufferException {
319 return PARSER.parseFrom(data);
323 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
324 throws com.google.protobuf.InvalidProtocolBufferException {
325 return PARSER.parseFrom(data, extensionRegistry);
328 throws java.io.IOException {
329 return com.google.protobuf.GeneratedMessage
330 .parseWithIOException(PARSER, input);
333 java.io.InputStream input,
334 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
335 throws java.io.IOException {
336 return com.google.protobuf.GeneratedMessage
337 .parseWithIOException(PARSER, input, extensionRegistry);
341 throws java.io.IOException {
342 return com.google.protobuf.GeneratedMessage
343 .parseDelimitedWithIOException(PARSER, input);
347 java.io.InputStream input,
348 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
349 throws java.io.IOException {
350 return com.google.protobuf.GeneratedMessage
351 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
354 com.google.protobuf.CodedInputStream input)
355 throws java.io.IOException {
356 return com.google.protobuf.GeneratedMessage
357 .parseWithIOException(PARSER, input);
360 com.google.protobuf.CodedInputStream input,
361 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
362 throws java.io.IOException {
363 return com.google.protobuf.GeneratedMessage
364 .parseWithIOException(PARSER, input, extensionRegistry);
370 return DEFAULT_INSTANCE.toBuilder();
372 public static Builder newBuilder(com.google.ortools.constraintsolver.SimulatedAnnealingParameters prototype) {
373 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
377 return this == DEFAULT_INSTANCE
383 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
394 public static final class Builder
extends
395 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
398 public static final com.google.protobuf.Descriptors.Descriptor
400 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingParameters_descriptor;
404 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
406 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingParameters_fieldAccessorTable
407 .ensureFieldAccessorsInitialized(
408 com.google.ortools.constraintsolver.SimulatedAnnealingParameters.class, com.google.ortools.constraintsolver.SimulatedAnnealingParameters.Builder.class);
417 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
425 coolingScheduleStrategy_ = 0;
426 initialTemperature_ = 0D;
427 finalTemperature_ = 0D;
428 automaticTemperatures_ =
false;
433 public com.google.protobuf.Descriptors.Descriptor
435 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_SimulatedAnnealingParameters_descriptor;
440 return com.google.ortools.constraintsolver.SimulatedAnnealingParameters.getDefaultInstance();
447 throw newUninitializedMessageException(result);
455 if (bitField0_ != 0) { buildPartial0(result); }
460 private void buildPartial0(com.google.ortools.constraintsolver.SimulatedAnnealingParameters result) {
461 int from_bitField0_ = bitField0_;
462 if (((from_bitField0_ & 0x00000001) != 0)) {
463 result.coolingScheduleStrategy_ = coolingScheduleStrategy_;
465 int to_bitField0_ = 0;
466 if (((from_bitField0_ & 0x00000002) != 0)) {
467 result.initialTemperature_ = initialTemperature_;
468 to_bitField0_ |= 0x00000001;
470 if (((from_bitField0_ & 0x00000004) != 0)) {
471 result.finalTemperature_ = finalTemperature_;
472 to_bitField0_ |= 0x00000002;
474 if (((from_bitField0_ & 0x00000008) != 0)) {
475 result.automaticTemperatures_ = automaticTemperatures_;
476 to_bitField0_ |= 0x00000004;
478 result.bitField0_ |= to_bitField0_;
482 public Builder
mergeFrom(com.google.protobuf.Message other) {
483 if (other instanceof com.google.ortools.constraintsolver.SimulatedAnnealingParameters) {
484 return mergeFrom((com.google.ortools.constraintsolver.SimulatedAnnealingParameters)other);
486 super.mergeFrom(other);
491 public Builder
mergeFrom(com.google.ortools.constraintsolver.SimulatedAnnealingParameters other) {
492 if (other == com.google.ortools.constraintsolver.SimulatedAnnealingParameters.getDefaultInstance())
return this;
493 if (other.coolingScheduleStrategy_ != 0) {
496 if (other.hasInitialTemperature()) {
499 if (other.hasFinalTemperature()) {
502 if (other.hasAutomaticTemperatures()) {
505 this.mergeUnknownFields(other.getUnknownFields());
517 com.google.protobuf.CodedInputStream input,
518 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
519 throws java.io.IOException {
520 if (extensionRegistry ==
null) {
521 throw new java.lang.NullPointerException();
524 boolean done =
false;
526 int tag = input.readTag();
532 coolingScheduleStrategy_ = input.readEnum();
533 bitField0_ |= 0x00000001;
537 initialTemperature_ = input.readDouble();
538 bitField0_ |= 0x00000002;
542 finalTemperature_ = input.readDouble();
543 bitField0_ |= 0x00000004;
547 automaticTemperatures_ = input.readBool();
548 bitField0_ |= 0x00000008;
552 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
559 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
560 throw e.unwrapIOException();
566 private int bitField0_;
568 private int coolingScheduleStrategy_ = 0;
579 return coolingScheduleStrategy_;
592 coolingScheduleStrategy_ = value;
593 bitField0_ |= 0x00000001;
623 throw new NullPointerException();
625 bitField0_ |= 0x00000001;
626 coolingScheduleStrategy_ = value.getNumber();
640 bitField0_ = (bitField0_ & ~0x00000001);
641 coolingScheduleStrategy_ = 0;
646 private double initialTemperature_ ;
657 return ((bitField0_ & 0x00000002) != 0);
669 return initialTemperature_;
682 initialTemperature_ = value;
683 bitField0_ |= 0x00000002;
696 bitField0_ = (bitField0_ & ~0x00000002);
697 initialTemperature_ = 0D;
702 private double finalTemperature_ ;
713 return ((bitField0_ & 0x00000004) != 0);
725 return finalTemperature_;
738 finalTemperature_ = value;
739 bitField0_ |= 0x00000004;
752 bitField0_ = (bitField0_ & ~0x00000004);
753 finalTemperature_ = 0D;
758 private boolean automaticTemperatures_ ;
778 return ((bitField0_ & 0x00000008) != 0);
799 return automaticTemperatures_;
821 automaticTemperatures_ = value;
822 bitField0_ |= 0x00000008;
844 bitField0_ = (bitField0_ & ~0x00000008);
845 automaticTemperatures_ =
false;
856 DEFAULT_INSTANCE =
new com.google.ortools.constraintsolver.SimulatedAnnealingParameters();
860 return DEFAULT_INSTANCE;
867 com.google.protobuf.CodedInputStream input,
868 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
869 throws com.google.protobuf.InvalidProtocolBufferException {
872 builder.mergeFrom(input, extensionRegistry);
873 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
874 throw e.setUnfinishedMessage(builder.buildPartial());
875 }
catch (com.google.protobuf.UninitializedMessageException e) {
876 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
877 }
catch (java.io.IOException e) {
878 throw new com.google.protobuf.InvalidProtocolBufferException(e)
879 .setUnfinishedMessage(builder.buildPartial());
881 return builder.buildPartial();
885 public static com.google.protobuf.Parser<SimulatedAnnealingParameters>
parser() {
896 return DEFAULT_INSTANCE;