Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
SavingsParameters.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// NO CHECKED-IN PROTOBUF GENCODE
3// source: ortools/constraint_solver/routing_heuristic_parameters.proto
4// Protobuf Java Version: 4.33.1
5
6package com.google.ortools.constraintsolver;
7
15@com.google.protobuf.Generated
16public final class SavingsParameters extends
17 com.google.protobuf.GeneratedMessage implements
18 // @@protoc_insertion_point(message_implements:operations_research.SavingsParameters)
20private static final long serialVersionUID = 0L;
21 static {
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
24 /* major= */ 4,
25 /* minor= */ 33,
26 /* patch= */ 1,
27 /* suffix= */ "",
28 "SavingsParameters");
29 }
30 // Use SavingsParameters.newBuilder() to construct.
31 private SavingsParameters(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
32 super(builder);
33 }
34 private SavingsParameters() {
35 }
36
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_SavingsParameters_descriptor;
40 }
41
42 @java.lang.Override
43 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
45 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_SavingsParameters_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.constraintsolver.SavingsParameters.class, com.google.ortools.constraintsolver.SavingsParameters.Builder.class);
48 }
49
50 public static final int NEIGHBORS_RATIO_FIELD_NUMBER = 1;
51 private double neighborsRatio_ = 0D;
61 @java.lang.Override
62 public double getNeighborsRatio() {
63 return neighborsRatio_;
64 }
65
66 public static final int MAX_MEMORY_USAGE_BYTES_FIELD_NUMBER = 2;
67 private double maxMemoryUsageBytes_ = 0D;
81 @java.lang.Override
82 public double getMaxMemoryUsageBytes() {
83 return maxMemoryUsageBytes_;
84 }
85
86 public static final int ADD_REVERSE_ARCS_FIELD_NUMBER = 3;
87 private boolean addReverseArcs_ = false;
97 @java.lang.Override
98 public boolean getAddReverseArcs() {
99 return addReverseArcs_;
100 }
101
102 public static final int ARC_COEFFICIENT_FIELD_NUMBER = 4;
103 private double arcCoefficient_ = 0D;
116 @java.lang.Override
117 public double getArcCoefficient() {
118 return arcCoefficient_;
119 }
120
121 private byte memoizedIsInitialized = -1;
122 @java.lang.Override
123 public final boolean isInitialized() {
124 byte isInitialized = memoizedIsInitialized;
125 if (isInitialized == 1) return true;
126 if (isInitialized == 0) return false;
127
128 memoizedIsInitialized = 1;
129 return true;
130 }
131
132 @java.lang.Override
133 public void writeTo(com.google.protobuf.CodedOutputStream output)
134 throws java.io.IOException {
135 if (java.lang.Double.doubleToRawLongBits(neighborsRatio_) != 0) {
136 output.writeDouble(1, neighborsRatio_);
137 }
138 if (java.lang.Double.doubleToRawLongBits(maxMemoryUsageBytes_) != 0) {
139 output.writeDouble(2, maxMemoryUsageBytes_);
140 }
141 if (addReverseArcs_ != false) {
142 output.writeBool(3, addReverseArcs_);
143 }
144 if (java.lang.Double.doubleToRawLongBits(arcCoefficient_) != 0) {
145 output.writeDouble(4, arcCoefficient_);
146 }
147 getUnknownFields().writeTo(output);
148 }
149
150 @java.lang.Override
151 public int getSerializedSize() {
152 int size = memoizedSize;
153 if (size != -1) return size;
154
155 size = 0;
156 if (java.lang.Double.doubleToRawLongBits(neighborsRatio_) != 0) {
157 size += com.google.protobuf.CodedOutputStream
158 .computeDoubleSize(1, neighborsRatio_);
159 }
160 if (java.lang.Double.doubleToRawLongBits(maxMemoryUsageBytes_) != 0) {
161 size += com.google.protobuf.CodedOutputStream
162 .computeDoubleSize(2, maxMemoryUsageBytes_);
163 }
164 if (addReverseArcs_ != false) {
165 size += com.google.protobuf.CodedOutputStream
166 .computeBoolSize(3, addReverseArcs_);
167 }
168 if (java.lang.Double.doubleToRawLongBits(arcCoefficient_) != 0) {
169 size += com.google.protobuf.CodedOutputStream
170 .computeDoubleSize(4, arcCoefficient_);
171 }
172 size += getUnknownFields().getSerializedSize();
173 memoizedSize = size;
174 return size;
175 }
176
177 @java.lang.Override
178 public boolean equals(final java.lang.Object obj) {
179 if (obj == this) {
180 return true;
181 }
182 if (!(obj instanceof com.google.ortools.constraintsolver.SavingsParameters)) {
183 return super.equals(obj);
184 }
185 com.google.ortools.constraintsolver.SavingsParameters other = (com.google.ortools.constraintsolver.SavingsParameters) obj;
186
187 if (java.lang.Double.doubleToLongBits(getNeighborsRatio())
188 != java.lang.Double.doubleToLongBits(
189 other.getNeighborsRatio())) return false;
190 if (java.lang.Double.doubleToLongBits(getMaxMemoryUsageBytes())
191 != java.lang.Double.doubleToLongBits(
192 other.getMaxMemoryUsageBytes())) return false;
194 != other.getAddReverseArcs()) return false;
195 if (java.lang.Double.doubleToLongBits(getArcCoefficient())
196 != java.lang.Double.doubleToLongBits(
197 other.getArcCoefficient())) return false;
198 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
199 return true;
200 }
201
202 @java.lang.Override
203 public int hashCode() {
204 if (memoizedHashCode != 0) {
205 return memoizedHashCode;
206 }
207 int hash = 41;
208 hash = (19 * hash) + getDescriptor().hashCode();
209 hash = (37 * hash) + NEIGHBORS_RATIO_FIELD_NUMBER;
210 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
211 java.lang.Double.doubleToLongBits(getNeighborsRatio()));
212 hash = (37 * hash) + MAX_MEMORY_USAGE_BYTES_FIELD_NUMBER;
213 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
214 java.lang.Double.doubleToLongBits(getMaxMemoryUsageBytes()));
215 hash = (37 * hash) + ADD_REVERSE_ARCS_FIELD_NUMBER;
216 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
218 hash = (37 * hash) + ARC_COEFFICIENT_FIELD_NUMBER;
219 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
220 java.lang.Double.doubleToLongBits(getArcCoefficient()));
221 hash = (29 * hash) + getUnknownFields().hashCode();
222 memoizedHashCode = hash;
223 return hash;
224 }
225
227 java.nio.ByteBuffer data)
228 throws com.google.protobuf.InvalidProtocolBufferException {
229 return PARSER.parseFrom(data);
230 }
232 java.nio.ByteBuffer data,
233 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
234 throws com.google.protobuf.InvalidProtocolBufferException {
235 return PARSER.parseFrom(data, extensionRegistry);
236 }
238 com.google.protobuf.ByteString data)
239 throws com.google.protobuf.InvalidProtocolBufferException {
240 return PARSER.parseFrom(data);
241 }
243 com.google.protobuf.ByteString data,
244 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
245 throws com.google.protobuf.InvalidProtocolBufferException {
246 return PARSER.parseFrom(data, extensionRegistry);
247 }
249 throws com.google.protobuf.InvalidProtocolBufferException {
250 return PARSER.parseFrom(data);
251 }
253 byte[] data,
254 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
255 throws com.google.protobuf.InvalidProtocolBufferException {
256 return PARSER.parseFrom(data, extensionRegistry);
257 }
259 throws java.io.IOException {
260 return com.google.protobuf.GeneratedMessage
261 .parseWithIOException(PARSER, input);
262 }
264 java.io.InputStream input,
265 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
266 throws java.io.IOException {
267 return com.google.protobuf.GeneratedMessage
268 .parseWithIOException(PARSER, input, extensionRegistry);
269 }
270
272 throws java.io.IOException {
273 return com.google.protobuf.GeneratedMessage
274 .parseDelimitedWithIOException(PARSER, input);
275 }
276
278 java.io.InputStream input,
279 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
280 throws java.io.IOException {
281 return com.google.protobuf.GeneratedMessage
282 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
283 }
285 com.google.protobuf.CodedInputStream input)
286 throws java.io.IOException {
287 return com.google.protobuf.GeneratedMessage
288 .parseWithIOException(PARSER, input);
289 }
291 com.google.protobuf.CodedInputStream input,
292 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
293 throws java.io.IOException {
294 return com.google.protobuf.GeneratedMessage
295 .parseWithIOException(PARSER, input, extensionRegistry);
296 }
297
298 @java.lang.Override
299 public Builder newBuilderForType() { return newBuilder(); }
300 public static Builder newBuilder() {
301 return DEFAULT_INSTANCE.toBuilder();
302 }
303 public static Builder newBuilder(com.google.ortools.constraintsolver.SavingsParameters prototype) {
304 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
305 }
306 @java.lang.Override
308 return this == DEFAULT_INSTANCE
309 ? new Builder() : new Builder().mergeFrom(this);
310 }
311
312 @java.lang.Override
314 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
315 Builder builder = new Builder(parent);
316 return builder;
317 }
318
325 public static final class Builder extends
326 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
327 // @@protoc_insertion_point(builder_implements:operations_research.SavingsParameters)
329 public static final com.google.protobuf.Descriptors.Descriptor
331 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_SavingsParameters_descriptor;
332 }
333
334 @java.lang.Override
335 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
337 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_SavingsParameters_fieldAccessorTable
338 .ensureFieldAccessorsInitialized(
339 com.google.ortools.constraintsolver.SavingsParameters.class, com.google.ortools.constraintsolver.SavingsParameters.Builder.class);
340 }
341
342 // Construct using com.google.ortools.constraintsolver.SavingsParameters.newBuilder()
343 private Builder() {
344
345 }
346
347 private Builder(
348 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
349 super(parent);
350
351 }
352 @java.lang.Override
353 public Builder clear() {
354 super.clear();
355 bitField0_ = 0;
356 neighborsRatio_ = 0D;
357 maxMemoryUsageBytes_ = 0D;
358 addReverseArcs_ = false;
359 arcCoefficient_ = 0D;
360 return this;
361 }
362
363 @java.lang.Override
364 public com.google.protobuf.Descriptors.Descriptor
366 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_SavingsParameters_descriptor;
367 }
368
369 @java.lang.Override
371 return com.google.ortools.constraintsolver.SavingsParameters.getDefaultInstance();
372 }
373
374 @java.lang.Override
377 if (!result.isInitialized()) {
378 throw newUninitializedMessageException(result);
379 }
380 return result;
381 }
382
383 @java.lang.Override
385 com.google.ortools.constraintsolver.SavingsParameters result = new com.google.ortools.constraintsolver.SavingsParameters(this);
386 if (bitField0_ != 0) { buildPartial0(result); }
387 onBuilt();
388 return result;
389 }
390
391 private void buildPartial0(com.google.ortools.constraintsolver.SavingsParameters result) {
392 int from_bitField0_ = bitField0_;
393 if (((from_bitField0_ & 0x00000001) != 0)) {
394 result.neighborsRatio_ = neighborsRatio_;
395 }
396 if (((from_bitField0_ & 0x00000002) != 0)) {
397 result.maxMemoryUsageBytes_ = maxMemoryUsageBytes_;
398 }
399 if (((from_bitField0_ & 0x00000004) != 0)) {
400 result.addReverseArcs_ = addReverseArcs_;
401 }
402 if (((from_bitField0_ & 0x00000008) != 0)) {
403 result.arcCoefficient_ = arcCoefficient_;
404 }
405 }
406
407 @java.lang.Override
408 public Builder mergeFrom(com.google.protobuf.Message other) {
409 if (other instanceof com.google.ortools.constraintsolver.SavingsParameters) {
410 return mergeFrom((com.google.ortools.constraintsolver.SavingsParameters)other);
411 } else {
412 super.mergeFrom(other);
413 return this;
414 }
415 }
416
417 public Builder mergeFrom(com.google.ortools.constraintsolver.SavingsParameters other) {
418 if (other == com.google.ortools.constraintsolver.SavingsParameters.getDefaultInstance()) return this;
419 if (java.lang.Double.doubleToRawLongBits(other.getNeighborsRatio()) != 0) {
420 setNeighborsRatio(other.getNeighborsRatio());
421 }
422 if (java.lang.Double.doubleToRawLongBits(other.getMaxMemoryUsageBytes()) != 0) {
423 setMaxMemoryUsageBytes(other.getMaxMemoryUsageBytes());
424 }
425 if (other.getAddReverseArcs() != false) {
426 setAddReverseArcs(other.getAddReverseArcs());
427 }
428 if (java.lang.Double.doubleToRawLongBits(other.getArcCoefficient()) != 0) {
429 setArcCoefficient(other.getArcCoefficient());
430 }
431 this.mergeUnknownFields(other.getUnknownFields());
432 onChanged();
433 return this;
434 }
435
436 @java.lang.Override
437 public final boolean isInitialized() {
438 return true;
439 }
440
441 @java.lang.Override
442 public Builder mergeFrom(
443 com.google.protobuf.CodedInputStream input,
444 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
445 throws java.io.IOException {
446 if (extensionRegistry == null) {
447 throw new java.lang.NullPointerException();
448 }
449 try {
450 boolean done = false;
451 while (!done) {
452 int tag = input.readTag();
453 switch (tag) {
454 case 0:
455 done = true;
456 break;
457 case 9: {
458 neighborsRatio_ = input.readDouble();
459 bitField0_ |= 0x00000001;
460 break;
461 } // case 9
462 case 17: {
463 maxMemoryUsageBytes_ = input.readDouble();
464 bitField0_ |= 0x00000002;
465 break;
466 } // case 17
467 case 24: {
468 addReverseArcs_ = input.readBool();
469 bitField0_ |= 0x00000004;
470 break;
471 } // case 24
472 case 33: {
473 arcCoefficient_ = input.readDouble();
474 bitField0_ |= 0x00000008;
475 break;
476 } // case 33
477 default: {
478 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
479 done = true; // was an endgroup tag
480 }
481 break;
482 } // default:
483 } // switch (tag)
484 } // while (!done)
485 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
486 throw e.unwrapIOException();
487 } finally {
488 onChanged();
489 } // finally
490 return this;
491 }
492 private int bitField0_;
493
494 private double neighborsRatio_ ;
504 @java.lang.Override
505 public double getNeighborsRatio() {
506 return neighborsRatio_;
507 }
508
518 public Builder setNeighborsRatio(double value) {
519
520 neighborsRatio_ = value;
521 bitField0_ |= 0x00000001;
522 onChanged();
523 return this;
524 }
525
534 public Builder clearNeighborsRatio() {
535 bitField0_ = (bitField0_ & ~0x00000001);
536 neighborsRatio_ = 0D;
537 onChanged();
538 return this;
539 }
540
541 private double maxMemoryUsageBytes_ ;
555 @java.lang.Override
556 public double getMaxMemoryUsageBytes() {
557 return maxMemoryUsageBytes_;
558 }
559
573 public Builder setMaxMemoryUsageBytes(double value) {
574
575 maxMemoryUsageBytes_ = value;
576 bitField0_ |= 0x00000002;
577 onChanged();
578 return this;
579 }
580
593 public Builder clearMaxMemoryUsageBytes() {
594 bitField0_ = (bitField0_ & ~0x00000002);
595 maxMemoryUsageBytes_ = 0D;
596 onChanged();
597 return this;
598 }
599
600 private boolean addReverseArcs_ ;
610 @java.lang.Override
611 public boolean getAddReverseArcs() {
612 return addReverseArcs_;
613 }
614
624 public Builder setAddReverseArcs(boolean value) {
625
626 addReverseArcs_ = value;
627 bitField0_ |= 0x00000004;
628 onChanged();
629 return this;
630 }
631
640 public Builder clearAddReverseArcs() {
641 bitField0_ = (bitField0_ & ~0x00000004);
642 addReverseArcs_ = false;
643 onChanged();
644 return this;
645 }
646
647 private double arcCoefficient_ ;
660 @java.lang.Override
661 public double getArcCoefficient() {
662 return arcCoefficient_;
663 }
664
677 public Builder setArcCoefficient(double value) {
678
679 arcCoefficient_ = value;
680 bitField0_ |= 0x00000008;
681 onChanged();
682 return this;
683 }
684
696 public Builder clearArcCoefficient() {
697 bitField0_ = (bitField0_ & ~0x00000008);
698 arcCoefficient_ = 0D;
699 onChanged();
700 return this;
701 }
702
703 // @@protoc_insertion_point(builder_scope:operations_research.SavingsParameters)
704 }
705
706 // @@protoc_insertion_point(class_scope:operations_research.SavingsParameters)
707 private static final com.google.ortools.constraintsolver.SavingsParameters DEFAULT_INSTANCE;
708 static {
709 DEFAULT_INSTANCE = new com.google.ortools.constraintsolver.SavingsParameters();
710 }
711
713 return DEFAULT_INSTANCE;
714 }
715
716 private static final com.google.protobuf.Parser<SavingsParameters>
717 PARSER = new com.google.protobuf.AbstractParser<SavingsParameters>() {
718 @java.lang.Override
719 public SavingsParameters parsePartialFrom(
720 com.google.protobuf.CodedInputStream input,
721 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
722 throws com.google.protobuf.InvalidProtocolBufferException {
723 Builder builder = newBuilder();
724 try {
725 builder.mergeFrom(input, extensionRegistry);
726 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
727 throw e.setUnfinishedMessage(builder.buildPartial());
728 } catch (com.google.protobuf.UninitializedMessageException e) {
729 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
730 } catch (java.io.IOException e) {
731 throw new com.google.protobuf.InvalidProtocolBufferException(e)
732 .setUnfinishedMessage(builder.buildPartial());
733 }
734 return builder.buildPartial();
735 }
736 };
737
738 public static com.google.protobuf.Parser<SavingsParameters> parser() {
739 return PARSER;
740 }
741
742 @java.lang.Override
743 public com.google.protobuf.Parser<SavingsParameters> getParserForType() {
744 return PARSER;
745 }
746
747 @java.lang.Override
751
752}
753
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.constraintsolver.SavingsParameters build()
Builder mergeFrom(com.google.ortools.constraintsolver.SavingsParameters other)
com.google.ortools.constraintsolver.SavingsParameters getDefaultInstanceForType()
com.google.ortools.constraintsolver.SavingsParameters buildPartial()
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.constraintsolver.SavingsParameters getDefaultInstanceForType()
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.protobuf.Parser< SavingsParameters > parser()
static com.google.ortools.constraintsolver.SavingsParameters parseFrom(byte[] data)
com.google.protobuf.Parser< SavingsParameters > getParserForType()
static com.google.ortools.constraintsolver.SavingsParameters parseFrom(java.io.InputStream input)
static com.google.ortools.constraintsolver.SavingsParameters parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Builder newBuilder(com.google.ortools.constraintsolver.SavingsParameters prototype)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.constraintsolver.SavingsParameters parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.SavingsParameters parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.constraintsolver.SavingsParameters parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.constraintsolver.SavingsParameters parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.constraintsolver.SavingsParameters parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.SavingsParameters parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.constraintsolver.SavingsParameters parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.SavingsParameters getDefaultInstance()
static com.google.ortools.constraintsolver.SavingsParameters parseFrom(java.nio.ByteBuffer data)
static com.google.ortools.constraintsolver.SavingsParameters parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)