Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
BopOptimizerMethod.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: ortools/bop/bop_parameters.proto
3
4// Protobuf Java Version: 4.26.1
5package com.google.ortools.bop;
6
16public final class BopOptimizerMethod extends
17 com.google.protobuf.GeneratedMessage implements
18 // @@protoc_insertion_point(message_implements:operations_research.bop.BopOptimizerMethod)
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= */ 26,
26 /* patch= */ 1,
27 /* suffix= */ "",
28 BopOptimizerMethod.class.getName());
29 }
30 // Use BopOptimizerMethod.newBuilder() to construct.
31 private BopOptimizerMethod(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
32 super(builder);
33 }
34 private BopOptimizerMethod() {
35 type_ = 0;
36 }
37
38 public static final com.google.protobuf.Descriptors.Descriptor
40 return com.google.ortools.bop.BopParametersOuterClass.internal_static_operations_research_bop_BopOptimizerMethod_descriptor;
41 }
42
43 @java.lang.Override
44 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
46 return com.google.ortools.bop.BopParametersOuterClass.internal_static_operations_research_bop_BopOptimizerMethod_fieldAccessorTable
47 .ensureFieldAccessorsInitialized(
48 com.google.ortools.bop.BopOptimizerMethod.class, com.google.ortools.bop.BopOptimizerMethod.Builder.class);
49 }
50
54 public enum OptimizerType
55 implements com.google.protobuf.ProtocolMessageEnum {
116 ;
117
118 static {
119 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
120 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
121 /* major= */ 4,
122 /* minor= */ 26,
123 /* patch= */ 1,
124 /* suffix= */ "",
125 OptimizerType.class.getName());
126 }
130 public static final int SAT_CORE_BASED_VALUE = 0;
134 public static final int SAT_LINEAR_SEARCH_VALUE = 15;
138 public static final int LINEAR_RELAXATION_VALUE = 1;
142 public static final int LOCAL_SEARCH_VALUE = 2;
146 public static final int RANDOM_FIRST_SOLUTION_VALUE = 3;
150 public static final int RANDOM_CONSTRAINT_LNS_VALUE = 4;
154 public static final int RANDOM_VARIABLE_LNS_VALUE = 5;
158 public static final int COMPLETE_LNS_VALUE = 7;
162 public static final int LP_FIRST_SOLUTION_VALUE = 8;
166 public static final int OBJECTIVE_FIRST_SOLUTION_VALUE = 9;
170 public static final int USER_GUIDED_FIRST_SOLUTION_VALUE = 14;
174 public static final int RANDOM_CONSTRAINT_LNS_GUIDED_BY_LP_VALUE = 11;
178 public static final int RANDOM_VARIABLE_LNS_GUIDED_BY_LP_VALUE = 12;
182 public static final int RELATION_GRAPH_LNS_VALUE = 16;
186 public static final int RELATION_GRAPH_LNS_GUIDED_BY_LP_VALUE = 17;
187
188
189 public final int getNumber() {
190 return value;
191 }
192
198 @java.lang.Deprecated
199 public static OptimizerType valueOf(int value) {
200 return forNumber(value);
201 }
202
207 public static OptimizerType forNumber(int value) {
208 switch (value) {
209 case 0: return SAT_CORE_BASED;
210 case 15: return SAT_LINEAR_SEARCH;
211 case 1: return LINEAR_RELAXATION;
212 case 2: return LOCAL_SEARCH;
213 case 3: return RANDOM_FIRST_SOLUTION;
214 case 4: return RANDOM_CONSTRAINT_LNS;
215 case 5: return RANDOM_VARIABLE_LNS;
216 case 7: return COMPLETE_LNS;
217 case 8: return LP_FIRST_SOLUTION;
218 case 9: return OBJECTIVE_FIRST_SOLUTION;
219 case 14: return USER_GUIDED_FIRST_SOLUTION;
220 case 11: return RANDOM_CONSTRAINT_LNS_GUIDED_BY_LP;
221 case 12: return RANDOM_VARIABLE_LNS_GUIDED_BY_LP;
222 case 16: return RELATION_GRAPH_LNS;
223 case 17: return RELATION_GRAPH_LNS_GUIDED_BY_LP;
224 default: return null;
225 }
226 }
227
228 public static com.google.protobuf.Internal.EnumLiteMap<OptimizerType>
230 return internalValueMap;
231 }
232 private static final com.google.protobuf.Internal.EnumLiteMap<
233 OptimizerType> internalValueMap =
234 new com.google.protobuf.Internal.EnumLiteMap<OptimizerType>() {
235 public OptimizerType findValueByNumber(int number) {
236 return OptimizerType.forNumber(number);
237 }
238 };
239
240 public final com.google.protobuf.Descriptors.EnumValueDescriptor
242 return getDescriptor().getValues().get(ordinal());
243 }
244 public final com.google.protobuf.Descriptors.EnumDescriptor
246 return getDescriptor();
247 }
248 public static final com.google.protobuf.Descriptors.EnumDescriptor
250 return com.google.ortools.bop.BopOptimizerMethod.getDescriptor().getEnumTypes().get(0);
251 }
252
253 private static final OptimizerType[] VALUES = values();
254
255 public static OptimizerType valueOf(
256 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
257 if (desc.getType() != getDescriptor()) {
258 throw new java.lang.IllegalArgumentException(
259 "EnumValueDescriptor is not for this type.");
260 }
261 return VALUES[desc.getIndex()];
262 }
263
264 private final int value;
265
266 private OptimizerType(int value) {
267 this.value = value;
268 }
269
270 // @@protoc_insertion_point(enum_scope:operations_research.bop.BopOptimizerMethod.OptimizerType)
271 }
272
273 private int bitField0_;
274 public static final int TYPE_FIELD_NUMBER = 1;
275 private int type_ = 0;
280 @java.lang.Override public boolean hasType() {
281 return ((bitField0_ & 0x00000001) != 0);
282 }
288 com.google.ortools.bop.BopOptimizerMethod.OptimizerType result = com.google.ortools.bop.BopOptimizerMethod.OptimizerType.forNumber(type_);
289 return result == null ? com.google.ortools.bop.BopOptimizerMethod.OptimizerType.SAT_CORE_BASED : result;
290 }
291
292 private byte memoizedIsInitialized = -1;
293 @java.lang.Override
294 public final boolean isInitialized() {
295 byte isInitialized = memoizedIsInitialized;
296 if (isInitialized == 1) return true;
297 if (isInitialized == 0) return false;
298
299 memoizedIsInitialized = 1;
300 return true;
301 }
302
303 @java.lang.Override
304 public void writeTo(com.google.protobuf.CodedOutputStream output)
305 throws java.io.IOException {
306 if (((bitField0_ & 0x00000001) != 0)) {
307 output.writeEnum(1, type_);
308 }
309 getUnknownFields().writeTo(output);
310 }
311
312 @java.lang.Override
313 public int getSerializedSize() {
314 int size = memoizedSize;
315 if (size != -1) return size;
316
317 size = 0;
318 if (((bitField0_ & 0x00000001) != 0)) {
319 size += com.google.protobuf.CodedOutputStream
320 .computeEnumSize(1, type_);
321 }
322 size += getUnknownFields().getSerializedSize();
323 memoizedSize = size;
324 return size;
325 }
326
327 @java.lang.Override
328 public boolean equals(final java.lang.Object obj) {
329 if (obj == this) {
330 return true;
331 }
332 if (!(obj instanceof com.google.ortools.bop.BopOptimizerMethod)) {
333 return super.equals(obj);
334 }
335 com.google.ortools.bop.BopOptimizerMethod other = (com.google.ortools.bop.BopOptimizerMethod) obj;
336
337 if (hasType() != other.hasType()) return false;
338 if (hasType()) {
339 if (type_ != other.type_) return false;
340 }
341 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
342 return true;
343 }
344
345 @java.lang.Override
346 public int hashCode() {
347 if (memoizedHashCode != 0) {
348 return memoizedHashCode;
349 }
350 int hash = 41;
351 hash = (19 * hash) + getDescriptor().hashCode();
352 if (hasType()) {
353 hash = (37 * hash) + TYPE_FIELD_NUMBER;
354 hash = (53 * hash) + type_;
355 }
356 hash = (29 * hash) + getUnknownFields().hashCode();
357 memoizedHashCode = hash;
358 return hash;
359 }
360
362 java.nio.ByteBuffer data)
363 throws com.google.protobuf.InvalidProtocolBufferException {
364 return PARSER.parseFrom(data);
365 }
367 java.nio.ByteBuffer data,
368 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
369 throws com.google.protobuf.InvalidProtocolBufferException {
370 return PARSER.parseFrom(data, extensionRegistry);
371 }
373 com.google.protobuf.ByteString data)
374 throws com.google.protobuf.InvalidProtocolBufferException {
375 return PARSER.parseFrom(data);
376 }
378 com.google.protobuf.ByteString data,
379 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
380 throws com.google.protobuf.InvalidProtocolBufferException {
381 return PARSER.parseFrom(data, extensionRegistry);
382 }
384 throws com.google.protobuf.InvalidProtocolBufferException {
385 return PARSER.parseFrom(data);
386 }
388 byte[] data,
389 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
390 throws com.google.protobuf.InvalidProtocolBufferException {
391 return PARSER.parseFrom(data, extensionRegistry);
392 }
393 public static com.google.ortools.bop.BopOptimizerMethod parseFrom(java.io.InputStream input)
394 throws java.io.IOException {
395 return com.google.protobuf.GeneratedMessage
396 .parseWithIOException(PARSER, input);
397 }
399 java.io.InputStream input,
400 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
401 throws java.io.IOException {
402 return com.google.protobuf.GeneratedMessage
403 .parseWithIOException(PARSER, input, extensionRegistry);
404 }
405
406 public static com.google.ortools.bop.BopOptimizerMethod parseDelimitedFrom(java.io.InputStream input)
407 throws java.io.IOException {
408 return com.google.protobuf.GeneratedMessage
409 .parseDelimitedWithIOException(PARSER, input);
410 }
411
413 java.io.InputStream input,
414 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
415 throws java.io.IOException {
416 return com.google.protobuf.GeneratedMessage
417 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
418 }
420 com.google.protobuf.CodedInputStream input)
421 throws java.io.IOException {
422 return com.google.protobuf.GeneratedMessage
423 .parseWithIOException(PARSER, input);
424 }
426 com.google.protobuf.CodedInputStream input,
427 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
428 throws java.io.IOException {
429 return com.google.protobuf.GeneratedMessage
430 .parseWithIOException(PARSER, input, extensionRegistry);
431 }
432
433 @java.lang.Override
434 public Builder newBuilderForType() { return newBuilder(); }
435 public static Builder newBuilder() {
436 return DEFAULT_INSTANCE.toBuilder();
437 }
438 public static Builder newBuilder(com.google.ortools.bop.BopOptimizerMethod prototype) {
439 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
440 }
441 @java.lang.Override
443 return this == DEFAULT_INSTANCE
444 ? new Builder() : new Builder().mergeFrom(this);
445 }
446
447 @java.lang.Override
449 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
450 Builder builder = new Builder(parent);
451 return builder;
452 }
462 public static final class Builder extends
463 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
464 // @@protoc_insertion_point(builder_implements:operations_research.bop.BopOptimizerMethod)
465 com.google.ortools.bop.BopOptimizerMethodOrBuilder {
466 public static final com.google.protobuf.Descriptors.Descriptor
468 return com.google.ortools.bop.BopParametersOuterClass.internal_static_operations_research_bop_BopOptimizerMethod_descriptor;
469 }
470
471 @java.lang.Override
472 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
474 return com.google.ortools.bop.BopParametersOuterClass.internal_static_operations_research_bop_BopOptimizerMethod_fieldAccessorTable
475 .ensureFieldAccessorsInitialized(
476 com.google.ortools.bop.BopOptimizerMethod.class, com.google.ortools.bop.BopOptimizerMethod.Builder.class);
477 }
478
479 // Construct using com.google.ortools.bop.BopOptimizerMethod.newBuilder()
480 private Builder() {
481
482 }
483
484 private Builder(
485 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
486 super(parent);
487
488 }
489 @java.lang.Override
490 public Builder clear() {
491 super.clear();
492 bitField0_ = 0;
493 type_ = 0;
494 return this;
495 }
496
497 @java.lang.Override
498 public com.google.protobuf.Descriptors.Descriptor
500 return com.google.ortools.bop.BopParametersOuterClass.internal_static_operations_research_bop_BopOptimizerMethod_descriptor;
501 }
502
503 @java.lang.Override
505 return com.google.ortools.bop.BopOptimizerMethod.getDefaultInstance();
506 }
507
508 @java.lang.Override
511 if (!result.isInitialized()) {
512 throw newUninitializedMessageException(result);
513 }
514 return result;
515 }
516
517 @java.lang.Override
519 com.google.ortools.bop.BopOptimizerMethod result = new com.google.ortools.bop.BopOptimizerMethod(this);
520 if (bitField0_ != 0) { buildPartial0(result); }
521 onBuilt();
522 return result;
523 }
524
525 private void buildPartial0(com.google.ortools.bop.BopOptimizerMethod result) {
526 int from_bitField0_ = bitField0_;
527 int to_bitField0_ = 0;
528 if (((from_bitField0_ & 0x00000001) != 0)) {
529 result.type_ = type_;
530 to_bitField0_ |= 0x00000001;
531 }
532 result.bitField0_ |= to_bitField0_;
533 }
534
535 @java.lang.Override
536 public Builder mergeFrom(com.google.protobuf.Message other) {
537 if (other instanceof com.google.ortools.bop.BopOptimizerMethod) {
538 return mergeFrom((com.google.ortools.bop.BopOptimizerMethod)other);
539 } else {
540 super.mergeFrom(other);
541 return this;
542 }
543 }
544
545 public Builder mergeFrom(com.google.ortools.bop.BopOptimizerMethod other) {
546 if (other == com.google.ortools.bop.BopOptimizerMethod.getDefaultInstance()) return this;
547 if (other.hasType()) {
548 setType(other.getType());
549 }
550 this.mergeUnknownFields(other.getUnknownFields());
551 onChanged();
552 return this;
553 }
554
555 @java.lang.Override
556 public final boolean isInitialized() {
557 return true;
558 }
559
560 @java.lang.Override
562 com.google.protobuf.CodedInputStream input,
563 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
564 throws java.io.IOException {
565 if (extensionRegistry == null) {
566 throw new java.lang.NullPointerException();
567 }
568 try {
569 boolean done = false;
570 while (!done) {
571 int tag = input.readTag();
572 switch (tag) {
573 case 0:
574 done = true;
575 break;
576 case 8: {
577 int tmpRaw = input.readEnum();
579 com.google.ortools.bop.BopOptimizerMethod.OptimizerType.forNumber(tmpRaw);
580 if (tmpValue == null) {
581 mergeUnknownVarintField(1, tmpRaw);
582 } else {
583 type_ = tmpRaw;
584 bitField0_ |= 0x00000001;
585 }
586 break;
587 } // case 8
588 default: {
589 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
590 done = true; // was an endgroup tag
591 }
592 break;
593 } // default:
594 } // switch (tag)
595 } // while (!done)
596 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
597 throw e.unwrapIOException();
598 } finally {
599 onChanged();
600 } // finally
601 return this;
602 }
603 private int bitField0_;
604
605 private int type_ = 0;
610 @java.lang.Override public boolean hasType() {
611 return ((bitField0_ & 0x00000001) != 0);
612 }
617 @java.lang.Override
619 com.google.ortools.bop.BopOptimizerMethod.OptimizerType result = com.google.ortools.bop.BopOptimizerMethod.OptimizerType.forNumber(type_);
620 return result == null ? com.google.ortools.bop.BopOptimizerMethod.OptimizerType.SAT_CORE_BASED : result;
621 }
627 public Builder setType(com.google.ortools.bop.BopOptimizerMethod.OptimizerType value) {
628 if (value == null) {
629 throw new NullPointerException();
630 }
631 bitField0_ |= 0x00000001;
632 type_ = value.getNumber();
633 onChanged();
634 return this;
635 }
641 bitField0_ = (bitField0_ & ~0x00000001);
642 type_ = 0;
643 onChanged();
644 return this;
645 }
646
647 // @@protoc_insertion_point(builder_scope:operations_research.bop.BopOptimizerMethod)
648 }
649
650 // @@protoc_insertion_point(class_scope:operations_research.bop.BopOptimizerMethod)
651 private static final com.google.ortools.bop.BopOptimizerMethod DEFAULT_INSTANCE;
652 static {
653 DEFAULT_INSTANCE = new com.google.ortools.bop.BopOptimizerMethod();
654 }
655
657 return DEFAULT_INSTANCE;
658 }
659
660 private static final com.google.protobuf.Parser<BopOptimizerMethod>
661 PARSER = new com.google.protobuf.AbstractParser<BopOptimizerMethod>() {
662 @java.lang.Override
663 public BopOptimizerMethod parsePartialFrom(
664 com.google.protobuf.CodedInputStream input,
665 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
666 throws com.google.protobuf.InvalidProtocolBufferException {
667 Builder builder = newBuilder();
668 try {
669 builder.mergeFrom(input, extensionRegistry);
670 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
671 throw e.setUnfinishedMessage(builder.buildPartial());
672 } catch (com.google.protobuf.UninitializedMessageException e) {
673 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
674 } catch (java.io.IOException e) {
675 throw new com.google.protobuf.InvalidProtocolBufferException(e)
676 .setUnfinishedMessage(builder.buildPartial());
677 }
678 return builder.buildPartial();
679 }
680 };
681
682 public static com.google.protobuf.Parser<BopOptimizerMethod> parser() {
683 return PARSER;
684 }
685
686 @java.lang.Override
687 public com.google.protobuf.Parser<BopOptimizerMethod> getParserForType() {
688 return PARSER;
689 }
690
691 @java.lang.Override
693 return DEFAULT_INSTANCE;
694 }
695
696}
697
com.google.ortools.bop.BopOptimizerMethod build()
com.google.ortools.bop.BopOptimizerMethod getDefaultInstanceForType()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder mergeFrom(com.google.ortools.bop.BopOptimizerMethod other)
Builder setType(com.google.ortools.bop.BopOptimizerMethod.OptimizerType value)
com.google.ortools.bop.BopOptimizerMethod buildPartial()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
com.google.ortools.bop.BopOptimizerMethod.OptimizerType getType()
Builder mergeFrom(com.google.protobuf.Message other)
static com.google.ortools.bop.BopOptimizerMethod parseFrom(byte[] data)
static com.google.ortools.bop.BopOptimizerMethod parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.Parser< BopOptimizerMethod > getParserForType()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.bop.BopOptimizerMethod parseFrom(com.google.protobuf.ByteString data)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.bop.BopOptimizerMethod parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.bop.BopOptimizerMethod getDefaultInstance()
static com.google.ortools.bop.BopOptimizerMethod parseFrom(java.io.InputStream input)
static com.google.ortools.bop.BopOptimizerMethod parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.bop.BopOptimizerMethod parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
void writeTo(com.google.protobuf.CodedOutputStream output)
com.google.ortools.bop.BopOptimizerMethod getDefaultInstanceForType()
static com.google.ortools.bop.BopOptimizerMethod parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.bop.BopOptimizerMethod parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.bop.BopOptimizerMethod parseDelimitedFrom(java.io.InputStream input)
com.google.ortools.bop.BopOptimizerMethod.OptimizerType getType()
static com.google.ortools.bop.BopOptimizerMethod parseFrom(java.nio.ByteBuffer data)
static com.google.protobuf.Parser< BopOptimizerMethod > parser()
static Builder newBuilder(com.google.ortools.bop.BopOptimizerMethod prototype)
boolean equals(final java.lang.Object obj)
static com.google.ortools.bop.BopOptimizerMethod parseFrom(com.google.protobuf.CodedInputStream input)
static OptimizerType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
static com.google.protobuf.Internal.EnumLiteMap< OptimizerType > internalGetValueMap()
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()