Google OR-Tools v9.14
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// NO CHECKED-IN PROTOBUF GENCODE
3// source: ortools/constraint_solver/routing_enums.proto
4// Protobuf Java Version: 4.31.1
5
6package com.google.ortools.constraintsolver;
7
15@com.google.protobuf.Generated
16public final class FirstSolutionStrategy extends
17 com.google.protobuf.GeneratedMessage implements
18 // @@protoc_insertion_point(message_implements:operations_research.FirstSolutionStrategy)
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= */ 31,
26 /* patch= */ 1,
27 /* suffix= */ "",
28 FirstSolutionStrategy.class.getName());
29 }
30 // Use FirstSolutionStrategy.newBuilder() to construct.
31 private FirstSolutionStrategy(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
32 super(builder);
33 }
34 private FirstSolutionStrategy() {
35 }
36
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.constraintsolver.RoutingEnums.internal_static_operations_research_FirstSolutionStrategy_descriptor;
40 }
41
42 @java.lang.Override
43 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
45 return com.google.ortools.constraintsolver.RoutingEnums.internal_static_operations_research_FirstSolutionStrategy_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.constraintsolver.FirstSolutionStrategy.class, com.google.ortools.constraintsolver.FirstSolutionStrategy.Builder.class);
48 }
49
53 public enum Value
54 implements com.google.protobuf.ProtocolMessageEnum {
137 SWEEP(11),
247 ;
248
249 static {
250 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
251 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
252 /* major= */ 4,
253 /* minor= */ 31,
254 /* patch= */ 1,
255 /* suffix= */ "",
256 Value.class.getName());
257 }
265 public static final int UNSET_VALUE = 0;
274 public static final int AUTOMATIC_VALUE = 15;
285 public static final int PATH_CHEAPEST_ARC_VALUE = 3;
296 public static final int PATH_MOST_CONSTRAINED_ARC_VALUE = 4;
306 public static final int EVALUATOR_STRATEGY_VALUE = 5;
317 public static final int SAVINGS_VALUE = 10;
328 public static final int PARALLEL_SAVINGS_VALUE = 17;
340 public static final int SWEEP_VALUE = 11;
355 public static final int CHRISTOFIDES_VALUE = 13;
365 public static final int ALL_UNPERFORMED_VALUE = 6;
376 public static final int BEST_INSERTION_VALUE = 7;
386 public static final int PARALLEL_CHEAPEST_INSERTION_VALUE = 8;
397 public static final int SEQUENTIAL_CHEAPEST_INSERTION_VALUE = 14;
410 public static final int LOCAL_CHEAPEST_INSERTION_VALUE = 9;
419 public static final int LOCAL_CHEAPEST_COST_INSERTION_VALUE = 16;
428 public static final int GLOBAL_CHEAPEST_ARC_VALUE = 1;
437 public static final int LOCAL_CHEAPEST_ARC_VALUE = 2;
448 public static final int FIRST_UNBOUND_MIN_VALUE_VALUE = 12;
449
450
451 public final int getNumber() {
452 if (this == UNRECOGNIZED) {
453 throw new java.lang.IllegalArgumentException(
454 "Can't get the number of an unknown enum value.");
455 }
456 return value;
457 }
458
464 @java.lang.Deprecated
465 public static Value valueOf(int value) {
466 return forNumber(value);
467 }
468
473 public static Value forNumber(int value) {
474 switch (value) {
475 case 0: return UNSET;
476 case 15: return AUTOMATIC;
477 case 3: return PATH_CHEAPEST_ARC;
478 case 4: return PATH_MOST_CONSTRAINED_ARC;
479 case 5: return EVALUATOR_STRATEGY;
480 case 10: return SAVINGS;
481 case 17: return PARALLEL_SAVINGS;
482 case 11: return SWEEP;
483 case 13: return CHRISTOFIDES;
484 case 6: return ALL_UNPERFORMED;
485 case 7: return BEST_INSERTION;
486 case 8: return PARALLEL_CHEAPEST_INSERTION;
487 case 14: return SEQUENTIAL_CHEAPEST_INSERTION;
488 case 9: return LOCAL_CHEAPEST_INSERTION;
489 case 16: return LOCAL_CHEAPEST_COST_INSERTION;
490 case 1: return GLOBAL_CHEAPEST_ARC;
491 case 2: return LOCAL_CHEAPEST_ARC;
492 case 12: return FIRST_UNBOUND_MIN_VALUE;
493 default: return null;
494 }
495 }
496
497 public static com.google.protobuf.Internal.EnumLiteMap<Value>
499 return internalValueMap;
500 }
501 private static final com.google.protobuf.Internal.EnumLiteMap<
502 Value> internalValueMap =
503 new com.google.protobuf.Internal.EnumLiteMap<Value>() {
504 public Value findValueByNumber(int number) {
505 return Value.forNumber(number);
506 }
507 };
508
509 public final com.google.protobuf.Descriptors.EnumValueDescriptor
511 if (this == UNRECOGNIZED) {
512 throw new java.lang.IllegalStateException(
513 "Can't get the descriptor of an unrecognized enum value.");
514 }
515 return getDescriptor().getValues().get(ordinal());
516 }
517 public final com.google.protobuf.Descriptors.EnumDescriptor
519 return getDescriptor();
520 }
521 public static com.google.protobuf.Descriptors.EnumDescriptor
523 return com.google.ortools.constraintsolver.FirstSolutionStrategy.getDescriptor().getEnumTypes().get(0);
524 }
525
526 private static final Value[] VALUES = values();
527
528 public static Value valueOf(
529 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
530 if (desc.getType() != getDescriptor()) {
531 throw new java.lang.IllegalArgumentException(
532 "EnumValueDescriptor is not for this type.");
533 }
534 if (desc.getIndex() == -1) {
535 return UNRECOGNIZED;
536 }
537 return VALUES[desc.getIndex()];
538 }
539
540 private final int value;
541
542 private Value(int value) {
543 this.value = value;
544 }
545
546 // @@protoc_insertion_point(enum_scope:operations_research.FirstSolutionStrategy.Value)
547 }
548
549 private byte memoizedIsInitialized = -1;
550 @java.lang.Override
551 public final boolean isInitialized() {
552 byte isInitialized = memoizedIsInitialized;
553 if (isInitialized == 1) return true;
554 if (isInitialized == 0) return false;
555
556 memoizedIsInitialized = 1;
557 return true;
558 }
559
560 @java.lang.Override
561 public void writeTo(com.google.protobuf.CodedOutputStream output)
562 throws java.io.IOException {
563 getUnknownFields().writeTo(output);
564 }
565
566 @java.lang.Override
567 public int getSerializedSize() {
568 int size = memoizedSize;
569 if (size != -1) return size;
570
571 size = 0;
572 size += getUnknownFields().getSerializedSize();
573 memoizedSize = size;
574 return size;
575 }
576
577 @java.lang.Override
578 public boolean equals(final java.lang.Object obj) {
579 if (obj == this) {
580 return true;
581 }
582 if (!(obj instanceof com.google.ortools.constraintsolver.FirstSolutionStrategy)) {
583 return super.equals(obj);
584 }
585 com.google.ortools.constraintsolver.FirstSolutionStrategy other = (com.google.ortools.constraintsolver.FirstSolutionStrategy) obj;
586
587 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
588 return true;
589 }
590
591 @java.lang.Override
592 public int hashCode() {
593 if (memoizedHashCode != 0) {
594 return memoizedHashCode;
595 }
596 int hash = 41;
597 hash = (19 * hash) + getDescriptor().hashCode();
598 hash = (29 * hash) + getUnknownFields().hashCode();
599 memoizedHashCode = hash;
600 return hash;
601 }
602
604 java.nio.ByteBuffer data)
605 throws com.google.protobuf.InvalidProtocolBufferException {
606 return PARSER.parseFrom(data);
607 }
609 java.nio.ByteBuffer data,
610 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
611 throws com.google.protobuf.InvalidProtocolBufferException {
612 return PARSER.parseFrom(data, extensionRegistry);
613 }
615 com.google.protobuf.ByteString data)
616 throws com.google.protobuf.InvalidProtocolBufferException {
617 return PARSER.parseFrom(data);
618 }
620 com.google.protobuf.ByteString data,
621 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
622 throws com.google.protobuf.InvalidProtocolBufferException {
623 return PARSER.parseFrom(data, extensionRegistry);
624 }
626 throws com.google.protobuf.InvalidProtocolBufferException {
627 return PARSER.parseFrom(data);
628 }
630 byte[] data,
631 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
632 throws com.google.protobuf.InvalidProtocolBufferException {
633 return PARSER.parseFrom(data, extensionRegistry);
634 }
636 throws java.io.IOException {
637 return com.google.protobuf.GeneratedMessage
638 .parseWithIOException(PARSER, input);
639 }
641 java.io.InputStream input,
642 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
643 throws java.io.IOException {
644 return com.google.protobuf.GeneratedMessage
645 .parseWithIOException(PARSER, input, extensionRegistry);
646 }
647
649 throws java.io.IOException {
650 return com.google.protobuf.GeneratedMessage
651 .parseDelimitedWithIOException(PARSER, input);
652 }
653
655 java.io.InputStream input,
656 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
657 throws java.io.IOException {
658 return com.google.protobuf.GeneratedMessage
659 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
660 }
662 com.google.protobuf.CodedInputStream input)
663 throws java.io.IOException {
664 return com.google.protobuf.GeneratedMessage
665 .parseWithIOException(PARSER, input);
666 }
668 com.google.protobuf.CodedInputStream input,
669 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
670 throws java.io.IOException {
671 return com.google.protobuf.GeneratedMessage
672 .parseWithIOException(PARSER, input, extensionRegistry);
673 }
674
675 @java.lang.Override
676 public Builder newBuilderForType() { return newBuilder(); }
677 public static Builder newBuilder() {
678 return DEFAULT_INSTANCE.toBuilder();
679 }
680 public static Builder newBuilder(com.google.ortools.constraintsolver.FirstSolutionStrategy prototype) {
681 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
682 }
683 @java.lang.Override
685 return this == DEFAULT_INSTANCE
686 ? new Builder() : new Builder().mergeFrom(this);
687 }
688
689 @java.lang.Override
691 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
692 Builder builder = new Builder(parent);
693 return builder;
694 }
695
702 public static final class Builder extends
703 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
704 // @@protoc_insertion_point(builder_implements:operations_research.FirstSolutionStrategy)
706 public static final com.google.protobuf.Descriptors.Descriptor
708 return com.google.ortools.constraintsolver.RoutingEnums.internal_static_operations_research_FirstSolutionStrategy_descriptor;
709 }
710
711 @java.lang.Override
712 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
714 return com.google.ortools.constraintsolver.RoutingEnums.internal_static_operations_research_FirstSolutionStrategy_fieldAccessorTable
715 .ensureFieldAccessorsInitialized(
716 com.google.ortools.constraintsolver.FirstSolutionStrategy.class, com.google.ortools.constraintsolver.FirstSolutionStrategy.Builder.class);
717 }
718
719 // Construct using com.google.ortools.constraintsolver.FirstSolutionStrategy.newBuilder()
720 private Builder() {
721
722 }
723
724 private Builder(
725 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
726 super(parent);
727
728 }
729 @java.lang.Override
730 public Builder clear() {
731 super.clear();
732 return this;
733 }
734
735 @java.lang.Override
736 public com.google.protobuf.Descriptors.Descriptor
738 return com.google.ortools.constraintsolver.RoutingEnums.internal_static_operations_research_FirstSolutionStrategy_descriptor;
739 }
740
741 @java.lang.Override
743 return com.google.ortools.constraintsolver.FirstSolutionStrategy.getDefaultInstance();
744 }
745
746 @java.lang.Override
749 if (!result.isInitialized()) {
750 throw newUninitializedMessageException(result);
751 }
752 return result;
753 }
754
755 @java.lang.Override
757 com.google.ortools.constraintsolver.FirstSolutionStrategy result = new com.google.ortools.constraintsolver.FirstSolutionStrategy(this);
758 onBuilt();
759 return result;
760 }
761
762 @java.lang.Override
763 public Builder mergeFrom(com.google.protobuf.Message other) {
764 if (other instanceof com.google.ortools.constraintsolver.FirstSolutionStrategy) {
765 return mergeFrom((com.google.ortools.constraintsolver.FirstSolutionStrategy)other);
766 } else {
767 super.mergeFrom(other);
768 return this;
769 }
770 }
771
772 public Builder mergeFrom(com.google.ortools.constraintsolver.FirstSolutionStrategy other) {
773 if (other == com.google.ortools.constraintsolver.FirstSolutionStrategy.getDefaultInstance()) return this;
774 this.mergeUnknownFields(other.getUnknownFields());
775 onChanged();
776 return this;
777 }
778
779 @java.lang.Override
780 public final boolean isInitialized() {
781 return true;
782 }
783
784 @java.lang.Override
785 public Builder mergeFrom(
786 com.google.protobuf.CodedInputStream input,
787 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
788 throws java.io.IOException {
789 if (extensionRegistry == null) {
790 throw new java.lang.NullPointerException();
791 }
792 try {
793 boolean done = false;
794 while (!done) {
795 int tag = input.readTag();
796 switch (tag) {
797 case 0:
798 done = true;
799 break;
800 default: {
801 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
802 done = true; // was an endgroup tag
803 }
804 break;
805 } // default:
806 } // switch (tag)
807 } // while (!done)
808 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
809 throw e.unwrapIOException();
810 } finally {
811 onChanged();
812 } // finally
813 return this;
814 }
815
816 // @@protoc_insertion_point(builder_scope:operations_research.FirstSolutionStrategy)
817 }
818
819 // @@protoc_insertion_point(class_scope:operations_research.FirstSolutionStrategy)
820 private static final com.google.ortools.constraintsolver.FirstSolutionStrategy DEFAULT_INSTANCE;
821 static {
822 DEFAULT_INSTANCE = new com.google.ortools.constraintsolver.FirstSolutionStrategy();
823 }
824
826 return DEFAULT_INSTANCE;
827 }
828
829 private static final com.google.protobuf.Parser<FirstSolutionStrategy>
830 PARSER = new com.google.protobuf.AbstractParser<FirstSolutionStrategy>() {
831 @java.lang.Override
832 public FirstSolutionStrategy parsePartialFrom(
833 com.google.protobuf.CodedInputStream input,
834 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
835 throws com.google.protobuf.InvalidProtocolBufferException {
836 Builder builder = newBuilder();
837 try {
838 builder.mergeFrom(input, extensionRegistry);
839 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
840 throw e.setUnfinishedMessage(builder.buildPartial());
841 } catch (com.google.protobuf.UninitializedMessageException e) {
842 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
843 } catch (java.io.IOException e) {
844 throw new com.google.protobuf.InvalidProtocolBufferException(e)
845 .setUnfinishedMessage(builder.buildPartial());
846 }
847 return builder.buildPartial();
848 }
849 };
850
851 public static com.google.protobuf.Parser<FirstSolutionStrategy> parser() {
852 return PARSER;
853 }
854
855 @java.lang.Override
856 public com.google.protobuf.Parser<FirstSolutionStrategy> getParserForType() {
857 return PARSER;
858 }
859
860 @java.lang.Override
862 return DEFAULT_INSTANCE;
863 }
864
865}
866
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)
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
static Value valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
static com.google.protobuf.Internal.EnumLiteMap< Value > internalGetValueMap()
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()