Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
FirstSolutionStrategy.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: ortools/constraint_solver/routing_enums.proto
3
4// Protobuf Java Version: 4.26.1
5package com.google.ortools.constraintsolver;
6
14public final class FirstSolutionStrategy extends
15 com.google.protobuf.GeneratedMessage implements
16 // @@protoc_insertion_point(message_implements:operations_research.FirstSolutionStrategy)
18private static final long serialVersionUID = 0L;
19 static {
20 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
21 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
22 /* major= */ 4,
23 /* minor= */ 26,
24 /* patch= */ 1,
25 /* suffix= */ "",
26 FirstSolutionStrategy.class.getName());
27 }
28 // Use FirstSolutionStrategy.newBuilder() to construct.
29 private FirstSolutionStrategy(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
30 super(builder);
31 }
32 private FirstSolutionStrategy() {
33 }
34
35 public static final com.google.protobuf.Descriptors.Descriptor
37 return com.google.ortools.constraintsolver.RoutingEnums.internal_static_operations_research_FirstSolutionStrategy_descriptor;
38 }
39
40 @java.lang.Override
41 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
43 return com.google.ortools.constraintsolver.RoutingEnums.internal_static_operations_research_FirstSolutionStrategy_fieldAccessorTable
44 .ensureFieldAccessorsInitialized(
45 com.google.ortools.constraintsolver.FirstSolutionStrategy.class, com.google.ortools.constraintsolver.FirstSolutionStrategy.Builder.class);
46 }
47
51 public enum Value
52 implements com.google.protobuf.ProtocolMessageEnum {
124 SWEEP(11),
234 ;
235
236 static {
237 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
238 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
239 /* major= */ 4,
240 /* minor= */ 26,
241 /* patch= */ 1,
242 /* suffix= */ "",
243 Value.class.getName());
244 }
252 public static final int UNSET_VALUE = 0;
261 public static final int AUTOMATIC_VALUE = 15;
272 public static final int PATH_CHEAPEST_ARC_VALUE = 3;
283 public static final int PATH_MOST_CONSTRAINED_ARC_VALUE = 4;
293 public static final int EVALUATOR_STRATEGY_VALUE = 5;
304 public static final int SAVINGS_VALUE = 10;
316 public static final int SWEEP_VALUE = 11;
331 public static final int CHRISTOFIDES_VALUE = 13;
341 public static final int ALL_UNPERFORMED_VALUE = 6;
352 public static final int BEST_INSERTION_VALUE = 7;
362 public static final int PARALLEL_CHEAPEST_INSERTION_VALUE = 8;
373 public static final int SEQUENTIAL_CHEAPEST_INSERTION_VALUE = 14;
386 public static final int LOCAL_CHEAPEST_INSERTION_VALUE = 9;
395 public static final int LOCAL_CHEAPEST_COST_INSERTION_VALUE = 16;
404 public static final int GLOBAL_CHEAPEST_ARC_VALUE = 1;
413 public static final int LOCAL_CHEAPEST_ARC_VALUE = 2;
424 public static final int FIRST_UNBOUND_MIN_VALUE_VALUE = 12;
425
426
427 public final int getNumber() {
428 if (this == UNRECOGNIZED) {
429 throw new java.lang.IllegalArgumentException(
430 "Can't get the number of an unknown enum value.");
431 }
432 return value;
433 }
434
440 @java.lang.Deprecated
441 public static Value valueOf(int value) {
442 return forNumber(value);
443 }
444
449 public static Value forNumber(int value) {
450 switch (value) {
451 case 0: return UNSET;
452 case 15: return AUTOMATIC;
453 case 3: return PATH_CHEAPEST_ARC;
454 case 4: return PATH_MOST_CONSTRAINED_ARC;
455 case 5: return EVALUATOR_STRATEGY;
456 case 10: return SAVINGS;
457 case 11: return SWEEP;
458 case 13: return CHRISTOFIDES;
459 case 6: return ALL_UNPERFORMED;
460 case 7: return BEST_INSERTION;
461 case 8: return PARALLEL_CHEAPEST_INSERTION;
462 case 14: return SEQUENTIAL_CHEAPEST_INSERTION;
463 case 9: return LOCAL_CHEAPEST_INSERTION;
464 case 16: return LOCAL_CHEAPEST_COST_INSERTION;
465 case 1: return GLOBAL_CHEAPEST_ARC;
466 case 2: return LOCAL_CHEAPEST_ARC;
467 case 12: return FIRST_UNBOUND_MIN_VALUE;
468 default: return null;
469 }
470 }
471
472 public static com.google.protobuf.Internal.EnumLiteMap<Value>
474 return internalValueMap;
475 }
476 private static final com.google.protobuf.Internal.EnumLiteMap<
477 Value> internalValueMap =
478 new com.google.protobuf.Internal.EnumLiteMap<Value>() {
479 public Value findValueByNumber(int number) {
480 return Value.forNumber(number);
481 }
482 };
483
484 public final com.google.protobuf.Descriptors.EnumValueDescriptor
486 if (this == UNRECOGNIZED) {
487 throw new java.lang.IllegalStateException(
488 "Can't get the descriptor of an unrecognized enum value.");
489 }
490 return getDescriptor().getValues().get(ordinal());
491 }
492 public final com.google.protobuf.Descriptors.EnumDescriptor
494 return getDescriptor();
495 }
496 public static final com.google.protobuf.Descriptors.EnumDescriptor
498 return com.google.ortools.constraintsolver.FirstSolutionStrategy.getDescriptor().getEnumTypes().get(0);
499 }
500
501 private static final Value[] VALUES = values();
502
503 public static Value valueOf(
504 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
505 if (desc.getType() != getDescriptor()) {
506 throw new java.lang.IllegalArgumentException(
507 "EnumValueDescriptor is not for this type.");
508 }
509 if (desc.getIndex() == -1) {
510 return UNRECOGNIZED;
511 }
512 return VALUES[desc.getIndex()];
513 }
514
515 private final int value;
516
517 private Value(int value) {
518 this.value = value;
519 }
520
521 // @@protoc_insertion_point(enum_scope:operations_research.FirstSolutionStrategy.Value)
522 }
523
524 private byte memoizedIsInitialized = -1;
525 @java.lang.Override
526 public final boolean isInitialized() {
527 byte isInitialized = memoizedIsInitialized;
528 if (isInitialized == 1) return true;
529 if (isInitialized == 0) return false;
530
531 memoizedIsInitialized = 1;
532 return true;
533 }
534
535 @java.lang.Override
536 public void writeTo(com.google.protobuf.CodedOutputStream output)
537 throws java.io.IOException {
538 getUnknownFields().writeTo(output);
539 }
540
541 @java.lang.Override
542 public int getSerializedSize() {
543 int size = memoizedSize;
544 if (size != -1) return size;
545
546 size = 0;
547 size += getUnknownFields().getSerializedSize();
548 memoizedSize = size;
549 return size;
550 }
551
552 @java.lang.Override
553 public boolean equals(final java.lang.Object obj) {
554 if (obj == this) {
555 return true;
556 }
557 if (!(obj instanceof com.google.ortools.constraintsolver.FirstSolutionStrategy)) {
558 return super.equals(obj);
559 }
560 com.google.ortools.constraintsolver.FirstSolutionStrategy other = (com.google.ortools.constraintsolver.FirstSolutionStrategy) obj;
561
562 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
563 return true;
564 }
565
566 @java.lang.Override
567 public int hashCode() {
568 if (memoizedHashCode != 0) {
569 return memoizedHashCode;
570 }
571 int hash = 41;
572 hash = (19 * hash) + getDescriptor().hashCode();
573 hash = (29 * hash) + getUnknownFields().hashCode();
574 memoizedHashCode = hash;
575 return hash;
576 }
577
579 java.nio.ByteBuffer data)
580 throws com.google.protobuf.InvalidProtocolBufferException {
581 return PARSER.parseFrom(data);
582 }
584 java.nio.ByteBuffer data,
585 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
586 throws com.google.protobuf.InvalidProtocolBufferException {
587 return PARSER.parseFrom(data, extensionRegistry);
588 }
590 com.google.protobuf.ByteString data)
591 throws com.google.protobuf.InvalidProtocolBufferException {
592 return PARSER.parseFrom(data);
593 }
595 com.google.protobuf.ByteString data,
596 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
597 throws com.google.protobuf.InvalidProtocolBufferException {
598 return PARSER.parseFrom(data, extensionRegistry);
599 }
601 throws com.google.protobuf.InvalidProtocolBufferException {
602 return PARSER.parseFrom(data);
603 }
605 byte[] data,
606 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
607 throws com.google.protobuf.InvalidProtocolBufferException {
608 return PARSER.parseFrom(data, extensionRegistry);
609 }
611 throws java.io.IOException {
612 return com.google.protobuf.GeneratedMessage
613 .parseWithIOException(PARSER, input);
614 }
616 java.io.InputStream input,
617 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
618 throws java.io.IOException {
619 return com.google.protobuf.GeneratedMessage
620 .parseWithIOException(PARSER, input, extensionRegistry);
621 }
622
624 throws java.io.IOException {
625 return com.google.protobuf.GeneratedMessage
626 .parseDelimitedWithIOException(PARSER, input);
627 }
628
630 java.io.InputStream input,
631 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
632 throws java.io.IOException {
633 return com.google.protobuf.GeneratedMessage
634 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
635 }
637 com.google.protobuf.CodedInputStream input)
638 throws java.io.IOException {
639 return com.google.protobuf.GeneratedMessage
640 .parseWithIOException(PARSER, input);
641 }
643 com.google.protobuf.CodedInputStream input,
644 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
645 throws java.io.IOException {
646 return com.google.protobuf.GeneratedMessage
647 .parseWithIOException(PARSER, input, extensionRegistry);
648 }
649
650 @java.lang.Override
651 public Builder newBuilderForType() { return newBuilder(); }
652 public static Builder newBuilder() {
653 return DEFAULT_INSTANCE.toBuilder();
654 }
655 public static Builder newBuilder(com.google.ortools.constraintsolver.FirstSolutionStrategy prototype) {
656 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
657 }
658 @java.lang.Override
660 return this == DEFAULT_INSTANCE
661 ? new Builder() : new Builder().mergeFrom(this);
662 }
663
664 @java.lang.Override
666 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
667 Builder builder = new Builder(parent);
668 return builder;
669 }
677 public static final class Builder extends
678 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
679 // @@protoc_insertion_point(builder_implements:operations_research.FirstSolutionStrategy)
680 com.google.ortools.constraintsolver.FirstSolutionStrategyOrBuilder {
681 public static final com.google.protobuf.Descriptors.Descriptor
683 return com.google.ortools.constraintsolver.RoutingEnums.internal_static_operations_research_FirstSolutionStrategy_descriptor;
684 }
685
686 @java.lang.Override
687 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
689 return com.google.ortools.constraintsolver.RoutingEnums.internal_static_operations_research_FirstSolutionStrategy_fieldAccessorTable
690 .ensureFieldAccessorsInitialized(
691 com.google.ortools.constraintsolver.FirstSolutionStrategy.class, com.google.ortools.constraintsolver.FirstSolutionStrategy.Builder.class);
692 }
693
694 // Construct using com.google.ortools.constraintsolver.FirstSolutionStrategy.newBuilder()
695 private Builder() {
696
697 }
698
699 private Builder(
700 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
701 super(parent);
702
703 }
704 @java.lang.Override
705 public Builder clear() {
706 super.clear();
707 return this;
708 }
709
710 @java.lang.Override
711 public com.google.protobuf.Descriptors.Descriptor
713 return com.google.ortools.constraintsolver.RoutingEnums.internal_static_operations_research_FirstSolutionStrategy_descriptor;
714 }
715
716 @java.lang.Override
718 return com.google.ortools.constraintsolver.FirstSolutionStrategy.getDefaultInstance();
719 }
720
721 @java.lang.Override
724 if (!result.isInitialized()) {
725 throw newUninitializedMessageException(result);
726 }
727 return result;
728 }
729
730 @java.lang.Override
732 com.google.ortools.constraintsolver.FirstSolutionStrategy result = new com.google.ortools.constraintsolver.FirstSolutionStrategy(this);
733 onBuilt();
734 return result;
735 }
736
737 @java.lang.Override
738 public Builder mergeFrom(com.google.protobuf.Message other) {
739 if (other instanceof com.google.ortools.constraintsolver.FirstSolutionStrategy) {
740 return mergeFrom((com.google.ortools.constraintsolver.FirstSolutionStrategy)other);
741 } else {
742 super.mergeFrom(other);
743 return this;
744 }
745 }
746
747 public Builder mergeFrom(com.google.ortools.constraintsolver.FirstSolutionStrategy other) {
748 if (other == com.google.ortools.constraintsolver.FirstSolutionStrategy.getDefaultInstance()) return this;
749 this.mergeUnknownFields(other.getUnknownFields());
750 onChanged();
751 return this;
752 }
753
754 @java.lang.Override
755 public final boolean isInitialized() {
756 return true;
757 }
758
759 @java.lang.Override
761 com.google.protobuf.CodedInputStream input,
762 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
763 throws java.io.IOException {
764 if (extensionRegistry == null) {
765 throw new java.lang.NullPointerException();
766 }
767 try {
768 boolean done = false;
769 while (!done) {
770 int tag = input.readTag();
771 switch (tag) {
772 case 0:
773 done = true;
774 break;
775 default: {
776 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
777 done = true; // was an endgroup tag
778 }
779 break;
780 } // default:
781 } // switch (tag)
782 } // while (!done)
783 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
784 throw e.unwrapIOException();
785 } finally {
786 onChanged();
787 } // finally
788 return this;
789 }
790
791 // @@protoc_insertion_point(builder_scope:operations_research.FirstSolutionStrategy)
792 }
793
794 // @@protoc_insertion_point(class_scope:operations_research.FirstSolutionStrategy)
795 private static final com.google.ortools.constraintsolver.FirstSolutionStrategy DEFAULT_INSTANCE;
796 static {
797 DEFAULT_INSTANCE = new com.google.ortools.constraintsolver.FirstSolutionStrategy();
798 }
799
801 return DEFAULT_INSTANCE;
802 }
803
804 private static final com.google.protobuf.Parser<FirstSolutionStrategy>
805 PARSER = new com.google.protobuf.AbstractParser<FirstSolutionStrategy>() {
806 @java.lang.Override
807 public FirstSolutionStrategy parsePartialFrom(
808 com.google.protobuf.CodedInputStream input,
809 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
810 throws com.google.protobuf.InvalidProtocolBufferException {
811 Builder builder = newBuilder();
812 try {
813 builder.mergeFrom(input, extensionRegistry);
814 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
815 throw e.setUnfinishedMessage(builder.buildPartial());
816 } catch (com.google.protobuf.UninitializedMessageException e) {
817 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
818 } catch (java.io.IOException e) {
819 throw new com.google.protobuf.InvalidProtocolBufferException(e)
820 .setUnfinishedMessage(builder.buildPartial());
821 }
822 return builder.buildPartial();
823 }
824 };
825
826 public static com.google.protobuf.Parser<FirstSolutionStrategy> parser() {
827 return PARSER;
828 }
829
830 @java.lang.Override
831 public com.google.protobuf.Parser<FirstSolutionStrategy> getParserForType() {
832 return PARSER;
833 }
834
835 @java.lang.Override
837 return DEFAULT_INSTANCE;
838 }
839
840}
841
com.google.ortools.constraintsolver.FirstSolutionStrategy build()
com.google.ortools.constraintsolver.FirstSolutionStrategy buildPartial()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.ortools.constraintsolver.FirstSolutionStrategy getDefaultInstanceForType()
Builder mergeFrom(com.google.ortools.constraintsolver.FirstSolutionStrategy other)
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.constraintsolver.FirstSolutionStrategy parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.FirstSolutionStrategy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.FirstSolutionStrategy parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static Builder newBuilder(com.google.ortools.constraintsolver.FirstSolutionStrategy prototype)
static com.google.ortools.constraintsolver.FirstSolutionStrategy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.FirstSolutionStrategy parseDelimitedFrom(java.io.InputStream input)
com.google.ortools.constraintsolver.FirstSolutionStrategy getDefaultInstanceForType()
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.constraintsolver.FirstSolutionStrategy getDefaultInstance()
static com.google.ortools.constraintsolver.FirstSolutionStrategy parseFrom(java.io.InputStream input)
static com.google.ortools.constraintsolver.FirstSolutionStrategy parseFrom(java.nio.ByteBuffer data)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.protobuf.Parser< FirstSolutionStrategy > getParserForType()
static com.google.ortools.constraintsolver.FirstSolutionStrategy parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.FirstSolutionStrategy parseFrom(byte[] data)
static com.google.protobuf.Parser< FirstSolutionStrategy > parser()
static com.google.ortools.constraintsolver.FirstSolutionStrategy parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.constraintsolver.FirstSolutionStrategy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.FirstSolutionStrategy parseFrom(com.google.protobuf.CodedInputStream input)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
static Value valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
static com.google.protobuf.Internal.EnumLiteMap< Value > internalGetValueMap()
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()