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