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