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