Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
RoutingModel.java
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (https://www.swig.org).
3 * Version 4.2.1
4 *
5 * Do not make changes to this file unless you know what you are doing - modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
8
9package com.google.ortools.constraintsolver;
10
11// Used to wrap Domain
12import com.google.ortools.util.Domain;
13// Used to wrap RoutingTransitCallback2
14// see https://docs.oracle.com/javase/8/docs/api/java/util/function/LongBinaryOperator.html
15import java.util.function.LongBinaryOperator;
16// Used to wrap RoutingTransitCallback1
17// see https://docs.oracle.com/javase/8/docs/api/java/util/function/LongUnaryOperator.html
18import java.util.function.LongUnaryOperator;
19
20public class RoutingModel {
21 private transient long swigCPtr;
22 protected transient boolean swigCMemOwn;
23
24 public RoutingModel(long cPtr, boolean cMemoryOwn) {
25 swigCMemOwn = cMemoryOwn;
26 swigCPtr = cPtr;
27 }
28
29 public static long getCPtr(RoutingModel obj) {
30 return (obj == null) ? 0 : obj.swigCPtr;
31 }
32
33 public static long swigRelease(RoutingModel obj) {
34 long ptr = 0;
35 if (obj != null) {
36 if (!obj.swigCMemOwn)
37 throw new RuntimeException("Cannot release ownership as memory is not owned");
38 ptr = obj.swigCPtr;
39 obj.swigCMemOwn = false;
40 obj.delete();
41 }
42 return ptr;
43 }
44
45 @SuppressWarnings({"deprecation", "removal"})
46 protected void finalize() {
47 delete();
48 }
49
50 public synchronized void delete() {
51 if (swigCPtr != 0) {
52 if (swigCMemOwn) {
53 swigCMemOwn = false;
54 mainJNI.delete_RoutingModel(swigCPtr);
55 }
56 swigCPtr = 0;
57 }
58 }
59
65 static public class VehicleTypeContainer {
66 private transient long swigCPtr;
67 protected transient boolean swigCMemOwn;
68
69 public VehicleTypeContainer(long cPtr, boolean cMemoryOwn) {
70 swigCMemOwn = cMemoryOwn;
71 swigCPtr = cPtr;
72 }
73
74 public static long getCPtr(VehicleTypeContainer obj) {
75 return (obj == null) ? 0 : obj.swigCPtr;
76 }
77
78 public static long swigRelease(VehicleTypeContainer obj) {
79 long ptr = 0;
80 if (obj != null) {
81 if (!obj.swigCMemOwn)
82 throw new RuntimeException("Cannot release ownership as memory is not owned");
83 ptr = obj.swigCPtr;
84 obj.swigCMemOwn = false;
85 obj.delete();
86 }
87 return ptr;
88 }
89
90 @SuppressWarnings({"deprecation", "removal"})
91 protected void finalize() {
92 delete();
93 }
94
95 public synchronized void delete() {
96 if (swigCPtr != 0) {
97 if (swigCMemOwn) {
98 swigCMemOwn = false;
99 mainJNI.delete_RoutingModel_VehicleTypeContainer(swigCPtr);
100 }
101 swigCPtr = 0;
102 }
103 }
104
105 static public class VehicleClassEntry {
106 private transient long swigCPtr;
107 protected transient boolean swigCMemOwn;
108
109 public VehicleClassEntry(long cPtr, boolean cMemoryOwn) {
110 swigCMemOwn = cMemoryOwn;
111 swigCPtr = cPtr;
112 }
113
114 public static long getCPtr(VehicleClassEntry obj) {
115 return (obj == null) ? 0 : obj.swigCPtr;
116 }
117
118 public static long swigRelease(VehicleClassEntry obj) {
119 long ptr = 0;
120 if (obj != null) {
121 if (!obj.swigCMemOwn)
122 throw new RuntimeException("Cannot release ownership as memory is not owned");
123 ptr = obj.swigCPtr;
124 obj.swigCMemOwn = false;
125 obj.delete();
126 }
127 return ptr;
128 }
129
130 @SuppressWarnings({"deprecation", "removal"})
131 protected void finalize() {
132 delete();
133 }
134
135 public synchronized void delete() {
136 if (swigCPtr != 0) {
137 if (swigCMemOwn) {
138 swigCMemOwn = false;
139 mainJNI.delete_RoutingModel_VehicleTypeContainer_VehicleClassEntry(swigCPtr);
140 }
141 swigCPtr = 0;
142 }
143 }
144
145 public void setVehicle_class(int value) {
146 mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_vehicle_class_set(swigCPtr, this, value);
147 }
148
149 public int getVehicle_class() {
150 return mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_vehicle_class_get(swigCPtr, this);
151 }
152
153 public void setFixed_cost(long value) {
154 mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_fixed_cost_set(swigCPtr, this, value);
155 }
156
157 public long getFixed_cost() {
158 return mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_fixed_cost_get(swigCPtr, this);
159 }
160
162 this(mainJNI.new_RoutingModel_VehicleTypeContainer_VehicleClassEntry(), true);
163 }
164
165 }
166
167 public int NumTypes() {
168 return mainJNI.RoutingModel_VehicleTypeContainer_NumTypes(swigCPtr, this);
169 }
170
171 public int Type(int vehicle) {
172 return mainJNI.RoutingModel_VehicleTypeContainer_Type(swigCPtr, this, vehicle);
173 }
174
175 public void setType_index_of_vehicle(int[] value) {
176 mainJNI.RoutingModel_VehicleTypeContainer_type_index_of_vehicle_set(swigCPtr, this, value);
177 }
178
180 return mainJNI.RoutingModel_VehicleTypeContainer_type_index_of_vehicle_get(swigCPtr, this);
181 }
182
183 public void setSorted_vehicle_classes_per_type(SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t value) {
184 mainJNI.RoutingModel_VehicleTypeContainer_sorted_vehicle_classes_per_type_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t.getCPtr(value));
185 }
186
187 public SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t getSorted_vehicle_classes_per_type() {
188 long cPtr = mainJNI.RoutingModel_VehicleTypeContainer_sorted_vehicle_classes_per_type_get(swigCPtr, this);
189 return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t(cPtr, false);
190 }
191
192 public void setVehicles_per_vehicle_class(SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t value) {
193 mainJNI.RoutingModel_VehicleTypeContainer_vehicles_per_vehicle_class_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t.getCPtr(value));
194 }
195
196 public SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t getVehicles_per_vehicle_class() {
197 return new SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t(mainJNI.RoutingModel_VehicleTypeContainer_vehicles_per_vehicle_class_get(swigCPtr, this), true);
198 }
199
201 this(mainJNI.new_RoutingModel_VehicleTypeContainer(), true);
202 }
203
204 }
205
219 static public class ResourceGroup {
220 private transient long swigCPtr;
221 protected transient boolean swigCMemOwn;
222
223 public ResourceGroup(long cPtr, boolean cMemoryOwn) {
224 swigCMemOwn = cMemoryOwn;
225 swigCPtr = cPtr;
226 }
227
228 public static long getCPtr(ResourceGroup obj) {
229 return (obj == null) ? 0 : obj.swigCPtr;
230 }
231
232 public static long swigRelease(ResourceGroup obj) {
233 long ptr = 0;
234 if (obj != null) {
235 if (!obj.swigCMemOwn)
236 throw new RuntimeException("Cannot release ownership as memory is not owned");
237 ptr = obj.swigCPtr;
238 obj.swigCMemOwn = false;
239 obj.delete();
240 }
241 return ptr;
242 }
243
244 @SuppressWarnings({"deprecation", "removal"})
245 protected void finalize() {
246 delete();
247 }
248
249 public synchronized void delete() {
250 if (swigCPtr != 0) {
251 if (swigCMemOwn) {
252 swigCMemOwn = false;
253 mainJNI.delete_RoutingModel_ResourceGroup(swigCPtr);
254 }
255 swigCPtr = 0;
256 }
257 }
258
262 static public class Attributes {
263 private transient long swigCPtr;
264 protected transient boolean swigCMemOwn;
265
266 public Attributes(long cPtr, boolean cMemoryOwn) {
267 swigCMemOwn = cMemoryOwn;
268 swigCPtr = cPtr;
269 }
270
271 public static long getCPtr(Attributes obj) {
272 return (obj == null) ? 0 : obj.swigCPtr;
273 }
274
275 public static long swigRelease(Attributes obj) {
276 long ptr = 0;
277 if (obj != null) {
278 if (!obj.swigCMemOwn)
279 throw new RuntimeException("Cannot release ownership as memory is not owned");
280 ptr = obj.swigCPtr;
281 obj.swigCMemOwn = false;
282 obj.delete();
283 }
284 return ptr;
285 }
286
287 @SuppressWarnings({"deprecation", "removal"})
288 protected void finalize() {
289 delete();
290 }
291
292 public synchronized void delete() {
293 if (swigCPtr != 0) {
294 if (swigCMemOwn) {
295 swigCMemOwn = false;
296 mainJNI.delete_RoutingModel_ResourceGroup_Attributes(swigCPtr);
297 }
298 swigCPtr = 0;
299 }
300 }
301
302 public Attributes() {
303 this(mainJNI.new_RoutingModel_ResourceGroup_Attributes__SWIG_0(), true);
304 }
305
307 this(mainJNI.new_RoutingModel_ResourceGroup_Attributes__SWIG_1(Domain.getCPtr(start_domain), start_domain, Domain.getCPtr(end_domain), end_domain), true);
308 }
309
311 return new Domain(mainJNI.RoutingModel_ResourceGroup_Attributes_start_domain(swigCPtr, this), false);
312 }
313
315 return new Domain(mainJNI.RoutingModel_ResourceGroup_Attributes_end_domain(swigCPtr, this), false);
316 }
317
318 }
319
323 static public class Resource {
324 private transient long swigCPtr;
325 protected transient boolean swigCMemOwn;
326
327 public Resource(long cPtr, boolean cMemoryOwn) {
328 swigCMemOwn = cMemoryOwn;
329 swigCPtr = cPtr;
330 }
331
332 public static long getCPtr(Resource obj) {
333 return (obj == null) ? 0 : obj.swigCPtr;
334 }
335
336 public static long swigRelease(Resource obj) {
337 long ptr = 0;
338 if (obj != null) {
339 if (!obj.swigCMemOwn)
340 throw new RuntimeException("Cannot release ownership as memory is not owned");
341 ptr = obj.swigCPtr;
342 obj.swigCMemOwn = false;
343 obj.delete();
344 }
345 return ptr;
346 }
347
348 @SuppressWarnings({"deprecation", "removal"})
349 protected void finalize() {
350 delete();
351 }
352
353 public synchronized void delete() {
354 if (swigCPtr != 0) {
355 if (swigCMemOwn) {
356 swigCMemOwn = false;
357 mainJNI.delete_RoutingModel_ResourceGroup_Resource(swigCPtr);
358 }
359 swigCPtr = 0;
360 }
361 }
362
363 public RoutingModel.ResourceGroup.Attributes GetDimensionAttributes(RoutingDimension dimension) {
364 return new RoutingModel.ResourceGroup.Attributes(mainJNI.RoutingModel_ResourceGroup_Resource_GetDimensionAttributes(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension), false);
365 }
366
367 }
368
374 return mainJNI.RoutingModel_ResourceGroup_AddResource(swigCPtr, this, RoutingModel.ResourceGroup.Attributes.getCPtr(attributes), attributes, RoutingDimension.getCPtr(dimension), dimension);
375 }
376
382 public void NotifyVehicleRequiresAResource(int vehicle) {
383 mainJNI.RoutingModel_ResourceGroup_NotifyVehicleRequiresAResource(swigCPtr, this, vehicle);
384 }
385
387 return mainJNI.RoutingModel_ResourceGroup_GetVehiclesRequiringAResource(swigCPtr, this);
388 }
389
390 public boolean VehicleRequiresAResource(int vehicle) {
391 return mainJNI.RoutingModel_ResourceGroup_VehicleRequiresAResource(swigCPtr, this, vehicle);
392 }
393
394 public void SetAllowedResourcesForVehicle(int vehicle, int[] allowed_resource_indices) {
395 mainJNI.RoutingModel_ResourceGroup_SetAllowedResourcesForVehicle(swigCPtr, this, vehicle, allowed_resource_indices);
396 }
397
398 public void ClearAllowedResourcesForVehicle(int vehicle) {
399 mainJNI.RoutingModel_ResourceGroup_ClearAllowedResourcesForVehicle(swigCPtr, this, vehicle);
400 }
401
402 public SWIGTYPE_p_absl__flat_hash_setT_int_t GetResourcesMarkedAllowedForVehicle(int vehicle) {
403 return new SWIGTYPE_p_absl__flat_hash_setT_int_t(mainJNI.RoutingModel_ResourceGroup_GetResourcesMarkedAllowedForVehicle(swigCPtr, this, vehicle), false);
404 }
405
406 public boolean IsResourceAllowedForVehicle(int resource, int vehicle) {
407 return mainJNI.RoutingModel_ResourceGroup_IsResourceAllowedForVehicle(swigCPtr, this, resource, vehicle);
408 }
409
410 public SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__ResourceGroup__Resource_t GetResources() {
411 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__ResourceGroup__Resource_t(mainJNI.RoutingModel_ResourceGroup_GetResources(swigCPtr, this), false);
412 }
413
414 public RoutingModel.ResourceGroup.Resource GetResource(int resource_index) {
415 return new RoutingModel.ResourceGroup.Resource(mainJNI.RoutingModel_ResourceGroup_GetResource(swigCPtr, this, resource_index), false);
416 }
417
418 public SWIGTYPE_p_absl__flat_hash_setT_RoutingDimensionIndex_t GetAffectedDimensionIndices() {
419 return new SWIGTYPE_p_absl__flat_hash_setT_RoutingDimensionIndex_t(mainJNI.RoutingModel_ResourceGroup_GetAffectedDimensionIndices(swigCPtr, this), false);
420 }
421
423 return mainJNI.RoutingModel_ResourceGroup_GetResourceClassesCount(swigCPtr, this);
424 }
425
426 public int[] GetResourceIndicesInClass(int resource_class) {
427 return mainJNI.RoutingModel_ResourceGroup_GetResourceIndicesInClass(swigCPtr, this, resource_class);
428 }
429
430 public SWIGTYPE_p_util_intops__StrongVectorT_operations_research__RoutingModel__ResourceClassIndex_std__vectorT_int_t_t GetResourceIndicesPerClass() {
431 return new SWIGTYPE_p_util_intops__StrongVectorT_operations_research__RoutingModel__ResourceClassIndex_std__vectorT_int_t_t(mainJNI.RoutingModel_ResourceGroup_GetResourceIndicesPerClass(swigCPtr, this), false);
432 }
433
434 public int GetResourceClassIndex(int resource_index) {
435 return mainJNI.RoutingModel_ResourceGroup_GetResourceClassIndex(swigCPtr, this, resource_index);
436 }
437
438 public int Size() {
439 return mainJNI.RoutingModel_ResourceGroup_Size(swigCPtr, this);
440 }
441
442 public int Index() {
443 return mainJNI.RoutingModel_ResourceGroup_Index(swigCPtr, this);
444 }
445
446 }
447
451 static public class VariableValuePair {
452 private transient long swigCPtr;
453 protected transient boolean swigCMemOwn;
454
455 public VariableValuePair(long cPtr, boolean cMemoryOwn) {
456 swigCMemOwn = cMemoryOwn;
457 swigCPtr = cPtr;
458 }
459
460 public static long getCPtr(VariableValuePair obj) {
461 return (obj == null) ? 0 : obj.swigCPtr;
462 }
463
464 public static long swigRelease(VariableValuePair obj) {
465 long ptr = 0;
466 if (obj != null) {
467 if (!obj.swigCMemOwn)
468 throw new RuntimeException("Cannot release ownership as memory is not owned");
469 ptr = obj.swigCPtr;
470 obj.swigCMemOwn = false;
471 obj.delete();
472 }
473 return ptr;
474 }
475
476 @SuppressWarnings({"deprecation", "removal"})
477 protected void finalize() {
478 delete();
479 }
480
481 public synchronized void delete() {
482 if (swigCPtr != 0) {
483 if (swigCMemOwn) {
484 swigCMemOwn = false;
485 mainJNI.delete_RoutingModel_VariableValuePair(swigCPtr);
486 }
487 swigCPtr = 0;
488 }
489 }
490
491 public void setVar_index(int value) {
492 mainJNI.RoutingModel_VariableValuePair_var_index_set(swigCPtr, this, value);
493 }
494
495 public int getVar_index() {
496 return mainJNI.RoutingModel_VariableValuePair_var_index_get(swigCPtr, this);
497 }
498
499 public void setValue(long value) {
500 mainJNI.RoutingModel_VariableValuePair_value_set(swigCPtr, this, value);
501 }
502
503 public long getValue() {
504 return mainJNI.RoutingModel_VariableValuePair_value_get(swigCPtr, this);
505 }
506
508 this(mainJNI.new_RoutingModel_VariableValuePair(), true);
509 }
510
511 }
512
516 static public class SecondaryOptimizer {
517 private transient long swigCPtr;
518 protected transient boolean swigCMemOwn;
519
520 public SecondaryOptimizer(long cPtr, boolean cMemoryOwn) {
521 swigCMemOwn = cMemoryOwn;
522 swigCPtr = cPtr;
523 }
524
525 public static long getCPtr(SecondaryOptimizer obj) {
526 return (obj == null) ? 0 : obj.swigCPtr;
527 }
528
529 public static long swigRelease(SecondaryOptimizer obj) {
530 long ptr = 0;
531 if (obj != null) {
532 if (!obj.swigCMemOwn)
533 throw new RuntimeException("Cannot release ownership as memory is not owned");
534 ptr = obj.swigCPtr;
535 obj.swigCMemOwn = false;
536 obj.delete();
537 }
538 return ptr;
539 }
540
541 @SuppressWarnings({"deprecation", "removal"})
542 protected void finalize() {
543 delete();
544 }
545
546 public synchronized void delete() {
547 if (swigCPtr != 0) {
548 if (swigCMemOwn) {
549 swigCMemOwn = false;
550 mainJNI.delete_RoutingModel_SecondaryOptimizer(swigCPtr);
551 }
552 swigCPtr = 0;
553 }
554 }
555
556 public SecondaryOptimizer(RoutingModel model, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, long solve_period) {
557 this(mainJNI.new_RoutingModel_SecondaryOptimizer(RoutingModel.getCPtr(model), model, search_parameters.toByteArray(), solve_period), true);
558 }
559
560 public boolean Solve(SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__VariableValuePair_t in_state, SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__VariableValuePair_t out_state) {
561 return mainJNI.RoutingModel_SecondaryOptimizer_Solve(swigCPtr, this, SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__VariableValuePair_t.getCPtr(in_state), SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__VariableValuePair_t.getCPtr(out_state));
562 }
563
564 }
565
569 public static long getKNoPenalty() {
570 return mainJNI.RoutingModel_kNoPenalty_get();
571 }
572
577 public static int getKNoDisjunction() {
578 return mainJNI.RoutingModel_kNoDisjunction_get();
579}
580
585 public static int getKNoDimension() {
586 return mainJNI.RoutingModel_kNoDimension_get();
587}
588
594 public RoutingModel(RoutingIndexManager index_manager) {
595 this(mainJNI.new_RoutingModel__SWIG_0(RoutingIndexManager.getCPtr(index_manager), index_manager), true);
596 }
597
598 public RoutingModel(RoutingIndexManager index_manager, com.google.ortools.constraintsolver.RoutingModelParameters parameters) {
599 this(mainJNI.new_RoutingModel__SWIG_1(RoutingIndexManager.getCPtr(index_manager), index_manager, parameters.toByteArray()), true);
600 }
601
609 public int registerUnaryTransitVector(long[] values) {
610 return mainJNI.RoutingModel_registerUnaryTransitVector(swigCPtr, this, values);
611 }
612
613 public int registerUnaryTransitCallback(LongUnaryOperator callback, int sign) {
614 return mainJNI.RoutingModel_registerUnaryTransitCallback__SWIG_0(swigCPtr, this, callback, sign);
615 }
616
617 public int registerUnaryTransitCallback(LongUnaryOperator callback) {
618 return mainJNI.RoutingModel_registerUnaryTransitCallback__SWIG_1(swigCPtr, this, callback);
619 }
620
621 public int registerTransitMatrix(long[][] values) {
622 return mainJNI.RoutingModel_registerTransitMatrix(swigCPtr, this, values);
623 }
624
625 public int registerTransitCallback(LongBinaryOperator callback, int sign) {
626 return mainJNI.RoutingModel_registerTransitCallback__SWIG_0(swigCPtr, this, callback, sign);
627 }
628
629 public int registerTransitCallback(LongBinaryOperator callback) {
630 return mainJNI.RoutingModel_registerTransitCallback__SWIG_1(swigCPtr, this, callback);
631 }
632
655 public boolean addDimension(int evaluator_index, long slack_max, long capacity, boolean fix_start_cumul_to_zero, String name) {
656 return mainJNI.RoutingModel_addDimension(swigCPtr, this, evaluator_index, slack_max, capacity, fix_start_cumul_to_zero, name);
657 }
658
659 public boolean addDimensionWithVehicleTransits(int[] evaluator_indices, long slack_max, long capacity, boolean fix_start_cumul_to_zero, String name) {
660 return mainJNI.RoutingModel_addDimensionWithVehicleTransits(swigCPtr, this, evaluator_indices, slack_max, capacity, fix_start_cumul_to_zero, name);
661 }
662
663 public boolean addDimensionWithVehicleCapacity(int evaluator_index, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, String name) {
664 return mainJNI.RoutingModel_addDimensionWithVehicleCapacity(swigCPtr, this, evaluator_index, slack_max, vehicle_capacities, fix_start_cumul_to_zero, name);
665 }
666
667 public boolean addDimensionWithVehicleTransitAndCapacity(int[] evaluator_indices, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, String name) {
668 return mainJNI.RoutingModel_addDimensionWithVehicleTransitAndCapacity(swigCPtr, this, evaluator_indices, slack_max, vehicle_capacities, fix_start_cumul_to_zero, name);
669 }
670
681 public IntBoolPair addConstantDimensionWithSlack(long value, long capacity, long slack_max, boolean fix_start_cumul_to_zero, String name) {
682 return new IntBoolPair(mainJNI.RoutingModel_addConstantDimensionWithSlack(swigCPtr, this, value, capacity, slack_max, fix_start_cumul_to_zero, name), true);
683 }
684
685 public IntBoolPair addConstantDimension(long value, long capacity, boolean fix_start_cumul_to_zero, String name) {
686 return new IntBoolPair(mainJNI.RoutingModel_addConstantDimension(swigCPtr, this, value, capacity, fix_start_cumul_to_zero, name), true);
687 }
688
700 public IntBoolPair addVectorDimension(long[] values, long capacity, boolean fix_start_cumul_to_zero, String name) {
701 return new IntBoolPair(mainJNI.RoutingModel_addVectorDimension(swigCPtr, this, values, capacity, fix_start_cumul_to_zero, name), true);
702 }
703
715 public IntBoolPair addMatrixDimension(long[][] values, long capacity, boolean fix_start_cumul_to_zero, String name) {
716 return new IntBoolPair(mainJNI.RoutingModel_addMatrixDimension(swigCPtr, this, values, capacity, fix_start_cumul_to_zero, name), true);
717 }
718
722 public SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_p_t GetUnaryDimensions() {
723 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_p_t(mainJNI.RoutingModel_GetUnaryDimensions(swigCPtr, this), true);
724 }
725
729 public SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t GetDimensionsWithGlobalCumulOptimizers() {
730 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t(mainJNI.RoutingModel_GetDimensionsWithGlobalCumulOptimizers(swigCPtr, this), true);
731 }
732
733 public SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t GetDimensionsWithLocalCumulOptimizers() {
734 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t(mainJNI.RoutingModel_GetDimensionsWithLocalCumulOptimizers(swigCPtr, this), true);
735 }
736
740 public boolean HasGlobalCumulOptimizer(RoutingDimension dimension) {
741 return mainJNI.RoutingModel_HasGlobalCumulOptimizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
742 }
743
744 public boolean HasLocalCumulOptimizer(RoutingDimension dimension) {
745 return mainJNI.RoutingModel_HasLocalCumulOptimizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
746 }
747
752 public SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer GetMutableGlobalCumulLPOptimizer(RoutingDimension dimension) {
753 long cPtr = mainJNI.RoutingModel_GetMutableGlobalCumulLPOptimizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
754 return (cPtr == 0) ? null : new SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer(cPtr, false);
755 }
756
757 public SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer GetMutableGlobalCumulMPOptimizer(RoutingDimension dimension) {
758 long cPtr = mainJNI.RoutingModel_GetMutableGlobalCumulMPOptimizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
759 return (cPtr == 0) ? null : new SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer(cPtr, false);
760 }
761
762 public SWIGTYPE_p_operations_research__LocalDimensionCumulOptimizer GetMutableLocalCumulLPOptimizer(RoutingDimension dimension) {
763 long cPtr = mainJNI.RoutingModel_GetMutableLocalCumulLPOptimizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
764 return (cPtr == 0) ? null : new SWIGTYPE_p_operations_research__LocalDimensionCumulOptimizer(cPtr, false);
765 }
766
770 public boolean hasDimension(String dimension_name) {
771 return mainJNI.RoutingModel_hasDimension(swigCPtr, this, dimension_name);
772 }
773
777 public RoutingDimension getDimensionOrDie(String dimension_name) {
778 return new RoutingDimension(mainJNI.RoutingModel_getDimensionOrDie(swigCPtr, this, dimension_name), false);
779 }
780
785 public RoutingDimension getMutableDimension(String dimension_name) {
786 long cPtr = mainJNI.RoutingModel_getMutableDimension(swigCPtr, this, dimension_name);
787 return (cPtr == 0) ? null : new RoutingDimension(cPtr, false);
788 }
789
796 public void setPrimaryConstrainedDimension(String dimension_name) {
797 mainJNI.RoutingModel_setPrimaryConstrainedDimension(swigCPtr, this, dimension_name);
798 }
799
804 return mainJNI.RoutingModel_getPrimaryConstrainedDimension(swigCPtr, this);
805 }
806
810 public RoutingModel.ResourceGroup AddResourceGroup() {
811 long cPtr = mainJNI.RoutingModel_AddResourceGroup(swigCPtr, this);
812 return (cPtr == 0) ? null : new RoutingModel.ResourceGroup(cPtr, false);
813 }
814
815 public SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__RoutingModel__ResourceGroup_t_t GetResourceGroups() {
816 return new SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__RoutingModel__ResourceGroup_t_t(mainJNI.RoutingModel_GetResourceGroups(swigCPtr, this), false);
817 }
818
819 public RoutingModel.ResourceGroup GetResourceGroup(int rg_index) {
820 long cPtr = mainJNI.RoutingModel_GetResourceGroup(swigCPtr, this, rg_index);
821 return (cPtr == 0) ? null : new RoutingModel.ResourceGroup(cPtr, false);
822 }
823
829 return mainJNI.RoutingModel_GetDimensionResourceGroupIndices(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
830}
831
837 return mainJNI.RoutingModel_GetDimensionResourceGroupIndex(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
838 }
839
858 public int addDisjunction(long[] indices, long penalty, long max_cardinality) {
859 return mainJNI.RoutingModel_addDisjunction__SWIG_0(swigCPtr, this, indices, penalty, max_cardinality);
860}
861
880 public int addDisjunction(long[] indices, long penalty) {
881 return mainJNI.RoutingModel_addDisjunction__SWIG_1(swigCPtr, this, indices, penalty);
882}
883
902 public int addDisjunction(long[] indices) {
903 return mainJNI.RoutingModel_addDisjunction__SWIG_2(swigCPtr, this, indices);
904}
905
909 public int[] getDisjunctionIndices(long index) {
910 return mainJNI.RoutingModel_getDisjunctionIndices(swigCPtr, this, index);
911}
912
917 public long[] GetDisjunctionNodeIndices(int index) {
918 return mainJNI.RoutingModel_GetDisjunctionNodeIndices(swigCPtr, this, index);
919}
920
924 public long getDisjunctionPenalty(int index) {
925 return mainJNI.RoutingModel_getDisjunctionPenalty(swigCPtr, this, index);
926 }
927
932 public long getDisjunctionMaxCardinality(int index) {
933 return mainJNI.RoutingModel_getDisjunctionMaxCardinality(swigCPtr, this, index);
934 }
935
940 return mainJNI.RoutingModel_getNumberOfDisjunctions(swigCPtr, this);
941 }
942
947 public boolean HasMandatoryDisjunctions() {
948 return mainJNI.RoutingModel_HasMandatoryDisjunctions(swigCPtr, this);
949 }
950
956 return mainJNI.RoutingModel_HasMaxCardinalityConstrainedDisjunctions(swigCPtr, this);
957 }
958
967 mainJNI.RoutingModel_ignoreDisjunctionsAlreadyForcedToZero(swigCPtr, this);
968 }
969
975 public void addSoftSameVehicleConstraint(long[] indices, long cost) {
976 mainJNI.RoutingModel_addSoftSameVehicleConstraint(swigCPtr, this, indices, cost);
977 }
978
985 public void setAllowedVehiclesForIndex(int[] vehicles, long index) {
986 mainJNI.RoutingModel_setAllowedVehiclesForIndex(swigCPtr, this, vehicles, index);
987 }
988
992 public boolean isVehicleAllowedForIndex(int vehicle, long index) {
993 return mainJNI.RoutingModel_isVehicleAllowedForIndex(swigCPtr, this, vehicle, index);
994 }
995
1011 public void addPickupAndDelivery(long pickup, long delivery) {
1012 mainJNI.RoutingModel_addPickupAndDelivery(swigCPtr, this, pickup, delivery);
1013 }
1014
1020 public void addPickupAndDeliverySets(int pickup_disjunction, int delivery_disjunction) {
1021 mainJNI.RoutingModel_addPickupAndDeliverySets(swigCPtr, this, pickup_disjunction, delivery_disjunction);
1022 }
1023
1027 static public class PickupDeliveryPosition {
1028 private transient long swigCPtr;
1029 protected transient boolean swigCMemOwn;
1030
1031 public PickupDeliveryPosition(long cPtr, boolean cMemoryOwn) {
1032 swigCMemOwn = cMemoryOwn;
1033 swigCPtr = cPtr;
1034 }
1035
1036 public static long getCPtr(PickupDeliveryPosition obj) {
1037 return (obj == null) ? 0 : obj.swigCPtr;
1038 }
1039
1040 public static long swigRelease(PickupDeliveryPosition obj) {
1041 long ptr = 0;
1042 if (obj != null) {
1043 if (!obj.swigCMemOwn)
1044 throw new RuntimeException("Cannot release ownership as memory is not owned");
1045 ptr = obj.swigCPtr;
1046 obj.swigCMemOwn = false;
1047 obj.delete();
1048 }
1049 return ptr;
1050 }
1051
1052 @SuppressWarnings({"deprecation", "removal"})
1053 protected void finalize() {
1054 delete();
1055 }
1056
1057 public synchronized void delete() {
1058 if (swigCPtr != 0) {
1059 if (swigCMemOwn) {
1060 swigCMemOwn = false;
1061 mainJNI.delete_RoutingModel_PickupDeliveryPosition(swigCPtr);
1062 }
1063 swigCPtr = 0;
1064 }
1065 }
1066
1070 public void setPd_pair_index(int value) {
1071 mainJNI.RoutingModel_PickupDeliveryPosition_pd_pair_index_set(swigCPtr, this, value);
1072 }
1073
1077 public int getPd_pair_index() {
1078 return mainJNI.RoutingModel_PickupDeliveryPosition_pd_pair_index_get(swigCPtr, this);
1079 }
1080
1085 public void setAlternative_index(int value) {
1086 mainJNI.RoutingModel_PickupDeliveryPosition_alternative_index_set(swigCPtr, this, value);
1087 }
1088
1094 return mainJNI.RoutingModel_PickupDeliveryPosition_alternative_index_get(swigCPtr, this);
1095 }
1096
1098 this(mainJNI.new_RoutingModel_PickupDeliveryPosition(), true);
1099 }
1100
1101 }
1102
1106 public SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__PickupDeliveryPosition_t GetPickupPositions(long node_index) {
1107 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__PickupDeliveryPosition_t(mainJNI.RoutingModel_GetPickupPositions(swigCPtr, this, node_index), false);
1108 }
1109
1113 public SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__PickupDeliveryPosition_t GetDeliveryPositions(long node_index) {
1114 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__PickupDeliveryPosition_t(mainJNI.RoutingModel_GetDeliveryPositions(swigCPtr, this, node_index), false);
1115 }
1116
1120 public boolean IsPickup(long node_index) {
1121 return mainJNI.RoutingModel_IsPickup(swigCPtr, this, node_index);
1122 }
1123
1124 public boolean IsDelivery(long node_index) {
1125 return mainJNI.RoutingModel_IsDelivery(swigCPtr, this, node_index);
1126 }
1127
1133 mainJNI.RoutingModel_setPickupAndDeliveryPolicyOfAllVehicles(swigCPtr, this, policy);
1134 }
1135
1136 public void setPickupAndDeliveryPolicyOfVehicle(int policy, int vehicle) {
1137 mainJNI.RoutingModel_setPickupAndDeliveryPolicyOfVehicle(swigCPtr, this, policy, vehicle);
1138 }
1139
1140 public int getPickupAndDeliveryPolicyOfVehicle(int vehicle) {
1141 return mainJNI.RoutingModel_getPickupAndDeliveryPolicyOfVehicle(swigCPtr, this, vehicle);
1142 }
1143
1149 return mainJNI.RoutingModel_getNumOfSingletonNodes(swigCPtr, this);
1150 }
1151
1152 public void setVisitType(long index, int type, int type_policy) {
1153 mainJNI.RoutingModel_setVisitType(swigCPtr, this, index, type, type_policy);
1154 }
1155
1156 public int getVisitType(long index) {
1157 return mainJNI.RoutingModel_getVisitType(swigCPtr, this, index);
1158 }
1159
1160 public int[] GetSingleNodesOfType(int type) {
1161 return mainJNI.RoutingModel_GetSingleNodesOfType(swigCPtr, this, type);
1162}
1163
1164 public int[] GetPairIndicesOfType(int type) {
1165 return mainJNI.RoutingModel_GetPairIndicesOfType(swigCPtr, this, type);
1166}
1167
1168 public int GetVisitTypePolicy(long index) {
1169 return mainJNI.RoutingModel_GetVisitTypePolicy(swigCPtr, this, index);
1170 }
1171
1177 public void closeVisitTypes() {
1178 mainJNI.RoutingModel_closeVisitTypes(swigCPtr, this);
1179 }
1180
1182 return mainJNI.RoutingModel_getNumberOfVisitTypes(swigCPtr, this);
1183 }
1184
1191 public void addHardTypeIncompatibility(int type1, int type2) {
1192 mainJNI.RoutingModel_addHardTypeIncompatibility(swigCPtr, this, type1, type2);
1193 }
1194
1195 public void addTemporalTypeIncompatibility(int type1, int type2) {
1196 mainJNI.RoutingModel_addTemporalTypeIncompatibility(swigCPtr, this, type1, type2);
1197 }
1198
1199 public SWIGTYPE_p_absl__flat_hash_setT_int_t getTemporalTypeIncompatibilitiesOfType(int type) {
1200 return new SWIGTYPE_p_absl__flat_hash_setT_int_t(mainJNI.RoutingModel_getTemporalTypeIncompatibilitiesOfType(swigCPtr, this, type), false);
1201 }
1202
1208 return mainJNI.RoutingModel_hasHardTypeIncompatibilities(swigCPtr, this);
1209 }
1210
1212 return mainJNI.RoutingModel_hasTemporalTypeIncompatibilities(swigCPtr, this);
1213 }
1214
1221 public void addRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
1222 mainJNI.RoutingModel_addRequiredTypeAlternativesWhenAddingType(swigCPtr, this, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
1223 }
1224
1232 public void addRequiredTypeAlternativesWhenRemovingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
1233 mainJNI.RoutingModel_addRequiredTypeAlternativesWhenRemovingType(swigCPtr, this, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
1234 }
1235
1239 public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenAddingType(int type) {
1240 return new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(mainJNI.RoutingModel_GetRequiredTypeAlternativesWhenAddingType(swigCPtr, this, type), false);
1241 }
1242
1246 public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenRemovingType(int type) {
1247 return new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(mainJNI.RoutingModel_GetRequiredTypeAlternativesWhenRemovingType(swigCPtr, this, type), false);
1248 }
1249
1255 return mainJNI.RoutingModel_hasSameVehicleTypeRequirements(swigCPtr, this);
1256 }
1257
1259 return mainJNI.RoutingModel_hasTemporalTypeRequirements(swigCPtr, this);
1260 }
1261
1268 public long unperformedPenalty(long var_index) {
1269 return mainJNI.RoutingModel_unperformedPenalty(swigCPtr, this, var_index);
1270 }
1271
1277 public long unperformedPenaltyOrValue(long default_value, long var_index) {
1278 return mainJNI.RoutingModel_unperformedPenaltyOrValue(swigCPtr, this, default_value, var_index);
1279 }
1280
1286 public long getDepot() {
1287 return mainJNI.RoutingModel_getDepot(swigCPtr, this);
1288 }
1289
1296 public void SetMaximumNumberOfActiveVehicles(int max_active_vehicles) {
1297 mainJNI.RoutingModel_SetMaximumNumberOfActiveVehicles(swigCPtr, this, max_active_vehicles);
1298 }
1299
1304 return mainJNI.RoutingModel_GetMaximumNumberOfActiveVehicles(swigCPtr, this);
1305 }
1306
1312 public void setArcCostEvaluatorOfAllVehicles(int evaluator_index) {
1313 mainJNI.RoutingModel_setArcCostEvaluatorOfAllVehicles(swigCPtr, this, evaluator_index);
1314 }
1315
1319 public void setArcCostEvaluatorOfVehicle(int evaluator_index, int vehicle) {
1320 mainJNI.RoutingModel_setArcCostEvaluatorOfVehicle(swigCPtr, this, evaluator_index, vehicle);
1321 }
1322
1327 public void setFixedCostOfAllVehicles(long cost) {
1328 mainJNI.RoutingModel_setFixedCostOfAllVehicles(swigCPtr, this, cost);
1329 }
1330
1334 public void setFixedCostOfVehicle(long cost, int vehicle) {
1335 mainJNI.RoutingModel_setFixedCostOfVehicle(swigCPtr, this, cost, vehicle);
1336 }
1337
1343 public long getFixedCostOfVehicle(int vehicle) {
1344 return mainJNI.RoutingModel_getFixedCostOfVehicle(swigCPtr, this, vehicle);
1345 }
1346
1347 public void SetPathEnergyCostOfVehicle(String force, String distance, long unit_cost, int vehicle) {
1348 mainJNI.RoutingModel_SetPathEnergyCostOfVehicle(swigCPtr, this, force, distance, unit_cost, vehicle);
1349 }
1350
1368 public void setAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor) {
1369 mainJNI.RoutingModel_setAmortizedCostFactorsOfAllVehicles(swigCPtr, this, linear_cost_factor, quadratic_cost_factor);
1370 }
1371
1375 public void setAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle) {
1376 mainJNI.RoutingModel_setAmortizedCostFactorsOfVehicle(swigCPtr, this, linear_cost_factor, quadratic_cost_factor, vehicle);
1377 }
1378
1380 return mainJNI.RoutingModel_getAmortizedLinearCostFactorOfVehicles(swigCPtr, this);
1381}
1382
1384 return mainJNI.RoutingModel_getAmortizedQuadraticCostFactorOfVehicles(swigCPtr, this);
1385}
1386
1387 public void SetVehicleUsedWhenEmpty(boolean is_used, int vehicle) {
1388 mainJNI.RoutingModel_SetVehicleUsedWhenEmpty(swigCPtr, this, is_used, vehicle);
1389 }
1390
1391 public boolean IsVehicleUsedWhenEmpty(int vehicle) {
1392 return mainJNI.RoutingModel_IsVehicleUsedWhenEmpty(swigCPtr, this, vehicle);
1393 }
1394
1400 public void setFirstSolutionEvaluator(LongBinaryOperator evaluator) {
1401 mainJNI.RoutingModel_setFirstSolutionEvaluator(swigCPtr, this, evaluator);
1402 }
1403
1409 mainJNI.RoutingModel_addLocalSearchOperator(swigCPtr, this, LocalSearchOperator.getCPtr(ls_operator), ls_operator);
1410 }
1411
1415 public void addSearchMonitor(SearchMonitor monitor) {
1416 mainJNI.RoutingModel_addSearchMonitor(swigCPtr, this, SearchMonitor.getCPtr(monitor), monitor);
1417 }
1418
1427 public void addAtSolutionCallback(Runnable callback, boolean track_unchecked_neighbors) {
1428 mainJNI.RoutingModel_addAtSolutionCallback__SWIG_0(swigCPtr, this, callback, track_unchecked_neighbors);
1429 }
1430
1439 public void addAtSolutionCallback(Runnable callback) {
1440 mainJNI.RoutingModel_addAtSolutionCallback__SWIG_1(swigCPtr, this, callback);
1441 }
1442
1450 mainJNI.RoutingModel_addVariableMinimizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var);
1451 }
1452
1458 mainJNI.RoutingModel_addVariableMaximizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var);
1459 }
1460
1466 mainJNI.RoutingModel_AddWeightedVariableMinimizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, cost);
1467 }
1468
1474 mainJNI.RoutingModel_AddWeightedVariableMaximizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, cost);
1475 }
1476
1481 public void addVariableTargetToFinalizer(IntVar var, long target) {
1482 mainJNI.RoutingModel_addVariableTargetToFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, target);
1483 }
1484
1489 public void AddWeightedVariableTargetToFinalizer(IntVar var, long target, long cost) {
1490 mainJNI.RoutingModel_AddWeightedVariableTargetToFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, target, cost);
1491 }
1492
1501 public void closeModel() {
1502 mainJNI.RoutingModel_closeModel(swigCPtr, this);
1503 }
1504
1509 public void closeModelWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1510 mainJNI.RoutingModel_closeModelWithParameters(swigCPtr, this, search_parameters.toByteArray());
1511 }
1512
1521 public Assignment solve(Assignment assignment) {
1522 long cPtr = mainJNI.RoutingModel_solve__SWIG_0(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
1523 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1524 }
1525
1535 long cPtr = mainJNI.RoutingModel_solve__SWIG_1(swigCPtr, this);
1536 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1537 }
1538
1548 public Assignment solveWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1549 long cPtr = mainJNI.RoutingModel_solveWithParameters(swigCPtr, this, search_parameters.toByteArray());
1550 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1551 }
1552
1557 public Assignment solveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1558 long cPtr = mainJNI.RoutingModel_solveFromAssignmentWithParameters(swigCPtr, this, Assignment.getCPtr(assignment), assignment, search_parameters.toByteArray());
1559 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1560 }
1561
1568 public Assignment FastSolveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, boolean check_solution_in_cp, SWIGTYPE_p_absl__flat_hash_setT_operations_research__IntVar_p_t touched) {
1569 long cPtr = mainJNI.RoutingModel_FastSolveFromAssignmentWithParameters__SWIG_0(swigCPtr, this, Assignment.getCPtr(assignment), assignment, search_parameters.toByteArray(), check_solution_in_cp, SWIGTYPE_p_absl__flat_hash_setT_operations_research__IntVar_p_t.getCPtr(touched));
1570 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1571 }
1572
1579 public Assignment FastSolveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, boolean check_solution_in_cp) {
1580 long cPtr = mainJNI.RoutingModel_FastSolveFromAssignmentWithParameters__SWIG_1(swigCPtr, this, Assignment.getCPtr(assignment), assignment, search_parameters.toByteArray(), check_solution_in_cp);
1581 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1582 }
1583
1588 public Assignment SolveFromAssignmentsWithParameters(SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t assignments, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t solutions) {
1589 long cPtr = mainJNI.RoutingModel_SolveFromAssignmentsWithParameters__SWIG_0(swigCPtr, this, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t.getCPtr(assignments), search_parameters.toByteArray(), SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t.getCPtr(solutions));
1590 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1591 }
1592
1597 public Assignment SolveFromAssignmentsWithParameters(SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t assignments, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1598 long cPtr = mainJNI.RoutingModel_SolveFromAssignmentsWithParameters__SWIG_1(swigCPtr, this, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t.getCPtr(assignments), search_parameters.toByteArray());
1599 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1600 }
1601
1606 public Assignment SolveWithIteratedLocalSearch(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1607 long cPtr = mainJNI.RoutingModel_SolveWithIteratedLocalSearch(swigCPtr, this, search_parameters.toByteArray());
1608 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1609 }
1610
1618 public void setAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment) {
1619 mainJNI.RoutingModel_setAssignmentFromOtherModelAssignment(swigCPtr, this, Assignment.getCPtr(target_assignment), target_assignment, RoutingModel.getCPtr(source_model), source_model, Assignment.getCPtr(source_assignment), source_assignment);
1620 }
1621
1629 public long computeLowerBound() {
1630 return mainJNI.RoutingModel_computeLowerBound(swigCPtr, this);
1631 }
1632
1638 return mainJNI.RoutingModel_objective_lower_bound(swigCPtr, this);
1639 }
1640
1644 public int status() {
1645 return mainJNI.RoutingModel_status(swigCPtr, this);
1646 }
1647
1651 public boolean enable_deep_serialization() {
1652 return mainJNI.RoutingModel_enable_deep_serialization(swigCPtr, this);
1653 }
1654
1665 public IntVar applyLocks(long[] locks) {
1666 long cPtr = mainJNI.RoutingModel_applyLocks(swigCPtr, this, locks);
1667 return (cPtr == 0) ? null : new IntVar(cPtr, false);
1668 }
1669
1680 public boolean applyLocksToAllVehicles(long[][] locks, boolean close_routes) {
1681 return mainJNI.RoutingModel_applyLocksToAllVehicles(swigCPtr, this, locks, close_routes);
1682 }
1683
1691 long cPtr = mainJNI.RoutingModel_preAssignment(swigCPtr, this);
1692 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1693 }
1694
1696 long cPtr = mainJNI.RoutingModel_mutablePreAssignment(swigCPtr, this);
1697 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1698 }
1699
1705 public boolean writeAssignment(String file_name) {
1706 return mainJNI.RoutingModel_writeAssignment(swigCPtr, this, file_name);
1707 }
1708
1714 public Assignment readAssignment(String file_name) {
1715 long cPtr = mainJNI.RoutingModel_readAssignment(swigCPtr, this, file_name);
1716 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1717 }
1718
1724 long cPtr = mainJNI.RoutingModel_restoreAssignment(swigCPtr, this, Assignment.getCPtr(solution), solution);
1725 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1726 }
1727
1735 public Assignment readAssignmentFromRoutes(long[][] routes, boolean ignore_inactive_indices) {
1736 long cPtr = mainJNI.RoutingModel_readAssignmentFromRoutes(swigCPtr, this, routes, ignore_inactive_indices);
1737 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1738 }
1739
1758 public boolean routesToAssignment(long[][] routes, boolean ignore_inactive_indices, boolean close_routes, Assignment assignment) {
1759 return mainJNI.RoutingModel_routesToAssignment(swigCPtr, this, routes, ignore_inactive_indices, close_routes, Assignment.getCPtr(assignment), assignment);
1760 }
1761
1767 public void assignmentToRoutes(Assignment assignment, long[][] routes) {
1768 mainJNI.RoutingModel_assignmentToRoutes(swigCPtr, this, Assignment.getCPtr(assignment), assignment, routes);
1769 }
1770
1795 long cPtr = mainJNI.RoutingModel_compactAssignment(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
1796 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1797 }
1798
1805 long cPtr = mainJNI.RoutingModel_compactAndCheckAssignment(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
1806 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1807 }
1808
1812 public void addToAssignment(IntVar var) {
1813 mainJNI.RoutingModel_addToAssignment(swigCPtr, this, IntVar.getCPtr(var), var);
1814 }
1815
1816 public void addIntervalToAssignment(IntervalVar interval) {
1817 mainJNI.RoutingModel_addIntervalToAssignment(swigCPtr, this, IntervalVar.getCPtr(interval), interval);
1818 }
1819
1824 static public class RouteDimensionTravelInfo {
1825 private transient long swigCPtr;
1826 protected transient boolean swigCMemOwn;
1827
1828 public RouteDimensionTravelInfo(long cPtr, boolean cMemoryOwn) {
1829 swigCMemOwn = cMemoryOwn;
1830 swigCPtr = cPtr;
1831 }
1832
1833 public static long getCPtr(RouteDimensionTravelInfo obj) {
1834 return (obj == null) ? 0 : obj.swigCPtr;
1835 }
1836
1837 public static long swigRelease(RouteDimensionTravelInfo obj) {
1838 long ptr = 0;
1839 if (obj != null) {
1840 if (!obj.swigCMemOwn)
1841 throw new RuntimeException("Cannot release ownership as memory is not owned");
1842 ptr = obj.swigCPtr;
1843 obj.swigCMemOwn = false;
1844 obj.delete();
1845 }
1846 return ptr;
1847 }
1848
1849 @SuppressWarnings({"deprecation", "removal"})
1850 protected void finalize() {
1851 delete();
1852 }
1853
1854 public synchronized void delete() {
1855 if (swigCPtr != 0) {
1856 if (swigCMemOwn) {
1857 swigCMemOwn = false;
1858 mainJNI.delete_RoutingModel_RouteDimensionTravelInfo(swigCPtr);
1859 }
1860 swigCPtr = 0;
1861 }
1862 }
1863
1867 static public class TransitionInfo {
1868 private transient long swigCPtr;
1869 protected transient boolean swigCMemOwn;
1870
1871 public TransitionInfo(long cPtr, boolean cMemoryOwn) {
1872 swigCMemOwn = cMemoryOwn;
1873 swigCPtr = cPtr;
1874 }
1875
1876 public static long getCPtr(TransitionInfo obj) {
1877 return (obj == null) ? 0 : obj.swigCPtr;
1878 }
1879
1880 public static long swigRelease(TransitionInfo obj) {
1881 long ptr = 0;
1882 if (obj != null) {
1883 if (!obj.swigCMemOwn)
1884 throw new RuntimeException("Cannot release ownership as memory is not owned");
1885 ptr = obj.swigCPtr;
1886 obj.swigCMemOwn = false;
1887 obj.delete();
1888 }
1889 return ptr;
1890 }
1891
1892 @SuppressWarnings({"deprecation", "removal"})
1893 protected void finalize() {
1894 delete();
1895 }
1896
1897 public synchronized void delete() {
1898 if (swigCPtr != 0) {
1899 if (swigCMemOwn) {
1900 swigCMemOwn = false;
1901 mainJNI.delete_RoutingModel_RouteDimensionTravelInfo_TransitionInfo(swigCPtr);
1902 }
1903 swigCPtr = 0;
1904 }
1905 }
1906
1912 static public class PiecewiseLinearFormulation {
1913 private transient long swigCPtr;
1914 protected transient boolean swigCMemOwn;
1915
1916 public PiecewiseLinearFormulation(long cPtr, boolean cMemoryOwn) {
1917 swigCMemOwn = cMemoryOwn;
1918 swigCPtr = cPtr;
1919 }
1920
1921 public static long getCPtr(PiecewiseLinearFormulation obj) {
1922 return (obj == null) ? 0 : obj.swigCPtr;
1923 }
1924
1925 public static long swigRelease(PiecewiseLinearFormulation obj) {
1926 long ptr = 0;
1927 if (obj != null) {
1928 if (!obj.swigCMemOwn)
1929 throw new RuntimeException("Cannot release ownership as memory is not owned");
1930 ptr = obj.swigCPtr;
1931 obj.swigCMemOwn = false;
1932 obj.delete();
1933 }
1934 return ptr;
1935 }
1936
1937 @SuppressWarnings({"deprecation", "removal"})
1938 protected void finalize() {
1939 delete();
1940 }
1941
1942 public synchronized void delete() {
1943 if (swigCPtr != 0) {
1944 if (swigCMemOwn) {
1945 swigCMemOwn = false;
1946 mainJNI.delete_RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation(swigCPtr);
1947 }
1948 swigCPtr = 0;
1949 }
1950 }
1951
1955 public void setX_anchors(SWIGTYPE_p_absl__InlinedVectorT_long_8_t value) {
1956 mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation_x_anchors_set(swigCPtr, this, SWIGTYPE_p_absl__InlinedVectorT_long_8_t.getCPtr(value));
1957 }
1958
1962 public SWIGTYPE_p_absl__InlinedVectorT_long_8_t getX_anchors() {
1963 return new SWIGTYPE_p_absl__InlinedVectorT_long_8_t(mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation_x_anchors_get(swigCPtr, this), true);
1964 }
1965
1973 public void setY_anchors(SWIGTYPE_p_absl__InlinedVectorT_long_8_t value) {
1974 mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation_y_anchors_set(swigCPtr, this, SWIGTYPE_p_absl__InlinedVectorT_long_8_t.getCPtr(value));
1975 }
1976
1984 public SWIGTYPE_p_absl__InlinedVectorT_long_8_t getY_anchors() {
1985 return new SWIGTYPE_p_absl__InlinedVectorT_long_8_t(mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation_y_anchors_get(swigCPtr, this), true);
1986 }
1987
1988 public String toString(String line_prefix) {
1989 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation_toString__SWIG_0(swigCPtr, this, line_prefix);
1990 }
1991
1992 public String toString() {
1993 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation_toString__SWIG_1(swigCPtr, this);
1994 }
1995
1997 this(mainJNI.new_RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation(), true);
1998 }
1999
2000 }
2001
2007 mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_travel_start_dependent_travel_set(swigCPtr, this, RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation.getCPtr(value), value);
2008 }
2009
2014 public RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation getTravel_start_dependent_travel() {
2015 long cPtr = mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_travel_start_dependent_travel_get(swigCPtr, this);
2016 return (cPtr == 0) ? null : new RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation(cPtr, false);
2017 }
2018
2025 mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_travel_compression_cost_set(swigCPtr, this, RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation.getCPtr(value), value);
2026 }
2027
2033 public RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation getTravel_compression_cost() {
2034 long cPtr = mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_travel_compression_cost_get(swigCPtr, this);
2035 return (cPtr == 0) ? null : new RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation(cPtr, false);
2036 }
2037
2043 public void setPre_travel_transit_value(long value) {
2044 mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_pre_travel_transit_value_set(swigCPtr, this, value);
2045 }
2046
2053 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_pre_travel_transit_value_get(swigCPtr, this);
2054 }
2055
2056 public void setPost_travel_transit_value(long value) {
2057 mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_post_travel_transit_value_set(swigCPtr, this, value);
2058 }
2059
2061 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_post_travel_transit_value_get(swigCPtr, this);
2062 }
2063
2069 mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_compressed_travel_value_lower_bound_set(swigCPtr, this, value);
2070 }
2071
2077 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_compressed_travel_value_lower_bound_get(swigCPtr, this);
2078 }
2079
2086 public void setTravel_value_upper_bound(long value) {
2087 mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_travel_value_upper_bound_set(swigCPtr, this, value);
2088 }
2089
2097 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_travel_value_upper_bound_get(swigCPtr, this);
2098 }
2099
2100 public String toString(String line_prefix) {
2101 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_toString__SWIG_0(swigCPtr, this, line_prefix);
2102 }
2103
2104 public String toString() {
2105 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_toString__SWIG_1(swigCPtr, this);
2106 }
2107
2109 this(mainJNI.new_RoutingModel_RouteDimensionTravelInfo_TransitionInfo(), true);
2110 }
2111
2112 }
2113
2118 public void setTransition_info(SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__RouteDimensionTravelInfo__TransitionInfo_t value) {
2119 mainJNI.RoutingModel_RouteDimensionTravelInfo_transition_info_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__RouteDimensionTravelInfo__TransitionInfo_t.getCPtr(value));
2120 }
2121
2126 public SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__RouteDimensionTravelInfo__TransitionInfo_t getTransition_info() {
2127 long cPtr = mainJNI.RoutingModel_RouteDimensionTravelInfo_transition_info_get(swigCPtr, this);
2128 return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__RouteDimensionTravelInfo__TransitionInfo_t(cPtr, false);
2129 }
2130
2134 public void setTravel_cost_coefficient(long value) {
2135 mainJNI.RoutingModel_RouteDimensionTravelInfo_travel_cost_coefficient_set(swigCPtr, this, value);
2136 }
2137
2142 return mainJNI.RoutingModel_RouteDimensionTravelInfo_travel_cost_coefficient_get(swigCPtr, this);
2143 }
2144
2145 public String toString(String line_prefix) {
2146 return mainJNI.RoutingModel_RouteDimensionTravelInfo_toString__SWIG_0(swigCPtr, this, line_prefix);
2147 }
2148
2149 public String toString() {
2150 return mainJNI.RoutingModel_RouteDimensionTravelInfo_toString__SWIG_1(swigCPtr, this);
2151 }
2152
2154 this(mainJNI.new_RoutingModel_RouteDimensionTravelInfo(), true);
2155 }
2156
2157 }
2158
2159 static public class NodeNeighborsByCostClass {
2160 private transient long swigCPtr;
2161 protected transient boolean swigCMemOwn;
2162
2163 public NodeNeighborsByCostClass(long cPtr, boolean cMemoryOwn) {
2164 swigCMemOwn = cMemoryOwn;
2165 swigCPtr = cPtr;
2166 }
2167
2168 public static long getCPtr(NodeNeighborsByCostClass obj) {
2169 return (obj == null) ? 0 : obj.swigCPtr;
2170 }
2171
2172 public static long swigRelease(NodeNeighborsByCostClass obj) {
2173 long ptr = 0;
2174 if (obj != null) {
2175 if (!obj.swigCMemOwn)
2176 throw new RuntimeException("Cannot release ownership as memory is not owned");
2177 ptr = obj.swigCPtr;
2178 obj.swigCMemOwn = false;
2179 obj.delete();
2180 }
2181 return ptr;
2182 }
2183
2184 @SuppressWarnings({"deprecation", "removal"})
2185 protected void finalize() {
2186 delete();
2187 }
2188
2189 public synchronized void delete() {
2190 if (swigCPtr != 0) {
2191 if (swigCMemOwn) {
2192 swigCMemOwn = false;
2193 mainJNI.delete_RoutingModel_NodeNeighborsByCostClass(swigCPtr);
2194 }
2195 swigCPtr = 0;
2196 }
2197 }
2198
2200 this(mainJNI.new_RoutingModel_NodeNeighborsByCostClass(), true);
2201 }
2202
2207 public void ComputeNeighbors(RoutingModel routing_model, int num_neighbors, boolean add_vehicle_starts_to_neighbors) {
2208 mainJNI.RoutingModel_NodeNeighborsByCostClass_ComputeNeighbors(swigCPtr, this, RoutingModel.getCPtr(routing_model), routing_model, num_neighbors, add_vehicle_starts_to_neighbors);
2209 }
2210
2214 public int[] GetNeighborsOfNodeForCostClass(int cost_class, int node_index) {
2215 return mainJNI.RoutingModel_NodeNeighborsByCostClass_GetNeighborsOfNodeForCostClass(swigCPtr, this, cost_class, node_index);
2216 }
2217
2218 }
2219
2226 public RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio, long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used, boolean add_vehicle_starts_to_neighbors) {
2227 long cPtr = mainJNI.RoutingModel_GetOrCreateNodeNeighborsByCostClass__SWIG_0(swigCPtr, this, neighbors_ratio, min_neighbors, SWIGTYPE_p_double.getCPtr(neighbors_ratio_used), add_vehicle_starts_to_neighbors);
2228 return (cPtr == 0) ? null : new RoutingModel.NodeNeighborsByCostClass(cPtr, false);
2229 }
2230
2237 public RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio, long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used) {
2238 long cPtr = mainJNI.RoutingModel_GetOrCreateNodeNeighborsByCostClass__SWIG_1(swigCPtr, this, neighbors_ratio, min_neighbors, SWIGTYPE_p_double.getCPtr(neighbors_ratio_used));
2239 return (cPtr == 0) ? null : new RoutingModel.NodeNeighborsByCostClass(cPtr, false);
2240 }
2241
2246 public RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(int num_neighbors, boolean add_vehicle_starts_to_neighbors) {
2247 long cPtr = mainJNI.RoutingModel_GetOrCreateNodeNeighborsByCostClass__SWIG_2(swigCPtr, this, num_neighbors, add_vehicle_starts_to_neighbors);
2248 return (cPtr == 0) ? null : new RoutingModel.NodeNeighborsByCostClass(cPtr, false);
2249 }
2250
2255 public RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(int num_neighbors) {
2256 long cPtr = mainJNI.RoutingModel_GetOrCreateNodeNeighborsByCostClass__SWIG_3(swigCPtr, this, num_neighbors);
2257 return (cPtr == 0) ? null : new RoutingModel.NodeNeighborsByCostClass(cPtr, false);
2258 }
2259
2268 mainJNI.RoutingModel_addLocalSearchFilter(swigCPtr, this, LocalSearchFilter.getCPtr(filter), filter);
2269 }
2270
2275 public long start(int vehicle) {
2276 return mainJNI.RoutingModel_start(swigCPtr, this, vehicle);
2277 }
2278
2282 public long end(int vehicle) {
2283 return mainJNI.RoutingModel_end(swigCPtr, this, vehicle);
2284 }
2285
2289 public boolean isStart(long index) {
2290 return mainJNI.RoutingModel_isStart(swigCPtr, this, index);
2291 }
2292
2296 public boolean isEnd(long index) {
2297 return mainJNI.RoutingModel_isEnd(swigCPtr, this, index);
2298 }
2299
2304 public int VehicleIndex(long index) {
2305 return mainJNI.RoutingModel_VehicleIndex(swigCPtr, this, index);
2306 }
2307
2313 public long next(Assignment assignment, long index) {
2314 return mainJNI.RoutingModel_next(swigCPtr, this, Assignment.getCPtr(assignment), assignment, index);
2315 }
2316
2320 public boolean isVehicleUsed(Assignment assignment, int vehicle) {
2321 return mainJNI.RoutingModel_isVehicleUsed(swigCPtr, this, Assignment.getCPtr(assignment), assignment, vehicle);
2322 }
2323
2328 public IntVar[] nexts() {
2329 return mainJNI.RoutingModel_nexts(swigCPtr, this);
2330}
2331
2336 public IntVar[] vehicleVars() {
2337 return mainJNI.RoutingModel_vehicleVars(swigCPtr, this);
2338}
2339
2345 public IntVar[] ResourceVars(int resource_group) {
2346 return mainJNI.RoutingModel_ResourceVars(swigCPtr, this, resource_group);
2347}
2348
2353 public IntVar nextVar(long index) {
2354 long cPtr = mainJNI.RoutingModel_nextVar(swigCPtr, this, index);
2355 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2356 }
2357
2361 public IntVar activeVar(long index) {
2362 long cPtr = mainJNI.RoutingModel_activeVar(swigCPtr, this, index);
2363 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2364 }
2365
2370 public IntVar activeVehicleVar(int vehicle) {
2371 long cPtr = mainJNI.RoutingModel_activeVehicleVar(swigCPtr, this, vehicle);
2372 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2373 }
2374
2380 public IntVar VehicleRouteConsideredVar(int vehicle) {
2381 long cPtr = mainJNI.RoutingModel_VehicleRouteConsideredVar(swigCPtr, this, vehicle);
2382 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2383 }
2384
2389 public IntVar vehicleVar(long index) {
2390 long cPtr = mainJNI.RoutingModel_vehicleVar(swigCPtr, this, index);
2391 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2392 }
2393
2399 public IntVar ResourceVar(int vehicle, int resource_group) {
2400 long cPtr = mainJNI.RoutingModel_ResourceVar(swigCPtr, this, vehicle, resource_group);
2401 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2402 }
2403
2407 public IntVar costVar() {
2408 long cPtr = mainJNI.RoutingModel_costVar(swigCPtr, this);
2409 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2410 }
2411
2416 public long getArcCostForVehicle(long from_index, long to_index, long vehicle) {
2417 return mainJNI.RoutingModel_getArcCostForVehicle(swigCPtr, this, from_index, to_index, vehicle);
2418 }
2419
2424 return mainJNI.RoutingModel_costsAreHomogeneousAcrossVehicles(swigCPtr, this);
2425 }
2426
2431 public long getHomogeneousCost(long from_index, long to_index) {
2432 return mainJNI.RoutingModel_getHomogeneousCost(swigCPtr, this, from_index, to_index);
2433 }
2434
2439 public long getArcCostForFirstSolution(long from_index, long to_index) {
2440 return mainJNI.RoutingModel_getArcCostForFirstSolution(swigCPtr, this, from_index, to_index);
2441 }
2442
2451 public long getArcCostForClass(long from_index, long to_index, long cost_class_index) {
2452 return mainJNI.RoutingModel_getArcCostForClass(swigCPtr, this, from_index, to_index, cost_class_index);
2453 }
2454
2458 public int getCostClassIndexOfVehicle(long vehicle) {
2459 return mainJNI.RoutingModel_getCostClassIndexOfVehicle(swigCPtr, this, vehicle);
2460}
2461
2466 public boolean hasVehicleWithCostClassIndex(int cost_class_index) {
2467 return mainJNI.RoutingModel_hasVehicleWithCostClassIndex(swigCPtr, this, cost_class_index);
2468 }
2469
2473 public int getCostClassesCount() {
2474 return mainJNI.RoutingModel_getCostClassesCount(swigCPtr, this);
2475 }
2476
2481 return mainJNI.RoutingModel_getNonZeroCostClassesCount(swigCPtr, this);
2482 }
2483
2484 public int getVehicleClassIndexOfVehicle(long vehicle) {
2485 return mainJNI.RoutingModel_getVehicleClassIndexOfVehicle(swigCPtr, this, vehicle);
2486}
2487
2492 public int GetVehicleOfClass(int vehicle_class) {
2493 return mainJNI.RoutingModel_GetVehicleOfClass(swigCPtr, this, vehicle_class);
2494 }
2495
2500 return mainJNI.RoutingModel_getVehicleClassesCount(swigCPtr, this);
2501 }
2502
2506 public int[] getSameVehicleIndicesOfIndex(int node) {
2507 return mainJNI.RoutingModel_getSameVehicleIndicesOfIndex(swigCPtr, this, node);
2508}
2509
2510 public RoutingModel.VehicleTypeContainer GetVehicleTypeContainer() {
2511 return new RoutingModel.VehicleTypeContainer(mainJNI.RoutingModel_GetVehicleTypeContainer(swigCPtr, this), false);
2512 }
2513
2534 public boolean arcIsMoreConstrainedThanArc(long from, long to1, long to2) {
2535 return mainJNI.RoutingModel_arcIsMoreConstrainedThanArc(swigCPtr, this, from, to1, to2);
2536 }
2537
2544 public String debugOutputAssignment(Assignment solution_assignment, String dimension_to_print) {
2545 return mainJNI.RoutingModel_debugOutputAssignment(swigCPtr, this, Assignment.getCPtr(solution_assignment), solution_assignment, dimension_to_print);
2546 }
2547
2556 public boolean CheckIfAssignmentIsFeasible(Assignment assignment, boolean call_at_solution_monitors) {
2557 return mainJNI.RoutingModel_CheckIfAssignmentIsFeasible(swigCPtr, this, Assignment.getCPtr(assignment), assignment, call_at_solution_monitors);
2558 }
2559
2564 public Solver solver() {
2565 long cPtr = mainJNI.RoutingModel_solver(swigCPtr, this);
2566 return (cPtr == 0) ? null : new Solver(cPtr, false);
2567 }
2568
2573 public boolean checkLimit(SWIGTYPE_p_absl__Duration offset) {
2574 return mainJNI.RoutingModel_checkLimit__SWIG_0(swigCPtr, this, SWIGTYPE_p_absl__Duration.getCPtr(offset));
2575 }
2576
2581 public boolean checkLimit() {
2582 return mainJNI.RoutingModel_checkLimit__SWIG_1(swigCPtr, this);
2583 }
2584
2588 public void UpdateTimeLimit(SWIGTYPE_p_absl__Duration time_limit) {
2589 mainJNI.RoutingModel_UpdateTimeLimit(swigCPtr, this, SWIGTYPE_p_absl__Duration.getCPtr(time_limit));
2590 }
2591
2595 public SWIGTYPE_p_absl__Duration TimeBuffer() {
2596 return new SWIGTYPE_p_absl__Duration(mainJNI.RoutingModel_TimeBuffer(swigCPtr, this), true);
2597 }
2598
2602 public SWIGTYPE_p_std__atomicT_bool_t GetMutableCPSatInterrupt() {
2603 long cPtr = mainJNI.RoutingModel_GetMutableCPSatInterrupt(swigCPtr, this);
2604 return (cPtr == 0) ? null : new SWIGTYPE_p_std__atomicT_bool_t(cPtr, false);
2605 }
2606
2610 public SWIGTYPE_p_std__atomicT_bool_t GetMutableCPInterrupt() {
2611 long cPtr = mainJNI.RoutingModel_GetMutableCPInterrupt(swigCPtr, this);
2612 return (cPtr == 0) ? null : new SWIGTYPE_p_std__atomicT_bool_t(cPtr, false);
2613 }
2614
2618 public void CancelSearch() {
2619 mainJNI.RoutingModel_CancelSearch(swigCPtr, this);
2620 }
2621
2626 public int nodes() {
2627 return mainJNI.RoutingModel_nodes(swigCPtr, this);
2628 }
2629
2633 public int vehicles() {
2634 return mainJNI.RoutingModel_vehicles(swigCPtr, this);
2635 }
2636
2640 public long size() {
2641 return mainJNI.RoutingModel_size(swigCPtr, this);
2642 }
2643
2648 public long getNumberOfDecisionsInFirstSolution(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
2649 return mainJNI.RoutingModel_getNumberOfDecisionsInFirstSolution(swigCPtr, this, search_parameters.toByteArray());
2650 }
2651
2652 public long getNumberOfRejectsInFirstSolution(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
2653 return mainJNI.RoutingModel_getNumberOfRejectsInFirstSolution(swigCPtr, this, search_parameters.toByteArray());
2654 }
2655
2659 public boolean isMatchingModel() {
2660 return mainJNI.RoutingModel_isMatchingModel(swigCPtr, this);
2661 }
2662
2667 public boolean AreRoutesInterdependent(SWIGTYPE_p_operations_research__RoutingSearchParameters parameters) {
2668 return mainJNI.RoutingModel_AreRoutesInterdependent(swigCPtr, this, SWIGTYPE_p_operations_research__RoutingSearchParameters.getCPtr(parameters));
2669 }
2670
2685 public DecisionBuilder makeGuidedSlackFinalizer(RoutingDimension dimension, LongUnaryOperator initializer) {
2686 long cPtr = mainJNI.RoutingModel_makeGuidedSlackFinalizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension, initializer);
2687 return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
2688 }
2689
2706 long cPtr = mainJNI.RoutingModel_makeSelfDependentDimensionFinalizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
2707 return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
2708 }
2709
2711 return new PathsMetadata(mainJNI.RoutingModel_GetPathsMetadata(swigCPtr, this), false);
2712 }
2713
2714 // Status
2722 public final static int ROUTING_NOT_SOLVED = mainJNI.RoutingModel_ROUTING_NOT_SOLVED_get();
2726 public final static int ROUTING_SUCCESS = mainJNI.RoutingModel_ROUTING_SUCCESS_get();
2732 public final static int ROUTING_PARTIAL_SUCCESS_LOCAL_OPTIMUM_NOT_REACHED = mainJNI.RoutingModel_ROUTING_PARTIAL_SUCCESS_LOCAL_OPTIMUM_NOT_REACHED_get();
2736 public final static int ROUTING_FAIL = mainJNI.RoutingModel_ROUTING_FAIL_get();
2740 public final static int ROUTING_FAIL_TIMEOUT = mainJNI.RoutingModel_ROUTING_FAIL_TIMEOUT_get();
2744 public final static int ROUTING_INVALID = mainJNI.RoutingModel_ROUTING_INVALID_get();
2748 public final static int ROUTING_INFEASIBLE = mainJNI.RoutingModel_ROUTING_INFEASIBLE_get();
2752 public final static int ROUTING_OPTIMAL = mainJNI.RoutingModel_ROUTING_OPTIMAL_get();
2753
2754 // PickupAndDeliveryPolicy
2762 public final static int PICKUP_AND_DELIVERY_NO_ORDER = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_NO_ORDER_get();
2766 public final static int PICKUP_AND_DELIVERY_LIFO = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_LIFO_get();
2770 public final static int PICKUP_AND_DELIVERY_FIFO = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_FIFO_get();
2771
2772 // TransitEvaluatorSign
2777 public final static int kTransitEvaluatorSignUnknown = mainJNI.RoutingModel_kTransitEvaluatorSignUnknown_get();
2778 public final static int kTransitEvaluatorSignPositiveOrZero = mainJNI.RoutingModel_kTransitEvaluatorSignPositiveOrZero_get();
2779 public final static int kTransitEvaluatorSignNegativeOrZero = mainJNI.RoutingModel_kTransitEvaluatorSignNegativeOrZero_get();
2780
2781 // VisitTypePolicy
2799 public final static int TYPE_ADDED_TO_VEHICLE = mainJNI.RoutingModel_TYPE_ADDED_TO_VEHICLE_get();
2806 public final static int ADDED_TYPE_REMOVED_FROM_VEHICLE = mainJNI.RoutingModel_ADDED_TYPE_REMOVED_FROM_VEHICLE_get();
2811 public final static int TYPE_ON_VEHICLE_UP_TO_VISIT = mainJNI.RoutingModel_TYPE_ON_VEHICLE_UP_TO_VISIT_get();
2818 public final static int TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED = mainJNI.RoutingModel_TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED_get();
2819
2820}
void ComputeNeighbors(RoutingModel routing_model, int num_neighbors, boolean add_vehicle_starts_to_neighbors)
RoutingModel.ResourceGroup.Attributes GetDimensionAttributes(RoutingDimension dimension)
RoutingModel.ResourceGroup.Resource GetResource(int resource_index)
int AddResource(RoutingModel.ResourceGroup.Attributes attributes, RoutingDimension dimension)
SWIGTYPE_p_absl__flat_hash_setT_int_t GetResourcesMarkedAllowedForVehicle(int vehicle)
void SetAllowedResourcesForVehicle(int vehicle, int[] allowed_resource_indices)
SWIGTYPE_p_absl__flat_hash_setT_RoutingDimensionIndex_t GetAffectedDimensionIndices()
SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__ResourceGroup__Resource_t GetResources()
SWIGTYPE_p_util_intops__StrongVectorT_operations_research__RoutingModel__ResourceClassIndex_std__vectorT_int_t_t GetResourceIndicesPerClass()
void setTravel_start_dependent_travel(RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation value)
RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation getTravel_compression_cost()
RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation getTravel_start_dependent_travel()
void setTravel_compression_cost(RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation value)
SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__RouteDimensionTravelInfo__TransitionInfo_t getTransition_info()
void setTransition_info(SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__RouteDimensionTravelInfo__TransitionInfo_t value)
SecondaryOptimizer(RoutingModel model, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, long solve_period)
boolean Solve(SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__VariableValuePair_t in_state, SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__VariableValuePair_t out_state)
SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t getSorted_vehicle_classes_per_type()
void setSorted_vehicle_classes_per_type(SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t value)
SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t getVehicles_per_vehicle_class()
void setVehicles_per_vehicle_class(SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t value)
long getNumberOfDecisionsInFirstSolution(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)
Assignment FastSolveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, boolean check_solution_in_cp, SWIGTYPE_p_absl__flat_hash_setT_operations_research__IntVar_p_t touched)
long unperformedPenaltyOrValue(long default_value, long var_index)
SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer GetMutableGlobalCumulMPOptimizer(RoutingDimension dimension)
boolean routesToAssignment(long[][] routes, boolean ignore_inactive_indices, boolean close_routes, Assignment assignment)
int addDisjunction(long[] indices, long penalty, long max_cardinality)
SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__RoutingModel__ResourceGroup_t_t GetResourceGroups()
DecisionBuilder makeGuidedSlackFinalizer(RoutingDimension dimension, LongUnaryOperator initializer)
Assignment compactAssignment(Assignment assignment)
void setVisitType(long index, int type, int type_policy)
void addVariableTargetToFinalizer(IntVar var, long target)
int[] GetDimensionResourceGroupIndices(RoutingDimension dimension)
int addDisjunction(long[] indices, long penalty)
long next(Assignment assignment, long index)
IntBoolPair addConstantDimensionWithSlack(long value, long capacity, long slack_max, boolean fix_start_cumul_to_zero, String name)
void addAtSolutionCallback(Runnable callback, boolean track_unchecked_neighbors)
long getNumberOfRejectsInFirstSolution(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)
SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer GetMutableGlobalCumulLPOptimizer(RoutingDimension dimension)
RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(int num_neighbors)
IntBoolPair addMatrixDimension(long[][] values, long capacity, boolean fix_start_cumul_to_zero, String name)
boolean addDimensionWithVehicleTransitAndCapacity(int[] evaluator_indices, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, String name)
void setPrimaryConstrainedDimension(String dimension_name)
void setAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor)
int registerTransitCallback(LongBinaryOperator callback)
Assignment SolveWithIteratedLocalSearch(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)
void setArcCostEvaluatorOfVehicle(int evaluator_index, int vehicle)
void setArcCostEvaluatorOfAllVehicles(int evaluator_index)
Assignment compactAndCheckAssignment(Assignment assignment)
void addPickupAndDelivery(long pickup, long delivery)
SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t GetDimensionsWithLocalCumulOptimizers()
boolean applyLocksToAllVehicles(long[][] locks, boolean close_routes)
SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenAddingType(int type)
void closeModelWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)
RoutingModel(RoutingIndexManager index_manager)
SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_p_t GetUnaryDimensions()
boolean HasLocalCumulOptimizer(RoutingDimension dimension)
boolean addDimension(int evaluator_index, long slack_max, long capacity, boolean fix_start_cumul_to_zero, String name)
int registerUnaryTransitCallback(LongUnaryOperator callback)
IntBoolPair addConstantDimension(long value, long capacity, boolean fix_start_cumul_to_zero, String name)
Assignment FastSolveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, boolean check_solution_in_cp)
boolean addDimensionWithVehicleCapacity(int evaluator_index, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, String name)
void UpdateTimeLimit(SWIGTYPE_p_absl__Duration time_limit)
IntVar ResourceVar(int vehicle, int resource_group)
Assignment readAssignmentFromRoutes(long[][] routes, boolean ignore_inactive_indices)
Assignment restoreAssignment(Assignment solution)
RoutingModel.VehicleTypeContainer GetVehicleTypeContainer()
boolean isVehicleAllowedForIndex(int vehicle, long index)
void addLocalSearchOperator(LocalSearchOperator ls_operator)
int GetDimensionResourceGroupIndex(RoutingDimension dimension)
IntBoolPair addVectorDimension(long[] values, long capacity, boolean fix_start_cumul_to_zero, String name)
DecisionBuilder makeSelfDependentDimensionFinalizer(RoutingDimension dimension)
boolean addDimensionWithVehicleTransits(int[] evaluator_indices, long slack_max, long capacity, boolean fix_start_cumul_to_zero, String name)
Assignment SolveFromAssignmentsWithParameters(SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t assignments, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t solutions)
void AddWeightedVariableTargetToFinalizer(IntVar var, long target, long cost)
void SetMaximumNumberOfActiveVehicles(int max_active_vehicles)
RoutingDimension getDimensionOrDie(String dimension_name)
void addRequiredTypeAlternativesWhenRemovingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives)
void addSoftSameVehicleConstraint(long[] indices, long cost)
int registerUnaryTransitCallback(LongUnaryOperator callback, int sign)
Assignment solveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)
static final int TYPE_ADDED_TO_VEHICLE
VisitTypePolicy.
long getArcCostForVehicle(long from_index, long to_index, long vehicle)
void setFirstSolutionEvaluator(LongBinaryOperator evaluator)
boolean CheckIfAssignmentIsFeasible(Assignment assignment, boolean call_at_solution_monitors)
RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio, long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used)
SWIGTYPE_p_std__atomicT_bool_t GetMutableCPInterrupt()
void assignmentToRoutes(Assignment assignment, long[][] routes)
SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenRemovingType(int type)
boolean hasVehicleWithCostClassIndex(int cost_class_index)
Assignment solveWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)
Assignment SolveFromAssignmentsWithParameters(SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t assignments, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)
boolean HasGlobalCumulOptimizer(RoutingDimension dimension)
RoutingModel.ResourceGroup GetResourceGroup(int rg_index)
void AddWeightedVariableMaximizedByFinalizer(IntVar var, long cost)
static final int kTransitEvaluatorSignUnknown
TransitEvaluatorSign.
void setAllowedVehiclesForIndex(int[] vehicles, long index)
long getArcCostForFirstSolution(long from_index, long to_index)
void setPickupAndDeliveryPolicyOfVehicle(int policy, int vehicle)
RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio, long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used, boolean add_vehicle_starts_to_neighbors)
boolean isVehicleUsed(Assignment assignment, int vehicle)
void SetPathEnergyCostOfVehicle(String force, String distance, long unit_cost, int vehicle)
static final int PICKUP_AND_DELIVERY_NO_ORDER
PickupAndDeliveryPolicy.
void addRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives)
SWIGTYPE_p_absl__flat_hash_setT_int_t getTemporalTypeIncompatibilitiesOfType(int type)
void SetVehicleUsedWhenEmpty(boolean is_used, int vehicle)
long getArcCostForClass(long from_index, long to_index, long cost_class_index)
boolean AreRoutesInterdependent(SWIGTYPE_p_operations_research__RoutingSearchParameters parameters)
RoutingModel(long cPtr, boolean cMemoryOwn)
SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__PickupDeliveryPosition_t GetDeliveryPositions(long node_index)
RoutingDimension getMutableDimension(String dimension_name)
SWIGTYPE_p_operations_research__LocalDimensionCumulOptimizer GetMutableLocalCumulLPOptimizer(RoutingDimension dimension)
void AddWeightedVariableMinimizedByFinalizer(IntVar var, long cost)
SWIGTYPE_p_std__atomicT_bool_t GetMutableCPSatInterrupt()
String debugOutputAssignment(Assignment solution_assignment, String dimension_to_print)
void addTemporalTypeIncompatibility(int type1, int type2)
boolean checkLimit(SWIGTYPE_p_absl__Duration offset)
void setAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle)
void addLocalSearchFilter(LocalSearchFilter filter)
RoutingModel(RoutingIndexManager index_manager, com.google.ortools.constraintsolver.RoutingModelParameters parameters)
int registerTransitCallback(LongBinaryOperator callback, int sign)
boolean arcIsMoreConstrainedThanArc(long from, long to1, long to2)
SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t GetDimensionsWithGlobalCumulOptimizers()
SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__PickupDeliveryPosition_t GetPickupPositions(long node_index)
long getHomogeneousCost(long from_index, long to_index)
void setAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment)
RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(int num_neighbors, boolean add_vehicle_starts_to_neighbors)
void addPickupAndDeliverySets(int pickup_disjunction, int delivery_disjunction)
static long getCPtr(Domain obj)
Definition Domain.java:30