Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
LocalSearchMetaheuristic.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
15public final class LocalSearchMetaheuristic extends
16 com.google.protobuf.GeneratedMessage implements
17 // @@protoc_insertion_point(message_implements:operations_research.LocalSearchMetaheuristic)
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= */ 26,
25 /* patch= */ 1,
26 /* suffix= */ "",
27 LocalSearchMetaheuristic.class.getName());
28 }
29 // Use LocalSearchMetaheuristic.newBuilder() to construct.
30 private LocalSearchMetaheuristic(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
31 super(builder);
32 }
33 private LocalSearchMetaheuristic() {
34 }
35
36 public static final com.google.protobuf.Descriptors.Descriptor
38 return com.google.ortools.constraintsolver.RoutingEnums.internal_static_operations_research_LocalSearchMetaheuristic_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_LocalSearchMetaheuristic_fieldAccessorTable
45 .ensureFieldAccessorsInitialized(
46 com.google.ortools.constraintsolver.LocalSearchMetaheuristic.class, com.google.ortools.constraintsolver.LocalSearchMetaheuristic.Builder.class);
47 }
48
52 public enum Value
53 implements com.google.protobuf.ProtocolMessageEnum {
120 ;
121
122 static {
123 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
124 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
125 /* major= */ 4,
126 /* minor= */ 26,
127 /* patch= */ 1,
128 /* suffix= */ "",
129 Value.class.getName());
130 }
140 public static final int UNSET_VALUE = 0;
148 public static final int AUTOMATIC_VALUE = 6;
157 public static final int GREEDY_DESCENT_VALUE = 1;
167 public static final int GUIDED_LOCAL_SEARCH_VALUE = 2;
176 public static final int SIMULATED_ANNEALING_VALUE = 3;
185 public static final int TABU_SEARCH_VALUE = 4;
195 public static final int GENERIC_TABU_SEARCH_VALUE = 5;
196
197
198 public final int getNumber() {
199 if (this == UNRECOGNIZED) {
200 throw new java.lang.IllegalArgumentException(
201 "Can't get the number of an unknown enum value.");
202 }
203 return value;
204 }
205
211 @java.lang.Deprecated
212 public static Value valueOf(int value) {
213 return forNumber(value);
214 }
215
220 public static Value forNumber(int value) {
221 switch (value) {
222 case 0: return UNSET;
223 case 6: return AUTOMATIC;
224 case 1: return GREEDY_DESCENT;
225 case 2: return GUIDED_LOCAL_SEARCH;
226 case 3: return SIMULATED_ANNEALING;
227 case 4: return TABU_SEARCH;
228 case 5: return GENERIC_TABU_SEARCH;
229 default: return null;
230 }
231 }
232
233 public static com.google.protobuf.Internal.EnumLiteMap<Value>
235 return internalValueMap;
236 }
237 private static final com.google.protobuf.Internal.EnumLiteMap<
238 Value> internalValueMap =
239 new com.google.protobuf.Internal.EnumLiteMap<Value>() {
240 public Value findValueByNumber(int number) {
241 return Value.forNumber(number);
242 }
243 };
244
245 public final com.google.protobuf.Descriptors.EnumValueDescriptor
247 if (this == UNRECOGNIZED) {
248 throw new java.lang.IllegalStateException(
249 "Can't get the descriptor of an unrecognized enum value.");
250 }
251 return getDescriptor().getValues().get(ordinal());
252 }
253 public final com.google.protobuf.Descriptors.EnumDescriptor
255 return getDescriptor();
256 }
257 public static final com.google.protobuf.Descriptors.EnumDescriptor
259 return com.google.ortools.constraintsolver.LocalSearchMetaheuristic.getDescriptor().getEnumTypes().get(0);
260 }
261
262 private static final Value[] VALUES = values();
263
264 public static Value valueOf(
265 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
266 if (desc.getType() != getDescriptor()) {
267 throw new java.lang.IllegalArgumentException(
268 "EnumValueDescriptor is not for this type.");
269 }
270 if (desc.getIndex() == -1) {
271 return UNRECOGNIZED;
272 }
273 return VALUES[desc.getIndex()];
274 }
275
276 private final int value;
277
278 private Value(int value) {
279 this.value = value;
280 }
281
282 // @@protoc_insertion_point(enum_scope:operations_research.LocalSearchMetaheuristic.Value)
283 }
284
285 private byte memoizedIsInitialized = -1;
286 @java.lang.Override
287 public final boolean isInitialized() {
288 byte isInitialized = memoizedIsInitialized;
289 if (isInitialized == 1) return true;
290 if (isInitialized == 0) return false;
291
292 memoizedIsInitialized = 1;
293 return true;
294 }
295
296 @java.lang.Override
297 public void writeTo(com.google.protobuf.CodedOutputStream output)
298 throws java.io.IOException {
299 getUnknownFields().writeTo(output);
300 }
301
302 @java.lang.Override
303 public int getSerializedSize() {
304 int size = memoizedSize;
305 if (size != -1) return size;
306
307 size = 0;
308 size += getUnknownFields().getSerializedSize();
309 memoizedSize = size;
310 return size;
311 }
312
313 @java.lang.Override
314 public boolean equals(final java.lang.Object obj) {
315 if (obj == this) {
316 return true;
317 }
318 if (!(obj instanceof com.google.ortools.constraintsolver.LocalSearchMetaheuristic)) {
319 return super.equals(obj);
320 }
321 com.google.ortools.constraintsolver.LocalSearchMetaheuristic other = (com.google.ortools.constraintsolver.LocalSearchMetaheuristic) obj;
322
323 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
324 return true;
325 }
326
327 @java.lang.Override
328 public int hashCode() {
329 if (memoizedHashCode != 0) {
330 return memoizedHashCode;
331 }
332 int hash = 41;
333 hash = (19 * hash) + getDescriptor().hashCode();
334 hash = (29 * hash) + getUnknownFields().hashCode();
335 memoizedHashCode = hash;
336 return hash;
337 }
338
340 java.nio.ByteBuffer data)
341 throws com.google.protobuf.InvalidProtocolBufferException {
342 return PARSER.parseFrom(data);
343 }
345 java.nio.ByteBuffer data,
346 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
347 throws com.google.protobuf.InvalidProtocolBufferException {
348 return PARSER.parseFrom(data, extensionRegistry);
349 }
351 com.google.protobuf.ByteString data)
352 throws com.google.protobuf.InvalidProtocolBufferException {
353 return PARSER.parseFrom(data);
354 }
356 com.google.protobuf.ByteString data,
357 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
358 throws com.google.protobuf.InvalidProtocolBufferException {
359 return PARSER.parseFrom(data, extensionRegistry);
360 }
362 throws com.google.protobuf.InvalidProtocolBufferException {
363 return PARSER.parseFrom(data);
364 }
366 byte[] data,
367 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
368 throws com.google.protobuf.InvalidProtocolBufferException {
369 return PARSER.parseFrom(data, extensionRegistry);
370 }
372 throws java.io.IOException {
373 return com.google.protobuf.GeneratedMessage
374 .parseWithIOException(PARSER, input);
375 }
377 java.io.InputStream input,
378 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
379 throws java.io.IOException {
380 return com.google.protobuf.GeneratedMessage
381 .parseWithIOException(PARSER, input, extensionRegistry);
382 }
383
385 throws java.io.IOException {
386 return com.google.protobuf.GeneratedMessage
387 .parseDelimitedWithIOException(PARSER, input);
388 }
389
391 java.io.InputStream input,
392 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
393 throws java.io.IOException {
394 return com.google.protobuf.GeneratedMessage
395 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
396 }
398 com.google.protobuf.CodedInputStream input)
399 throws java.io.IOException {
400 return com.google.protobuf.GeneratedMessage
401 .parseWithIOException(PARSER, input);
402 }
404 com.google.protobuf.CodedInputStream input,
405 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
406 throws java.io.IOException {
407 return com.google.protobuf.GeneratedMessage
408 .parseWithIOException(PARSER, input, extensionRegistry);
409 }
410
411 @java.lang.Override
412 public Builder newBuilderForType() { return newBuilder(); }
413 public static Builder newBuilder() {
414 return DEFAULT_INSTANCE.toBuilder();
415 }
416 public static Builder newBuilder(com.google.ortools.constraintsolver.LocalSearchMetaheuristic prototype) {
417 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
418 }
419 @java.lang.Override
421 return this == DEFAULT_INSTANCE
422 ? new Builder() : new Builder().mergeFrom(this);
423 }
424
425 @java.lang.Override
427 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
428 Builder builder = new Builder(parent);
429 return builder;
430 }
439 public static final class Builder extends
440 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
441 // @@protoc_insertion_point(builder_implements:operations_research.LocalSearchMetaheuristic)
442 com.google.ortools.constraintsolver.LocalSearchMetaheuristicOrBuilder {
443 public static final com.google.protobuf.Descriptors.Descriptor
445 return com.google.ortools.constraintsolver.RoutingEnums.internal_static_operations_research_LocalSearchMetaheuristic_descriptor;
446 }
447
448 @java.lang.Override
449 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
451 return com.google.ortools.constraintsolver.RoutingEnums.internal_static_operations_research_LocalSearchMetaheuristic_fieldAccessorTable
452 .ensureFieldAccessorsInitialized(
453 com.google.ortools.constraintsolver.LocalSearchMetaheuristic.class, com.google.ortools.constraintsolver.LocalSearchMetaheuristic.Builder.class);
454 }
455
456 // Construct using com.google.ortools.constraintsolver.LocalSearchMetaheuristic.newBuilder()
457 private Builder() {
458
459 }
460
461 private Builder(
462 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
463 super(parent);
464
465 }
466 @java.lang.Override
467 public Builder clear() {
468 super.clear();
469 return this;
470 }
471
472 @java.lang.Override
473 public com.google.protobuf.Descriptors.Descriptor
475 return com.google.ortools.constraintsolver.RoutingEnums.internal_static_operations_research_LocalSearchMetaheuristic_descriptor;
476 }
477
478 @java.lang.Override
480 return com.google.ortools.constraintsolver.LocalSearchMetaheuristic.getDefaultInstance();
481 }
482
483 @java.lang.Override
486 if (!result.isInitialized()) {
487 throw newUninitializedMessageException(result);
488 }
489 return result;
490 }
491
492 @java.lang.Override
494 com.google.ortools.constraintsolver.LocalSearchMetaheuristic result = new com.google.ortools.constraintsolver.LocalSearchMetaheuristic(this);
495 onBuilt();
496 return result;
497 }
498
499 @java.lang.Override
500 public Builder mergeFrom(com.google.protobuf.Message other) {
501 if (other instanceof com.google.ortools.constraintsolver.LocalSearchMetaheuristic) {
502 return mergeFrom((com.google.ortools.constraintsolver.LocalSearchMetaheuristic)other);
503 } else {
504 super.mergeFrom(other);
505 return this;
506 }
507 }
508
509 public Builder mergeFrom(com.google.ortools.constraintsolver.LocalSearchMetaheuristic other) {
510 if (other == com.google.ortools.constraintsolver.LocalSearchMetaheuristic.getDefaultInstance()) return this;
511 this.mergeUnknownFields(other.getUnknownFields());
512 onChanged();
513 return this;
514 }
515
516 @java.lang.Override
517 public final boolean isInitialized() {
518 return true;
519 }
520
521 @java.lang.Override
523 com.google.protobuf.CodedInputStream input,
524 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
525 throws java.io.IOException {
526 if (extensionRegistry == null) {
527 throw new java.lang.NullPointerException();
528 }
529 try {
530 boolean done = false;
531 while (!done) {
532 int tag = input.readTag();
533 switch (tag) {
534 case 0:
535 done = true;
536 break;
537 default: {
538 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
539 done = true; // was an endgroup tag
540 }
541 break;
542 } // default:
543 } // switch (tag)
544 } // while (!done)
545 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
546 throw e.unwrapIOException();
547 } finally {
548 onChanged();
549 } // finally
550 return this;
551 }
552
553 // @@protoc_insertion_point(builder_scope:operations_research.LocalSearchMetaheuristic)
554 }
555
556 // @@protoc_insertion_point(class_scope:operations_research.LocalSearchMetaheuristic)
557 private static final com.google.ortools.constraintsolver.LocalSearchMetaheuristic DEFAULT_INSTANCE;
558 static {
559 DEFAULT_INSTANCE = new com.google.ortools.constraintsolver.LocalSearchMetaheuristic();
560 }
561
563 return DEFAULT_INSTANCE;
564 }
565
566 private static final com.google.protobuf.Parser<LocalSearchMetaheuristic>
567 PARSER = new com.google.protobuf.AbstractParser<LocalSearchMetaheuristic>() {
568 @java.lang.Override
569 public LocalSearchMetaheuristic parsePartialFrom(
570 com.google.protobuf.CodedInputStream input,
571 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
572 throws com.google.protobuf.InvalidProtocolBufferException {
573 Builder builder = newBuilder();
574 try {
575 builder.mergeFrom(input, extensionRegistry);
576 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
577 throw e.setUnfinishedMessage(builder.buildPartial());
578 } catch (com.google.protobuf.UninitializedMessageException e) {
579 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
580 } catch (java.io.IOException e) {
581 throw new com.google.protobuf.InvalidProtocolBufferException(e)
582 .setUnfinishedMessage(builder.buildPartial());
583 }
584 return builder.buildPartial();
585 }
586 };
587
588 public static com.google.protobuf.Parser<LocalSearchMetaheuristic> parser() {
589 return PARSER;
590 }
591
592 @java.lang.Override
593 public com.google.protobuf.Parser<LocalSearchMetaheuristic> getParserForType() {
594 return PARSER;
595 }
596
597 @java.lang.Override
599 return DEFAULT_INSTANCE;
600 }
601
602}
603
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.constraintsolver.LocalSearchMetaheuristic build()
com.google.ortools.constraintsolver.LocalSearchMetaheuristic buildPartial()
com.google.ortools.constraintsolver.LocalSearchMetaheuristic getDefaultInstanceForType()
Builder mergeFrom(com.google.ortools.constraintsolver.LocalSearchMetaheuristic other)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.constraintsolver.LocalSearchMetaheuristic parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.constraintsolver.LocalSearchMetaheuristic parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.constraintsolver.LocalSearchMetaheuristic parseFrom(com.google.protobuf.ByteString data)
com.google.ortools.constraintsolver.LocalSearchMetaheuristic getDefaultInstanceForType()
void writeTo(com.google.protobuf.CodedOutputStream output)
com.google.protobuf.Parser< LocalSearchMetaheuristic > getParserForType()
static com.google.ortools.constraintsolver.LocalSearchMetaheuristic parseFrom(java.nio.ByteBuffer data)
static com.google.protobuf.Parser< LocalSearchMetaheuristic > parser()
static Builder newBuilder(com.google.ortools.constraintsolver.LocalSearchMetaheuristic prototype)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.constraintsolver.LocalSearchMetaheuristic parseFrom(byte[] data)
static com.google.ortools.constraintsolver.LocalSearchMetaheuristic parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.constraintsolver.LocalSearchMetaheuristic parseFrom(java.io.InputStream input)
static com.google.ortools.constraintsolver.LocalSearchMetaheuristic parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.constraintsolver.LocalSearchMetaheuristic getDefaultInstance()
static com.google.ortools.constraintsolver.LocalSearchMetaheuristic parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.LocalSearchMetaheuristic parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.LocalSearchMetaheuristic parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.LocalSearchMetaheuristic parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
static com.google.protobuf.Internal.EnumLiteMap< Value > internalGetValueMap()
static Value valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()