Google OR-Tools v9.12
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.3.0
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// Types from ConstraintSolver
12import com.google.ortools.constraintsolver.Assignment;
13import com.google.ortools.constraintsolver.DecisionBuilder;
14import com.google.ortools.constraintsolver.IntVar;
15import com.google.ortools.constraintsolver.IntervalVar;
16import com.google.ortools.constraintsolver.LocalSearchFilter;
17import com.google.ortools.constraintsolver.LocalSearchOperator;
18import com.google.ortools.constraintsolver.SearchMonitor;
19import com.google.ortools.constraintsolver.Solver;
20// Used to wrap Domain
21import com.google.ortools.util.Domain;
22// Used to wrap RoutingTransitCallback2
23// see https://docs.oracle.com/javase/8/docs/api/java/util/function/LongBinaryOperator.html
24import java.util.function.LongBinaryOperator;
25// Used to wrap RoutingTransitCallback1
26// see https://docs.oracle.com/javase/8/docs/api/java/util/function/LongUnaryOperator.html
27import java.util.function.LongUnaryOperator;
28
29public class RoutingModel {
30 private transient long swigCPtr;
31 protected transient boolean swigCMemOwn;
32
33 public RoutingModel(long cPtr, boolean cMemoryOwn) {
34 swigCMemOwn = cMemoryOwn;
35 swigCPtr = cPtr;
36 }
37
38 public static long getCPtr(RoutingModel obj) {
39 return (obj == null) ? 0 : obj.swigCPtr;
40 }
41
42 public static long swigRelease(RoutingModel obj) {
43 long ptr = 0;
44 if (obj != null) {
45 if (!obj.swigCMemOwn)
46 throw new RuntimeException("Cannot release ownership as memory is not owned");
47 ptr = obj.swigCPtr;
48 obj.swigCMemOwn = false;
49 obj.delete();
50 }
51 return ptr;
52 }
53
54 @SuppressWarnings({"deprecation", "removal"})
55 protected void finalize() {
56 delete();
57 }
58
59 public synchronized void delete() {
60 if (swigCPtr != 0) {
61 if (swigCMemOwn) {
62 swigCMemOwn = false;
63 mainJNI.delete_RoutingModel(swigCPtr);
64 }
65 swigCPtr = 0;
66 }
67 }
68
74 static public class VehicleTypeContainer {
75 private transient long swigCPtr;
76 protected transient boolean swigCMemOwn;
77
78 public VehicleTypeContainer(long cPtr, boolean cMemoryOwn) {
79 swigCMemOwn = cMemoryOwn;
80 swigCPtr = cPtr;
81 }
82
83 public static long getCPtr(VehicleTypeContainer obj) {
84 return (obj == null) ? 0 : obj.swigCPtr;
85 }
86
87 public static long swigRelease(VehicleTypeContainer obj) {
88 long ptr = 0;
89 if (obj != null) {
90 if (!obj.swigCMemOwn)
91 throw new RuntimeException("Cannot release ownership as memory is not owned");
92 ptr = obj.swigCPtr;
93 obj.swigCMemOwn = false;
94 obj.delete();
95 }
96 return ptr;
97 }
98
99 @SuppressWarnings({"deprecation", "removal"})
100 protected void finalize() {
101 delete();
102 }
103
104 public synchronized void delete() {
105 if (swigCPtr != 0) {
106 if (swigCMemOwn) {
107 swigCMemOwn = false;
108 mainJNI.delete_RoutingModel_VehicleTypeContainer(swigCPtr);
109 }
110 swigCPtr = 0;
111 }
112 }
113
114 static public class VehicleClassEntry {
115 private transient long swigCPtr;
116 protected transient boolean swigCMemOwn;
117
118 public VehicleClassEntry(long cPtr, boolean cMemoryOwn) {
119 swigCMemOwn = cMemoryOwn;
120 swigCPtr = cPtr;
121 }
122
123 public static long getCPtr(VehicleClassEntry obj) {
124 return (obj == null) ? 0 : obj.swigCPtr;
125 }
126
127 public static long swigRelease(VehicleClassEntry obj) {
128 long ptr = 0;
129 if (obj != null) {
130 if (!obj.swigCMemOwn)
131 throw new RuntimeException("Cannot release ownership as memory is not owned");
132 ptr = obj.swigCPtr;
133 obj.swigCMemOwn = false;
134 obj.delete();
135 }
136 return ptr;
137 }
138
139 @SuppressWarnings({"deprecation", "removal"})
140 protected void finalize() {
141 delete();
142 }
143
144 public synchronized void delete() {
145 if (swigCPtr != 0) {
146 if (swigCMemOwn) {
147 swigCMemOwn = false;
148 mainJNI.delete_RoutingModel_VehicleTypeContainer_VehicleClassEntry(swigCPtr);
149 }
150 swigCPtr = 0;
151 }
152 }
153
154 public void setVehicle_class(int value) {
155 mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_vehicle_class_set(swigCPtr, this, value);
156 }
157
158 public int getVehicle_class() {
159 return mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_vehicle_class_get(swigCPtr, this);
160 }
161
162 public void setFixed_cost(long value) {
163 mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_fixed_cost_set(swigCPtr, this, value);
164 }
165
166 public long getFixed_cost() {
167 return mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_fixed_cost_get(swigCPtr, this);
168 }
169
171 this(mainJNI.new_RoutingModel_VehicleTypeContainer_VehicleClassEntry(), true);
172 }
173
174 }
175
176 public int NumTypes() {
177 return mainJNI.RoutingModel_VehicleTypeContainer_NumTypes(swigCPtr, this);
178 }
179
180 public int Type(int vehicle) {
181 return mainJNI.RoutingModel_VehicleTypeContainer_Type(swigCPtr, this, vehicle);
182 }
183
184 public void setType_index_of_vehicle(int[] value) {
185 mainJNI.RoutingModel_VehicleTypeContainer_type_index_of_vehicle_set(swigCPtr, this, value);
186 }
187
189 return mainJNI.RoutingModel_VehicleTypeContainer_type_index_of_vehicle_get(swigCPtr, this);
190 }
191
192 public void setSorted_vehicle_classes_per_type(SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t value) {
193 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));
194 }
195
196 public SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t getSorted_vehicle_classes_per_type() {
197 long cPtr = mainJNI.RoutingModel_VehicleTypeContainer_sorted_vehicle_classes_per_type_get(swigCPtr, this);
198 return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t(cPtr, false);
199 }
200
201 public void setVehicles_per_vehicle_class(SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t value) {
202 mainJNI.RoutingModel_VehicleTypeContainer_vehicles_per_vehicle_class_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t.getCPtr(value));
203 }
204
205 public SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t getVehicles_per_vehicle_class() {
206 return new SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t(mainJNI.RoutingModel_VehicleTypeContainer_vehicles_per_vehicle_class_get(swigCPtr, this), true);
207 }
208
210 this(mainJNI.new_RoutingModel_VehicleTypeContainer(), true);
211 }
212
213 }
214
228 static public class ResourceGroup {
229 private transient long swigCPtr;
230 protected transient boolean swigCMemOwn;
231
232 public ResourceGroup(long cPtr, boolean cMemoryOwn) {
233 swigCMemOwn = cMemoryOwn;
234 swigCPtr = cPtr;
235 }
236
237 public static long getCPtr(ResourceGroup obj) {
238 return (obj == null) ? 0 : obj.swigCPtr;
239 }
240
241 public static long swigRelease(ResourceGroup obj) {
242 long ptr = 0;
243 if (obj != null) {
244 if (!obj.swigCMemOwn)
245 throw new RuntimeException("Cannot release ownership as memory is not owned");
246 ptr = obj.swigCPtr;
247 obj.swigCMemOwn = false;
248 obj.delete();
249 }
250 return ptr;
251 }
252
253 @SuppressWarnings({"deprecation", "removal"})
254 protected void finalize() {
255 delete();
256 }
257
258 public synchronized void delete() {
259 if (swigCPtr != 0) {
260 if (swigCMemOwn) {
261 swigCMemOwn = false;
262 mainJNI.delete_RoutingModel_ResourceGroup(swigCPtr);
263 }
264 swigCPtr = 0;
265 }
266 }
267
271 static public class Attributes {
272 private transient long swigCPtr;
273 protected transient boolean swigCMemOwn;
274
275 public Attributes(long cPtr, boolean cMemoryOwn) {
276 swigCMemOwn = cMemoryOwn;
277 swigCPtr = cPtr;
278 }
279
280 public static long getCPtr(Attributes obj) {
281 return (obj == null) ? 0 : obj.swigCPtr;
282 }
283
284 public static long swigRelease(Attributes obj) {
285 long ptr = 0;
286 if (obj != null) {
287 if (!obj.swigCMemOwn)
288 throw new RuntimeException("Cannot release ownership as memory is not owned");
289 ptr = obj.swigCPtr;
290 obj.swigCMemOwn = false;
291 obj.delete();
292 }
293 return ptr;
294 }
295
296 @SuppressWarnings({"deprecation", "removal"})
297 protected void finalize() {
298 delete();
299 }
300
301 public synchronized void delete() {
302 if (swigCPtr != 0) {
303 if (swigCMemOwn) {
304 swigCMemOwn = false;
305 mainJNI.delete_RoutingModel_ResourceGroup_Attributes(swigCPtr);
306 }
307 swigCPtr = 0;
308 }
309 }
310
311 public Attributes() {
312 this(mainJNI.new_RoutingModel_ResourceGroup_Attributes__SWIG_0(), true);
313 }
314
316 this(mainJNI.new_RoutingModel_ResourceGroup_Attributes__SWIG_1(Domain.getCPtr(start_domain), start_domain, Domain.getCPtr(end_domain), end_domain), true);
317 }
318
320 return new Domain(mainJNI.RoutingModel_ResourceGroup_Attributes_start_domain(swigCPtr, this), false);
321 }
322
324 return new Domain(mainJNI.RoutingModel_ResourceGroup_Attributes_end_domain(swigCPtr, this), false);
325 }
326
327 }
328
332 static public class Resource {
333 private transient long swigCPtr;
334 protected transient boolean swigCMemOwn;
335
336 public Resource(long cPtr, boolean cMemoryOwn) {
337 swigCMemOwn = cMemoryOwn;
338 swigCPtr = cPtr;
339 }
340
341 public static long getCPtr(Resource obj) {
342 return (obj == null) ? 0 : obj.swigCPtr;
343 }
344
345 public static long swigRelease(Resource obj) {
346 long ptr = 0;
347 if (obj != null) {
348 if (!obj.swigCMemOwn)
349 throw new RuntimeException("Cannot release ownership as memory is not owned");
350 ptr = obj.swigCPtr;
351 obj.swigCMemOwn = false;
352 obj.delete();
353 }
354 return ptr;
355 }
356
357 @SuppressWarnings({"deprecation", "removal"})
358 protected void finalize() {
359 delete();
360 }
361
362 public synchronized void delete() {
363 if (swigCPtr != 0) {
364 if (swigCMemOwn) {
365 swigCMemOwn = false;
366 mainJNI.delete_RoutingModel_ResourceGroup_Resource(swigCPtr);
367 }
368 swigCPtr = 0;
369 }
370 }
371
373 return new RoutingModel.ResourceGroup.Attributes(mainJNI.RoutingModel_ResourceGroup_Resource_GetDimensionAttributes(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension), false);
374 }
375
376 }
377
382 public int AddResource(RoutingModel.ResourceGroup.Attributes attributes, RoutingDimension dimension) {
383 return mainJNI.RoutingModel_ResourceGroup_AddResource(swigCPtr, this, RoutingModel.ResourceGroup.Attributes.getCPtr(attributes), attributes, RoutingDimension.getCPtr(dimension), dimension);
384 }
385
391 public void NotifyVehicleRequiresAResource(int vehicle) {
392 mainJNI.RoutingModel_ResourceGroup_NotifyVehicleRequiresAResource(swigCPtr, this, vehicle);
393 }
394
396 return mainJNI.RoutingModel_ResourceGroup_GetVehiclesRequiringAResource(swigCPtr, this);
397 }
398
399 public boolean VehicleRequiresAResource(int vehicle) {
400 return mainJNI.RoutingModel_ResourceGroup_VehicleRequiresAResource(swigCPtr, this, vehicle);
401 }
402
403 public void SetAllowedResourcesForVehicle(int vehicle, int[] allowed_resource_indices) {
404 mainJNI.RoutingModel_ResourceGroup_SetAllowedResourcesForVehicle(swigCPtr, this, vehicle, allowed_resource_indices);
405 }
406
407 public void ClearAllowedResourcesForVehicle(int vehicle) {
408 mainJNI.RoutingModel_ResourceGroup_ClearAllowedResourcesForVehicle(swigCPtr, this, vehicle);
409 }
410
411 public SWIGTYPE_p_absl__flat_hash_setT_int_t GetResourcesMarkedAllowedForVehicle(int vehicle) {
412 return new SWIGTYPE_p_absl__flat_hash_setT_int_t(mainJNI.RoutingModel_ResourceGroup_GetResourcesMarkedAllowedForVehicle(swigCPtr, this, vehicle), false);
413 }
414
415 public boolean IsResourceAllowedForVehicle(int resource, int vehicle) {
416 return mainJNI.RoutingModel_ResourceGroup_IsResourceAllowedForVehicle(swigCPtr, this, resource, vehicle);
417 }
418
419 public SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__ResourceGroup__Resource_t GetResources() {
420 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__ResourceGroup__Resource_t(mainJNI.RoutingModel_ResourceGroup_GetResources(swigCPtr, this), false);
421 }
422
424 return new RoutingModel.ResourceGroup.Resource(mainJNI.RoutingModel_ResourceGroup_GetResource(swigCPtr, this, resource_index), false);
425 }
426
427 public SWIGTYPE_p_absl__flat_hash_setT_RoutingDimensionIndex_t GetAffectedDimensionIndices() {
428 return new SWIGTYPE_p_absl__flat_hash_setT_RoutingDimensionIndex_t(mainJNI.RoutingModel_ResourceGroup_GetAffectedDimensionIndices(swigCPtr, this), false);
429 }
430
432 return mainJNI.RoutingModel_ResourceGroup_GetResourceClassesCount(swigCPtr, this);
433 }
434
435 public int[] GetResourceIndicesInClass(int resource_class) {
436 return mainJNI.RoutingModel_ResourceGroup_GetResourceIndicesInClass(swigCPtr, this, resource_class);
437 }
438
439 public SWIGTYPE_p_util_intops__StrongVectorT_operations_research__RoutingModel__ResourceClassIndex_std__vectorT_int_t_t GetResourceIndicesPerClass() {
440 return new SWIGTYPE_p_util_intops__StrongVectorT_operations_research__RoutingModel__ResourceClassIndex_std__vectorT_int_t_t(mainJNI.RoutingModel_ResourceGroup_GetResourceIndicesPerClass(swigCPtr, this), false);
441 }
442
443 public int GetResourceClassIndex(int resource_index) {
444 return mainJNI.RoutingModel_ResourceGroup_GetResourceClassIndex(swigCPtr, this, resource_index);
445 }
446
448 return new RoutingModel.ResourceGroup.Attributes(mainJNI.RoutingModel_ResourceGroup_GetDimensionAttributesForClass(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension, rc_index), false);
449 }
450
451 public int Size() {
452 return mainJNI.RoutingModel_ResourceGroup_Size(swigCPtr, this);
453 }
454
455 public int Index() {
456 return mainJNI.RoutingModel_ResourceGroup_Index(swigCPtr, this);
457 }
458
459 }
460
464 static public class VariableValuePair {
465 private transient long swigCPtr;
466 protected transient boolean swigCMemOwn;
467
468 public VariableValuePair(long cPtr, boolean cMemoryOwn) {
469 swigCMemOwn = cMemoryOwn;
470 swigCPtr = cPtr;
471 }
472
473 public static long getCPtr(VariableValuePair obj) {
474 return (obj == null) ? 0 : obj.swigCPtr;
475 }
476
477 public static long swigRelease(VariableValuePair obj) {
478 long ptr = 0;
479 if (obj != null) {
480 if (!obj.swigCMemOwn)
481 throw new RuntimeException("Cannot release ownership as memory is not owned");
482 ptr = obj.swigCPtr;
483 obj.swigCMemOwn = false;
484 obj.delete();
485 }
486 return ptr;
487 }
488
489 @SuppressWarnings({"deprecation", "removal"})
490 protected void finalize() {
491 delete();
492 }
493
494 public synchronized void delete() {
495 if (swigCPtr != 0) {
496 if (swigCMemOwn) {
497 swigCMemOwn = false;
498 mainJNI.delete_RoutingModel_VariableValuePair(swigCPtr);
499 }
500 swigCPtr = 0;
501 }
502 }
503
504 public void setVar_index(int value) {
505 mainJNI.RoutingModel_VariableValuePair_var_index_set(swigCPtr, this, value);
506 }
507
508 public int getVar_index() {
509 return mainJNI.RoutingModel_VariableValuePair_var_index_get(swigCPtr, this);
510 }
511
512 public void setValue(long value) {
513 mainJNI.RoutingModel_VariableValuePair_value_set(swigCPtr, this, value);
514 }
515
516 public long getValue() {
517 return mainJNI.RoutingModel_VariableValuePair_value_get(swigCPtr, this);
518 }
519
521 this(mainJNI.new_RoutingModel_VariableValuePair(), true);
522 }
523
524 }
525
529 static public class SecondaryOptimizer {
530 private transient long swigCPtr;
531 protected transient boolean swigCMemOwn;
532
533 public SecondaryOptimizer(long cPtr, boolean cMemoryOwn) {
534 swigCMemOwn = cMemoryOwn;
535 swigCPtr = cPtr;
536 }
537
538 public static long getCPtr(SecondaryOptimizer obj) {
539 return (obj == null) ? 0 : obj.swigCPtr;
540 }
541
542 public static long swigRelease(SecondaryOptimizer obj) {
543 long ptr = 0;
544 if (obj != null) {
545 if (!obj.swigCMemOwn)
546 throw new RuntimeException("Cannot release ownership as memory is not owned");
547 ptr = obj.swigCPtr;
548 obj.swigCMemOwn = false;
549 obj.delete();
550 }
551 return ptr;
552 }
553
554 @SuppressWarnings({"deprecation", "removal"})
555 protected void finalize() {
556 delete();
557 }
558
559 public synchronized void delete() {
560 if (swigCPtr != 0) {
561 if (swigCMemOwn) {
562 swigCMemOwn = false;
563 mainJNI.delete_RoutingModel_SecondaryOptimizer(swigCPtr);
564 }
565 swigCPtr = 0;
566 }
567 }
568
569 public SecondaryOptimizer(RoutingModel model, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, long solve_period) {
570 this(mainJNI.new_RoutingModel_SecondaryOptimizer(RoutingModel.getCPtr(model), model, search_parameters.toByteArray(), solve_period), true);
571 }
572
573 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) {
574 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));
575 }
576
577 }
578
582 public static long getKNoPenalty() {
583 return mainJNI.RoutingModel_kNoPenalty_get();
584 }
585
590 public static int getKNoDisjunction() {
591 return mainJNI.RoutingModel_kNoDisjunction_get();
592}
593
598 public static int getKNoDimension() {
599 return mainJNI.RoutingModel_kNoDimension_get();
600}
601
607 public RoutingModel(RoutingIndexManager index_manager) {
608 this(mainJNI.new_RoutingModel__SWIG_0(RoutingIndexManager.getCPtr(index_manager), index_manager), true);
609 }
610
611 public RoutingModel(RoutingIndexManager index_manager, com.google.ortools.constraintsolver.RoutingModelParameters parameters) {
612 this(mainJNI.new_RoutingModel__SWIG_1(RoutingIndexManager.getCPtr(index_manager), index_manager, parameters.toByteArray()), true);
613 }
614
622 public int registerUnaryTransitVector(long[] values) {
623 return mainJNI.RoutingModel_registerUnaryTransitVector(swigCPtr, this, values);
624 }
625
626 public int registerUnaryTransitCallback(LongUnaryOperator callback, int sign) {
627 return mainJNI.RoutingModel_registerUnaryTransitCallback__SWIG_0(swigCPtr, this, callback, sign);
628 }
629
630 public int registerUnaryTransitCallback(LongUnaryOperator callback) {
631 return mainJNI.RoutingModel_registerUnaryTransitCallback__SWIG_1(swigCPtr, this, callback);
632 }
633
634 public int registerTransitMatrix(long[][] values) {
635 return mainJNI.RoutingModel_registerTransitMatrix(swigCPtr, this, values);
636 }
637
638 public int registerTransitCallback(LongBinaryOperator callback, int sign) {
639 return mainJNI.RoutingModel_registerTransitCallback__SWIG_0(swigCPtr, this, callback, sign);
640 }
641
642 public int registerTransitCallback(LongBinaryOperator callback) {
643 return mainJNI.RoutingModel_registerTransitCallback__SWIG_1(swigCPtr, this, callback);
644 }
645
646 public int RegisterCumulDependentTransitCallback(SWIGTYPE_p_std__functionT_FloatSlopePiecewiseLinearFunction_const_pflong_longF_t callback) {
647 return mainJNI.RoutingModel_RegisterCumulDependentTransitCallback(swigCPtr, this, SWIGTYPE_p_std__functionT_FloatSlopePiecewiseLinearFunction_const_pflong_longF_t.getCPtr(callback));
648 }
649
650 public SWIGTYPE_p_std__functionT_FloatSlopePiecewiseLinearFunction_const_pflong_longF_t CumulDependentTransitCallback(int callback_index) {
651 return new SWIGTYPE_p_std__functionT_FloatSlopePiecewiseLinearFunction_const_pflong_longF_t(mainJNI.RoutingModel_CumulDependentTransitCallback(swigCPtr, this, callback_index), false);
652 }
653
676 public boolean addDimension(int evaluator_index, long slack_max, long capacity, boolean fix_start_cumul_to_zero, String name) {
677 return mainJNI.RoutingModel_addDimension(swigCPtr, this, evaluator_index, slack_max, capacity, fix_start_cumul_to_zero, name);
678 }
679
680 public boolean addDimensionWithVehicleTransits(int[] evaluator_indices, long slack_max, long capacity, boolean fix_start_cumul_to_zero, String name) {
681 return mainJNI.RoutingModel_addDimensionWithVehicleTransits(swigCPtr, this, evaluator_indices, slack_max, capacity, fix_start_cumul_to_zero, name);
682 }
683
684 public boolean addDimensionWithVehicleCapacity(int evaluator_index, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, String name) {
685 return mainJNI.RoutingModel_addDimensionWithVehicleCapacity(swigCPtr, this, evaluator_index, slack_max, vehicle_capacities, fix_start_cumul_to_zero, name);
686 }
687
688 public boolean addDimensionWithVehicleTransitAndCapacity(int[] evaluator_indices, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, String name) {
689 return mainJNI.RoutingModel_addDimensionWithVehicleTransitAndCapacity(swigCPtr, this, evaluator_indices, slack_max, vehicle_capacities, fix_start_cumul_to_zero, name);
690 }
691
700 public boolean AddDimensionWithCumulDependentVehicleTransitAndCapacity(int[] fixed_evaluator_indices, int[] cumul_dependent_evaluator_indices, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, String name) {
701 return mainJNI.RoutingModel_AddDimensionWithCumulDependentVehicleTransitAndCapacity(swigCPtr, this, fixed_evaluator_indices, cumul_dependent_evaluator_indices, slack_max, vehicle_capacities, fix_start_cumul_to_zero, name);
702 }
703
714 public IntBoolPair addConstantDimensionWithSlack(long value, long capacity, long slack_max, boolean fix_start_cumul_to_zero, String name) {
715 return new IntBoolPair(mainJNI.RoutingModel_addConstantDimensionWithSlack(swigCPtr, this, value, capacity, slack_max, fix_start_cumul_to_zero, name), true);
716 }
717
718 public IntBoolPair addConstantDimension(long value, long capacity, boolean fix_start_cumul_to_zero, String name) {
719 return new IntBoolPair(mainJNI.RoutingModel_addConstantDimension(swigCPtr, this, value, capacity, fix_start_cumul_to_zero, name), true);
720 }
721
733 public IntBoolPair addVectorDimension(long[] values, long capacity, boolean fix_start_cumul_to_zero, String name) {
734 return new IntBoolPair(mainJNI.RoutingModel_addVectorDimension(swigCPtr, this, values, capacity, fix_start_cumul_to_zero, name), true);
735 }
736
748 public IntBoolPair addMatrixDimension(long[][] values, long capacity, boolean fix_start_cumul_to_zero, String name) {
749 return new IntBoolPair(mainJNI.RoutingModel_addMatrixDimension(swigCPtr, this, values, capacity, fix_start_cumul_to_zero, name), true);
750 }
751
755 public SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_p_t GetUnaryDimensions() {
756 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_p_t(mainJNI.RoutingModel_GetUnaryDimensions(swigCPtr, this), true);
757 }
758
762 public SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t GetDimensionsWithGlobalCumulOptimizers() {
763 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t(mainJNI.RoutingModel_GetDimensionsWithGlobalCumulOptimizers(swigCPtr, this), true);
764 }
765
766 public SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t GetDimensionsWithLocalCumulOptimizers() {
767 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t(mainJNI.RoutingModel_GetDimensionsWithLocalCumulOptimizers(swigCPtr, this), true);
768 }
769
773 public boolean HasGlobalCumulOptimizer(RoutingDimension dimension) {
774 return mainJNI.RoutingModel_HasGlobalCumulOptimizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
775 }
776
777 public boolean HasLocalCumulOptimizer(RoutingDimension dimension) {
778 return mainJNI.RoutingModel_HasLocalCumulOptimizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
779 }
780
785 public SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer GetMutableGlobalCumulLPOptimizer(RoutingDimension dimension) {
786 long cPtr = mainJNI.RoutingModel_GetMutableGlobalCumulLPOptimizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
787 return (cPtr == 0) ? null : new SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer(cPtr, false);
788 }
789
790 public SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer GetMutableGlobalCumulMPOptimizer(RoutingDimension dimension) {
791 long cPtr = mainJNI.RoutingModel_GetMutableGlobalCumulMPOptimizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
792 return (cPtr == 0) ? null : new SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer(cPtr, false);
793 }
794
795 public SWIGTYPE_p_operations_research__LocalDimensionCumulOptimizer GetMutableLocalCumulLPOptimizer(RoutingDimension dimension) {
796 long cPtr = mainJNI.RoutingModel_GetMutableLocalCumulLPOptimizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
797 return (cPtr == 0) ? null : new SWIGTYPE_p_operations_research__LocalDimensionCumulOptimizer(cPtr, false);
798 }
799
803 public boolean hasDimension(String dimension_name) {
804 return mainJNI.RoutingModel_hasDimension(swigCPtr, this, dimension_name);
805 }
806
810 public RoutingDimension getDimensionOrDie(String dimension_name) {
811 return new RoutingDimension(mainJNI.RoutingModel_getDimensionOrDie(swigCPtr, this, dimension_name), false);
812 }
813
818 public RoutingDimension getMutableDimension(String dimension_name) {
819 long cPtr = mainJNI.RoutingModel_getMutableDimension(swigCPtr, this, dimension_name);
820 return (cPtr == 0) ? null : new RoutingDimension(cPtr, false);
821 }
822
829 public void setPrimaryConstrainedDimension(String dimension_name) {
830 mainJNI.RoutingModel_setPrimaryConstrainedDimension(swigCPtr, this, dimension_name);
831 }
832
837 return mainJNI.RoutingModel_getPrimaryConstrainedDimension(swigCPtr, this);
838 }
839
844 long cPtr = mainJNI.RoutingModel_AddResourceGroup(swigCPtr, this);
845 return (cPtr == 0) ? null : new RoutingModel.ResourceGroup(cPtr, false);
846 }
847
848 public SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__RoutingModel__ResourceGroup_t_t GetResourceGroups() {
849 return new SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__RoutingModel__ResourceGroup_t_t(mainJNI.RoutingModel_GetResourceGroups(swigCPtr, this), false);
850 }
851
853 long cPtr = mainJNI.RoutingModel_GetResourceGroup(swigCPtr, this, rg_index);
854 return (cPtr == 0) ? null : new RoutingModel.ResourceGroup(cPtr, false);
855 }
856
862 return mainJNI.RoutingModel_GetDimensionResourceGroupIndices(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
863}
864
870 return mainJNI.RoutingModel_GetDimensionResourceGroupIndex(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
871 }
872
896 public int addDisjunction(long[] indices, long penalty, long max_cardinality, int penalty_cost_behavior) {
897 return mainJNI.RoutingModel_addDisjunction__SWIG_0(swigCPtr, this, indices, penalty, max_cardinality, penalty_cost_behavior);
898}
899
923 public int addDisjunction(long[] indices, long penalty, long max_cardinality) {
924 return mainJNI.RoutingModel_addDisjunction__SWIG_1(swigCPtr, this, indices, penalty, max_cardinality);
925}
926
950 public int addDisjunction(long[] indices, long penalty) {
951 return mainJNI.RoutingModel_addDisjunction__SWIG_2(swigCPtr, this, indices, penalty);
952}
953
977 public int addDisjunction(long[] indices) {
978 return mainJNI.RoutingModel_addDisjunction__SWIG_3(swigCPtr, this, indices);
979}
980
984 public int[] getDisjunctionIndices(long index) {
985 return mainJNI.RoutingModel_getDisjunctionIndices(swigCPtr, this, index);
986}
987
992 public long[] GetDisjunctionNodeIndices(int index) {
993 return mainJNI.RoutingModel_GetDisjunctionNodeIndices(swigCPtr, this, index);
994}
995
999 public long getDisjunctionPenalty(int index) {
1000 return mainJNI.RoutingModel_getDisjunctionPenalty(swigCPtr, this, index);
1001 }
1002
1007 public long getDisjunctionMaxCardinality(int index) {
1008 return mainJNI.RoutingModel_getDisjunctionMaxCardinality(swigCPtr, this, index);
1009 }
1010
1016 return mainJNI.RoutingModel_GetDisjunctionPenaltyCostBehavior(swigCPtr, this, index);
1017 }
1018
1023 return mainJNI.RoutingModel_getNumberOfDisjunctions(swigCPtr, this);
1024 }
1025
1030 public boolean HasMandatoryDisjunctions() {
1031 return mainJNI.RoutingModel_HasMandatoryDisjunctions(swigCPtr, this);
1032 }
1033
1039 return mainJNI.RoutingModel_HasMaxCardinalityConstrainedDisjunctions(swigCPtr, this);
1040 }
1041
1050 mainJNI.RoutingModel_ignoreDisjunctionsAlreadyForcedToZero(swigCPtr, this);
1051 }
1052
1058 public void addSoftSameVehicleConstraint(long[] indices, long cost) {
1059 mainJNI.RoutingModel_addSoftSameVehicleConstraint(swigCPtr, this, indices, cost);
1060 }
1061
1068 public void setAllowedVehiclesForIndex(int[] vehicles, long index) {
1069 mainJNI.RoutingModel_setAllowedVehiclesForIndex(swigCPtr, this, vehicles, index);
1070 }
1071
1075 public boolean isVehicleAllowedForIndex(int vehicle, long index) {
1076 return mainJNI.RoutingModel_isVehicleAllowedForIndex(swigCPtr, this, vehicle, index);
1077 }
1078
1094 public void addPickupAndDelivery(long pickup, long delivery) {
1095 mainJNI.RoutingModel_addPickupAndDelivery(swigCPtr, this, pickup, delivery);
1096 }
1097
1103 public void addPickupAndDeliverySets(int pickup_disjunction, int delivery_disjunction) {
1104 mainJNI.RoutingModel_addPickupAndDeliverySets(swigCPtr, this, pickup_disjunction, delivery_disjunction);
1105 }
1106
1110 static public class PickupDeliveryPosition {
1111 private transient long swigCPtr;
1112 protected transient boolean swigCMemOwn;
1113
1114 public PickupDeliveryPosition(long cPtr, boolean cMemoryOwn) {
1115 swigCMemOwn = cMemoryOwn;
1116 swigCPtr = cPtr;
1117 }
1118
1119 public static long getCPtr(PickupDeliveryPosition obj) {
1120 return (obj == null) ? 0 : obj.swigCPtr;
1121 }
1122
1123 public static long swigRelease(PickupDeliveryPosition obj) {
1124 long ptr = 0;
1125 if (obj != null) {
1126 if (!obj.swigCMemOwn)
1127 throw new RuntimeException("Cannot release ownership as memory is not owned");
1128 ptr = obj.swigCPtr;
1129 obj.swigCMemOwn = false;
1130 obj.delete();
1131 }
1132 return ptr;
1133 }
1134
1135 @SuppressWarnings({"deprecation", "removal"})
1136 protected void finalize() {
1137 delete();
1138 }
1139
1140 public synchronized void delete() {
1141 if (swigCPtr != 0) {
1142 if (swigCMemOwn) {
1143 swigCMemOwn = false;
1144 mainJNI.delete_RoutingModel_PickupDeliveryPosition(swigCPtr);
1145 }
1146 swigCPtr = 0;
1147 }
1148 }
1149
1153 public void setPd_pair_index(int value) {
1154 mainJNI.RoutingModel_PickupDeliveryPosition_pd_pair_index_set(swigCPtr, this, value);
1155 }
1156
1160 public int getPd_pair_index() {
1161 return mainJNI.RoutingModel_PickupDeliveryPosition_pd_pair_index_get(swigCPtr, this);
1162 }
1163
1168 public void setAlternative_index(int value) {
1169 mainJNI.RoutingModel_PickupDeliveryPosition_alternative_index_set(swigCPtr, this, value);
1170 }
1171
1177 return mainJNI.RoutingModel_PickupDeliveryPosition_alternative_index_get(swigCPtr, this);
1178 }
1179
1181 this(mainJNI.new_RoutingModel_PickupDeliveryPosition(), true);
1182 }
1183
1184 }
1185
1189 public SWIGTYPE_p_std__optionalT_operations_research__RoutingModel__PickupDeliveryPosition_t GetPickupPosition(long node_index) {
1190 return new SWIGTYPE_p_std__optionalT_operations_research__RoutingModel__PickupDeliveryPosition_t(mainJNI.RoutingModel_GetPickupPosition(swigCPtr, this, node_index), true);
1191 }
1192
1196 public SWIGTYPE_p_std__optionalT_operations_research__RoutingModel__PickupDeliveryPosition_t GetDeliveryPosition(long node_index) {
1197 return new SWIGTYPE_p_std__optionalT_operations_research__RoutingModel__PickupDeliveryPosition_t(mainJNI.RoutingModel_GetDeliveryPosition(swigCPtr, this, node_index), true);
1198 }
1199
1203 public boolean IsPickup(long node_index) {
1204 return mainJNI.RoutingModel_IsPickup(swigCPtr, this, node_index);
1205 }
1206
1207 public boolean IsDelivery(long node_index) {
1208 return mainJNI.RoutingModel_IsDelivery(swigCPtr, this, node_index);
1209 }
1210
1216 mainJNI.RoutingModel_setPickupAndDeliveryPolicyOfAllVehicles(swigCPtr, this, policy);
1217 }
1218
1219 public void setPickupAndDeliveryPolicyOfVehicle(int policy, int vehicle) {
1220 mainJNI.RoutingModel_setPickupAndDeliveryPolicyOfVehicle(swigCPtr, this, policy, vehicle);
1221 }
1222
1223 public int getPickupAndDeliveryPolicyOfVehicle(int vehicle) {
1224 return mainJNI.RoutingModel_getPickupAndDeliveryPolicyOfVehicle(swigCPtr, this, vehicle);
1225 }
1226
1232 return mainJNI.RoutingModel_getNumOfSingletonNodes(swigCPtr, this);
1233 }
1234
1235 public SWIGTYPE_p_std__optionalT_long_t GetFirstMatchingPickupDeliverySibling(long node, SWIGTYPE_p_std__functionT_bool_flongF_t is_match) {
1236 return new SWIGTYPE_p_std__optionalT_long_t(mainJNI.RoutingModel_GetFirstMatchingPickupDeliverySibling(swigCPtr, this, node, SWIGTYPE_p_std__functionT_bool_flongF_t.getCPtr(is_match)), true);
1237 }
1238
1239 public void setVisitType(long index, int type, int type_policy) {
1240 mainJNI.RoutingModel_setVisitType(swigCPtr, this, index, type, type_policy);
1241 }
1242
1243 public int getVisitType(long index) {
1244 return mainJNI.RoutingModel_getVisitType(swigCPtr, this, index);
1245 }
1246
1247 public int[] GetSingleNodesOfType(int type) {
1248 return mainJNI.RoutingModel_GetSingleNodesOfType(swigCPtr, this, type);
1249}
1250
1251 public int[] GetPairIndicesOfType(int type) {
1252 return mainJNI.RoutingModel_GetPairIndicesOfType(swigCPtr, this, type);
1253}
1254
1255 public int GetVisitTypePolicy(long index) {
1256 return mainJNI.RoutingModel_GetVisitTypePolicy(swigCPtr, this, index);
1257 }
1258
1260 return mainJNI.RoutingModel_getNumberOfVisitTypes(swigCPtr, this);
1261 }
1262
1272 public void addHardTypeIncompatibility(int type1, int type2) {
1273 mainJNI.RoutingModel_addHardTypeIncompatibility(swigCPtr, this, type1, type2);
1274 }
1275
1276 public void addTemporalTypeIncompatibility(int type1, int type2) {
1277 mainJNI.RoutingModel_addTemporalTypeIncompatibility(swigCPtr, this, type1, type2);
1278 }
1279
1280 public SWIGTYPE_p_absl__flat_hash_setT_int_t getTemporalTypeIncompatibilitiesOfType(int type) {
1281 return new SWIGTYPE_p_absl__flat_hash_setT_int_t(mainJNI.RoutingModel_getTemporalTypeIncompatibilitiesOfType(swigCPtr, this, type), false);
1282 }
1283
1289 return mainJNI.RoutingModel_hasHardTypeIncompatibilities(swigCPtr, this);
1290 }
1291
1293 return mainJNI.RoutingModel_hasTemporalTypeIncompatibilities(swigCPtr, this);
1294 }
1295
1302 public void addRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
1303 mainJNI.RoutingModel_addRequiredTypeAlternativesWhenAddingType(swigCPtr, this, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
1304 }
1305
1313 public void addRequiredTypeAlternativesWhenRemovingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
1314 mainJNI.RoutingModel_addRequiredTypeAlternativesWhenRemovingType(swigCPtr, this, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
1315 }
1316
1320 public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenAddingType(int type) {
1321 return new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(mainJNI.RoutingModel_GetRequiredTypeAlternativesWhenAddingType(swigCPtr, this, type), false);
1322 }
1323
1327 public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenRemovingType(int type) {
1328 return new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(mainJNI.RoutingModel_GetRequiredTypeAlternativesWhenRemovingType(swigCPtr, this, type), false);
1329 }
1330
1336 return mainJNI.RoutingModel_hasSameVehicleTypeRequirements(swigCPtr, this);
1337 }
1338
1340 return mainJNI.RoutingModel_hasTemporalTypeRequirements(swigCPtr, this);
1341 }
1342
1349 public long unperformedPenalty(long var_index) {
1350 return mainJNI.RoutingModel_unperformedPenalty(swigCPtr, this, var_index);
1351 }
1352
1358 public long unperformedPenaltyOrValue(long default_value, long var_index) {
1359 return mainJNI.RoutingModel_unperformedPenaltyOrValue(swigCPtr, this, default_value, var_index);
1360 }
1361
1367 public long getDepot() {
1368 return mainJNI.RoutingModel_getDepot(swigCPtr, this);
1369 }
1370
1377 public void SetMaximumNumberOfActiveVehicles(int max_active_vehicles) {
1378 mainJNI.RoutingModel_SetMaximumNumberOfActiveVehicles(swigCPtr, this, max_active_vehicles);
1379 }
1380
1385 return mainJNI.RoutingModel_GetMaximumNumberOfActiveVehicles(swigCPtr, this);
1386 }
1387
1393 public void setArcCostEvaluatorOfAllVehicles(int evaluator_index) {
1394 mainJNI.RoutingModel_setArcCostEvaluatorOfAllVehicles(swigCPtr, this, evaluator_index);
1395 }
1396
1400 public void setArcCostEvaluatorOfVehicle(int evaluator_index, int vehicle) {
1401 mainJNI.RoutingModel_setArcCostEvaluatorOfVehicle(swigCPtr, this, evaluator_index, vehicle);
1402 }
1403
1408 public void setFixedCostOfAllVehicles(long cost) {
1409 mainJNI.RoutingModel_setFixedCostOfAllVehicles(swigCPtr, this, cost);
1410 }
1411
1415 public void setFixedCostOfVehicle(long cost, int vehicle) {
1416 mainJNI.RoutingModel_setFixedCostOfVehicle(swigCPtr, this, cost, vehicle);
1417 }
1418
1424 public long getFixedCostOfVehicle(int vehicle) {
1425 return mainJNI.RoutingModel_getFixedCostOfVehicle(swigCPtr, this, vehicle);
1426 }
1427
1428 public void SetPathEnergyCostOfVehicle(String force, String distance, long cost_per_unit, int vehicle) {
1429 mainJNI.RoutingModel_SetPathEnergyCostOfVehicle(swigCPtr, this, force, distance, cost_per_unit, vehicle);
1430 }
1431
1432 public void SetPathEnergyCostsOfVehicle(String force, String distance, long threshold, long cost_per_unit_below_threshold, long cost_per_unit_above_threshold, int vehicle) {
1433 mainJNI.RoutingModel_SetPathEnergyCostsOfVehicle(swigCPtr, this, force, distance, threshold, cost_per_unit_below_threshold, cost_per_unit_above_threshold, vehicle);
1434 }
1435
1453 public void setAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor) {
1454 mainJNI.RoutingModel_setAmortizedCostFactorsOfAllVehicles(swigCPtr, this, linear_cost_factor, quadratic_cost_factor);
1455 }
1456
1460 public void setAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle) {
1461 mainJNI.RoutingModel_setAmortizedCostFactorsOfVehicle(swigCPtr, this, linear_cost_factor, quadratic_cost_factor, vehicle);
1462 }
1463
1465 return mainJNI.RoutingModel_getAmortizedLinearCostFactorOfVehicles(swigCPtr, this);
1466}
1467
1469 return mainJNI.RoutingModel_getAmortizedQuadraticCostFactorOfVehicles(swigCPtr, this);
1470}
1471
1472 public void AddRouteConstraint(SWIGTYPE_p_std__functionT_std__optionalT_long_t_fstd__vectorT_long_t_const_RF_t route_evaluator, boolean costs_are_homogeneous_across_vehicles) {
1473 mainJNI.RoutingModel_AddRouteConstraint__SWIG_0(swigCPtr, this, SWIGTYPE_p_std__functionT_std__optionalT_long_t_fstd__vectorT_long_t_const_RF_t.getCPtr(route_evaluator), costs_are_homogeneous_across_vehicles);
1474 }
1475
1476 public void AddRouteConstraint(SWIGTYPE_p_std__functionT_std__optionalT_long_t_fstd__vectorT_long_t_const_RF_t route_evaluator) {
1477 mainJNI.RoutingModel_AddRouteConstraint__SWIG_1(swigCPtr, this, SWIGTYPE_p_std__functionT_std__optionalT_long_t_fstd__vectorT_long_t_const_RF_t.getCPtr(route_evaluator));
1478 }
1479
1480 public SWIGTYPE_p_std__optionalT_long_t GetRouteCost(long[] route) {
1481 return new SWIGTYPE_p_std__optionalT_long_t(mainJNI.RoutingModel_GetRouteCost(swigCPtr, this, route), true);
1482 }
1483
1484 public void SetVehicleUsedWhenEmpty(boolean is_used, int vehicle) {
1485 mainJNI.RoutingModel_SetVehicleUsedWhenEmpty(swigCPtr, this, is_used, vehicle);
1486 }
1487
1488 public boolean IsVehicleUsedWhenEmpty(int vehicle) {
1489 return mainJNI.RoutingModel_IsVehicleUsedWhenEmpty(swigCPtr, this, vehicle);
1490 }
1491
1497 public void setFirstSolutionEvaluator(LongBinaryOperator evaluator) {
1498 mainJNI.RoutingModel_setFirstSolutionEvaluator(swigCPtr, this, evaluator);
1499 }
1500
1508 mainJNI.RoutingModel_SetFirstSolutionHint(swigCPtr, this, Assignment.getCPtr(hint), hint);
1509 }
1510
1515 long cPtr = mainJNI.RoutingModel_GetFirstSolutionHint(swigCPtr, this);
1516 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1517 }
1518
1524 mainJNI.RoutingModel_addLocalSearchOperator(swigCPtr, this, LocalSearchOperator.getCPtr(ls_operator), ls_operator);
1525 }
1526
1530 public void addSearchMonitor(SearchMonitor monitor) {
1531 mainJNI.RoutingModel_addSearchMonitor(swigCPtr, this, SearchMonitor.getCPtr(monitor), monitor);
1532 }
1533
1534 public void AddEnterSearchCallback(Runnable callback) {
1535 mainJNI.RoutingModel_AddEnterSearchCallback(swigCPtr, this, callback);
1536 }
1537
1546 public void addAtSolutionCallback(Runnable callback, boolean track_unchecked_neighbors) {
1547 mainJNI.RoutingModel_addAtSolutionCallback__SWIG_0(swigCPtr, this, callback, track_unchecked_neighbors);
1548 }
1549
1558 public void addAtSolutionCallback(Runnable callback) {
1559 mainJNI.RoutingModel_addAtSolutionCallback__SWIG_1(swigCPtr, this, callback);
1560 }
1561
1562 public void AddRestoreDimensionValuesResetCallback(Runnable callback) {
1563 mainJNI.RoutingModel_AddRestoreDimensionValuesResetCallback(swigCPtr, this, callback);
1564 }
1565
1573 mainJNI.RoutingModel_addVariableMinimizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var);
1574 }
1575
1581 mainJNI.RoutingModel_addVariableMaximizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var);
1582 }
1583
1589 mainJNI.RoutingModel_AddWeightedVariableMinimizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, cost);
1590 }
1591
1597 mainJNI.RoutingModel_AddWeightedVariableMaximizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, cost);
1598 }
1599
1604 public void addVariableTargetToFinalizer(IntVar var, long target) {
1605 mainJNI.RoutingModel_addVariableTargetToFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, target);
1606 }
1607
1612 public void AddWeightedVariableTargetToFinalizer(IntVar var, long target, long cost) {
1613 mainJNI.RoutingModel_AddWeightedVariableTargetToFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, target, cost);
1614 }
1615
1624 public void closeModel() {
1625 mainJNI.RoutingModel_closeModel(swigCPtr, this);
1626 }
1627
1632 public void closeModelWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1633 mainJNI.RoutingModel_closeModelWithParameters(swigCPtr, this, search_parameters.toByteArray());
1634 }
1635
1644 public Assignment solve(Assignment assignment) {
1645 long cPtr = mainJNI.RoutingModel_solve__SWIG_0(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
1646 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1647 }
1648
1658 long cPtr = mainJNI.RoutingModel_solve__SWIG_1(swigCPtr, this);
1659 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1660 }
1661
1671 public Assignment solveWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1672 long cPtr = mainJNI.RoutingModel_solveWithParameters(swigCPtr, this, search_parameters.toByteArray());
1673 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1674 }
1675
1680 public Assignment solveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1681 long cPtr = mainJNI.RoutingModel_solveFromAssignmentWithParameters(swigCPtr, this, Assignment.getCPtr(assignment), assignment, search_parameters.toByteArray());
1682 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1683 }
1684
1691 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) {
1692 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));
1693 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1694 }
1695
1702 public Assignment FastSolveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, boolean check_solution_in_cp) {
1703 long cPtr = mainJNI.RoutingModel_FastSolveFromAssignmentWithParameters__SWIG_1(swigCPtr, this, Assignment.getCPtr(assignment), assignment, search_parameters.toByteArray(), check_solution_in_cp);
1704 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1705 }
1706
1711 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) {
1712 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));
1713 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1714 }
1715
1720 public Assignment SolveFromAssignmentsWithParameters(SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t assignments, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1721 long cPtr = mainJNI.RoutingModel_SolveFromAssignmentsWithParameters__SWIG_1(swigCPtr, this, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t.getCPtr(assignments), search_parameters.toByteArray());
1722 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1723 }
1724
1729 public Assignment SolveWithIteratedLocalSearch(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1730 long cPtr = mainJNI.RoutingModel_SolveWithIteratedLocalSearch(swigCPtr, this, search_parameters.toByteArray());
1731 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1732 }
1733
1741 public void setAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment) {
1742 mainJNI.RoutingModel_setAssignmentFromOtherModelAssignment(swigCPtr, this, Assignment.getCPtr(target_assignment), target_assignment, RoutingModel.getCPtr(source_model), source_model, Assignment.getCPtr(source_assignment), source_assignment);
1743 }
1744
1752 public long computeLowerBound() {
1753 return mainJNI.RoutingModel_computeLowerBound(swigCPtr, this);
1754 }
1755
1761 return mainJNI.RoutingModel_objective_lower_bound(swigCPtr, this);
1762 }
1763
1768 return com.google.ortools.constraintsolver.RoutingSearchStatus.Value.forNumber(mainJNI.RoutingModel_status(swigCPtr, this));
1769}
1770
1774 public boolean enable_deep_serialization() {
1775 return mainJNI.RoutingModel_enable_deep_serialization(swigCPtr, this);
1776 }
1777
1788 public IntVar applyLocks(long[] locks) {
1789 long cPtr = mainJNI.RoutingModel_applyLocks(swigCPtr, this, locks);
1790 return (cPtr == 0) ? null : new IntVar(cPtr, false);
1791 }
1792
1803 public boolean applyLocksToAllVehicles(long[][] locks, boolean close_routes) {
1804 return mainJNI.RoutingModel_applyLocksToAllVehicles(swigCPtr, this, locks, close_routes);
1805 }
1806
1814 long cPtr = mainJNI.RoutingModel_preAssignment(swigCPtr, this);
1815 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1816 }
1817
1819 long cPtr = mainJNI.RoutingModel_mutablePreAssignment(swigCPtr, this);
1820 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1821 }
1822
1828 public boolean writeAssignment(String file_name) {
1829 return mainJNI.RoutingModel_writeAssignment(swigCPtr, this, file_name);
1830 }
1831
1837 public Assignment readAssignment(String file_name) {
1838 long cPtr = mainJNI.RoutingModel_readAssignment(swigCPtr, this, file_name);
1839 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1840 }
1841
1847 long cPtr = mainJNI.RoutingModel_restoreAssignment(swigCPtr, this, Assignment.getCPtr(solution), solution);
1848 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1849 }
1850
1858 public Assignment readAssignmentFromRoutes(long[][] routes, boolean ignore_inactive_indices) {
1859 long cPtr = mainJNI.RoutingModel_readAssignmentFromRoutes(swigCPtr, this, routes, ignore_inactive_indices);
1860 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1861 }
1862
1881 public boolean routesToAssignment(long[][] routes, boolean ignore_inactive_indices, boolean close_routes, Assignment assignment) {
1882 return mainJNI.RoutingModel_routesToAssignment(swigCPtr, this, routes, ignore_inactive_indices, close_routes, Assignment.getCPtr(assignment), assignment);
1883 }
1884
1890 public void assignmentToRoutes(Assignment assignment, long[][] routes) {
1891 mainJNI.RoutingModel_assignmentToRoutes(swigCPtr, this, Assignment.getCPtr(assignment), assignment, routes);
1892 }
1893
1918 long cPtr = mainJNI.RoutingModel_compactAssignment(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
1919 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1920 }
1921
1928 long cPtr = mainJNI.RoutingModel_compactAndCheckAssignment(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
1929 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1930 }
1931
1935 public void addToAssignment(IntVar var) {
1936 mainJNI.RoutingModel_addToAssignment(swigCPtr, this, IntVar.getCPtr(var), var);
1937 }
1938
1939 public void addIntervalToAssignment(IntervalVar interval) {
1940 mainJNI.RoutingModel_addIntervalToAssignment(swigCPtr, this, IntervalVar.getCPtr(interval), interval);
1941 }
1942
1943 static public class NodeNeighborsParameters {
1944 private transient long swigCPtr;
1945 protected transient boolean swigCMemOwn;
1946
1947 public NodeNeighborsParameters(long cPtr, boolean cMemoryOwn) {
1948 swigCMemOwn = cMemoryOwn;
1949 swigCPtr = cPtr;
1950 }
1951
1952 public static long getCPtr(NodeNeighborsParameters obj) {
1953 return (obj == null) ? 0 : obj.swigCPtr;
1954 }
1955
1956 public static long swigRelease(NodeNeighborsParameters obj) {
1957 long ptr = 0;
1958 if (obj != null) {
1959 if (!obj.swigCMemOwn)
1960 throw new RuntimeException("Cannot release ownership as memory is not owned");
1961 ptr = obj.swigCPtr;
1962 obj.swigCMemOwn = false;
1963 obj.delete();
1964 }
1965 return ptr;
1966 }
1967
1968 @SuppressWarnings({"deprecation", "removal"})
1969 protected void finalize() {
1970 delete();
1971 }
1972
1973 public synchronized void delete() {
1974 if (swigCPtr != 0) {
1975 if (swigCMemOwn) {
1976 swigCMemOwn = false;
1977 mainJNI.delete_RoutingModel_NodeNeighborsParameters(swigCPtr);
1978 }
1979 swigCPtr = 0;
1980 }
1981 }
1982
1983 public void setNum_neighbors(int value) {
1984 mainJNI.RoutingModel_NodeNeighborsParameters_num_neighbors_set(swigCPtr, this, value);
1985 }
1986
1987 public int getNum_neighbors() {
1988 return mainJNI.RoutingModel_NodeNeighborsParameters_num_neighbors_get(swigCPtr, this);
1989 }
1990
1991 public void setAdd_vehicle_starts_to_neighbors(boolean value) {
1992 mainJNI.RoutingModel_NodeNeighborsParameters_add_vehicle_starts_to_neighbors_set(swigCPtr, this, value);
1993 }
1994
1996 return mainJNI.RoutingModel_NodeNeighborsParameters_add_vehicle_starts_to_neighbors_get(swigCPtr, this);
1997 }
1998
1999 public void setAdd_vehicle_ends_to_neighbors(boolean value) {
2000 mainJNI.RoutingModel_NodeNeighborsParameters_add_vehicle_ends_to_neighbors_set(swigCPtr, this, value);
2001 }
2002
2004 return mainJNI.RoutingModel_NodeNeighborsParameters_add_vehicle_ends_to_neighbors_get(swigCPtr, this);
2005 }
2006
2008 mainJNI.RoutingModel_NodeNeighborsParameters_only_sort_neighbors_for_partial_neighborhoods_set(swigCPtr, this, value);
2009 }
2010
2012 return mainJNI.RoutingModel_NodeNeighborsParameters_only_sort_neighbors_for_partial_neighborhoods_get(swigCPtr, this);
2013 }
2014
2016 this(mainJNI.new_RoutingModel_NodeNeighborsParameters(), true);
2017 }
2018
2019 }
2020
2021 static public class NodeNeighborsByCostClass {
2022 private transient long swigCPtr;
2023 protected transient boolean swigCMemOwn;
2024
2025 public NodeNeighborsByCostClass(long cPtr, boolean cMemoryOwn) {
2026 swigCMemOwn = cMemoryOwn;
2027 swigCPtr = cPtr;
2028 }
2029
2030 public static long getCPtr(NodeNeighborsByCostClass obj) {
2031 return (obj == null) ? 0 : obj.swigCPtr;
2032 }
2033
2034 public static long swigRelease(NodeNeighborsByCostClass obj) {
2035 long ptr = 0;
2036 if (obj != null) {
2037 if (!obj.swigCMemOwn)
2038 throw new RuntimeException("Cannot release ownership as memory is not owned");
2039 ptr = obj.swigCPtr;
2040 obj.swigCMemOwn = false;
2041 obj.delete();
2042 }
2043 return ptr;
2044 }
2045
2046 @SuppressWarnings({"deprecation", "removal"})
2047 protected void finalize() {
2048 delete();
2049 }
2050
2051 public synchronized void delete() {
2052 if (swigCPtr != 0) {
2053 if (swigCMemOwn) {
2054 swigCMemOwn = false;
2055 mainJNI.delete_RoutingModel_NodeNeighborsByCostClass(swigCPtr);
2056 }
2057 swigCPtr = 0;
2058 }
2059 }
2060
2062 this(mainJNI.new_RoutingModel_NodeNeighborsByCostClass(RoutingModel.getCPtr(routing_model), routing_model), true);
2063 }
2064
2069 public void ComputeNeighbors(RoutingModel.NodeNeighborsParameters params) {
2070 mainJNI.RoutingModel_NodeNeighborsByCostClass_ComputeNeighbors(swigCPtr, this, RoutingModel.NodeNeighborsParameters.getCPtr(params), params);
2071 }
2072
2078 public int[] GetIncomingNeighborsOfNodeForCostClass(int cost_class, int node_index) {
2079 return mainJNI.RoutingModel_NodeNeighborsByCostClass_GetIncomingNeighborsOfNodeForCostClass(swigCPtr, this, cost_class, node_index);
2080 }
2081
2087 public int[] GetOutgoingNeighborsOfNodeForCostClass(int cost_class, int node_index) {
2088 return mainJNI.RoutingModel_NodeNeighborsByCostClass_GetOutgoingNeighborsOfNodeForCostClass(swigCPtr, this, cost_class, node_index);
2089 }
2090
2096 public boolean IsNeighborhoodArcForCostClass(int cost_class, long from, long to) {
2097 return mainJNI.RoutingModel_NodeNeighborsByCostClass_IsNeighborhoodArcForCostClass(swigCPtr, this, cost_class, from, to);
2098 }
2099
2100 }
2101
2108 public RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio, long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used, boolean add_vehicle_starts_to_neighbors, boolean add_vehicle_ends_to_neighbors, boolean only_sort_neighbors_for_partial_neighborhoods) {
2109 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, add_vehicle_ends_to_neighbors, only_sort_neighbors_for_partial_neighborhoods);
2110 return (cPtr == 0) ? null : new RoutingModel.NodeNeighborsByCostClass(cPtr, false);
2111 }
2112
2119 public RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio, long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used, boolean add_vehicle_starts_to_neighbors, boolean add_vehicle_ends_to_neighbors) {
2120 long cPtr = mainJNI.RoutingModel_GetOrCreateNodeNeighborsByCostClass__SWIG_1(swigCPtr, this, neighbors_ratio, min_neighbors, SWIGTYPE_p_double.getCPtr(neighbors_ratio_used), add_vehicle_starts_to_neighbors, add_vehicle_ends_to_neighbors);
2121 return (cPtr == 0) ? null : new RoutingModel.NodeNeighborsByCostClass(cPtr, false);
2122 }
2123
2130 public RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio, long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used, boolean add_vehicle_starts_to_neighbors) {
2131 long cPtr = mainJNI.RoutingModel_GetOrCreateNodeNeighborsByCostClass__SWIG_2(swigCPtr, this, neighbors_ratio, min_neighbors, SWIGTYPE_p_double.getCPtr(neighbors_ratio_used), add_vehicle_starts_to_neighbors);
2132 return (cPtr == 0) ? null : new RoutingModel.NodeNeighborsByCostClass(cPtr, false);
2133 }
2134
2141 public RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio, long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used) {
2142 long cPtr = mainJNI.RoutingModel_GetOrCreateNodeNeighborsByCostClass__SWIG_3(swigCPtr, this, neighbors_ratio, min_neighbors, SWIGTYPE_p_double.getCPtr(neighbors_ratio_used));
2143 return (cPtr == 0) ? null : new RoutingModel.NodeNeighborsByCostClass(cPtr, false);
2144 }
2145
2151 long cPtr = mainJNI.RoutingModel_GetOrCreateNodeNeighborsByCostClass__SWIG_4(swigCPtr, this, RoutingModel.NodeNeighborsParameters.getCPtr(params), params);
2152 return (cPtr == 0) ? null : new RoutingModel.NodeNeighborsByCostClass(cPtr, false);
2153 }
2154
2163 mainJNI.RoutingModel_addLocalSearchFilter(swigCPtr, this, LocalSearchFilter.getCPtr(filter), filter);
2164 }
2165
2170 public long start(int vehicle) {
2171 return mainJNI.RoutingModel_start(swigCPtr, this, vehicle);
2172 }
2173
2177 public long end(int vehicle) {
2178 return mainJNI.RoutingModel_end(swigCPtr, this, vehicle);
2179 }
2180
2184 public boolean isStart(long index) {
2185 return mainJNI.RoutingModel_isStart(swigCPtr, this, index);
2186 }
2187
2191 public boolean isEnd(long index) {
2192 return mainJNI.RoutingModel_isEnd(swigCPtr, this, index);
2193 }
2194
2199 public int VehicleIndex(long index) {
2200 return mainJNI.RoutingModel_VehicleIndex(swigCPtr, this, index);
2201 }
2202
2208 public long next(Assignment assignment, long index) {
2209 return mainJNI.RoutingModel_next(swigCPtr, this, Assignment.getCPtr(assignment), assignment, index);
2210 }
2211
2215 public boolean isVehicleUsed(Assignment assignment, int vehicle) {
2216 return mainJNI.RoutingModel_isVehicleUsed(swigCPtr, this, Assignment.getCPtr(assignment), assignment, vehicle);
2217 }
2218
2223 public IntVar[] nexts() {
2224 return mainJNI.RoutingModel_nexts(swigCPtr, this);
2225}
2226
2231 public IntVar[] vehicleVars() {
2232 return mainJNI.RoutingModel_vehicleVars(swigCPtr, this);
2233}
2234
2240 public IntVar[] ResourceVars(int resource_group) {
2241 return mainJNI.RoutingModel_ResourceVars(swigCPtr, this, resource_group);
2242}
2243
2248 public IntVar nextVar(long index) {
2249 long cPtr = mainJNI.RoutingModel_nextVar(swigCPtr, this, index);
2250 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2251 }
2252
2256 public IntVar activeVar(long index) {
2257 long cPtr = mainJNI.RoutingModel_activeVar(swigCPtr, this, index);
2258 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2259 }
2260
2265 public IntVar activeVehicleVar(int vehicle) {
2266 long cPtr = mainJNI.RoutingModel_activeVehicleVar(swigCPtr, this, vehicle);
2267 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2268 }
2269
2275 public IntVar VehicleRouteConsideredVar(int vehicle) {
2276 long cPtr = mainJNI.RoutingModel_VehicleRouteConsideredVar(swigCPtr, this, vehicle);
2277 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2278 }
2279
2284 public IntVar vehicleVar(long index) {
2285 long cPtr = mainJNI.RoutingModel_vehicleVar(swigCPtr, this, index);
2286 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2287 }
2288
2294 public IntVar ResourceVar(int vehicle, int resource_group) {
2295 long cPtr = mainJNI.RoutingModel_ResourceVar(swigCPtr, this, vehicle, resource_group);
2296 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2297 }
2298
2302 public IntVar costVar() {
2303 long cPtr = mainJNI.RoutingModel_costVar(swigCPtr, this);
2304 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2305 }
2306
2311 public long getArcCostForVehicle(long from_index, long to_index, long vehicle) {
2312 return mainJNI.RoutingModel_getArcCostForVehicle(swigCPtr, this, from_index, to_index, vehicle);
2313 }
2314
2319 return mainJNI.RoutingModel_costsAreHomogeneousAcrossVehicles(swigCPtr, this);
2320 }
2321
2326 public long getHomogeneousCost(long from_index, long to_index) {
2327 return mainJNI.RoutingModel_getHomogeneousCost(swigCPtr, this, from_index, to_index);
2328 }
2329
2334 public long getArcCostForFirstSolution(long from_index, long to_index) {
2335 return mainJNI.RoutingModel_getArcCostForFirstSolution(swigCPtr, this, from_index, to_index);
2336 }
2337
2346 public long getArcCostForClass(long from_index, long to_index, long cost_class_index) {
2347 return mainJNI.RoutingModel_getArcCostForClass(swigCPtr, this, from_index, to_index, cost_class_index);
2348 }
2349
2353 public int getCostClassIndexOfVehicle(long vehicle) {
2354 return mainJNI.RoutingModel_getCostClassIndexOfVehicle(swigCPtr, this, vehicle);
2355}
2356
2361 public boolean hasVehicleWithCostClassIndex(int cost_class_index) {
2362 return mainJNI.RoutingModel_hasVehicleWithCostClassIndex(swigCPtr, this, cost_class_index);
2363 }
2364
2368 public int getCostClassesCount() {
2369 return mainJNI.RoutingModel_getCostClassesCount(swigCPtr, this);
2370 }
2371
2376 return mainJNI.RoutingModel_getNonZeroCostClassesCount(swigCPtr, this);
2377 }
2378
2379 public int getVehicleClassIndexOfVehicle(long vehicle) {
2380 return mainJNI.RoutingModel_getVehicleClassIndexOfVehicle(swigCPtr, this, vehicle);
2381}
2382
2387 public int GetVehicleOfClass(int vehicle_class) {
2388 return mainJNI.RoutingModel_GetVehicleOfClass(swigCPtr, this, vehicle_class);
2389 }
2390
2395 return mainJNI.RoutingModel_getVehicleClassesCount(swigCPtr, this);
2396 }
2397
2401 public int[] getSameVehicleIndicesOfIndex(int node) {
2402 return mainJNI.RoutingModel_getSameVehicleIndicesOfIndex(swigCPtr, this, node);
2403}
2404
2408 public int[] GetSameActivityIndicesOfIndex(int node) {
2409 return mainJNI.RoutingModel_GetSameActivityIndicesOfIndex(swigCPtr, this, node);
2410}
2411
2415 public int GetSameActivityGroupOfIndex(int node) {
2416 return mainJNI.RoutingModel_GetSameActivityGroupOfIndex(swigCPtr, this, node);
2417 }
2418
2423 return mainJNI.RoutingModel_GetSameActivityGroupsCount(swigCPtr, this);
2424 }
2425
2429 public int[] GetSameActivityIndicesOfGroup(int group) {
2430 return mainJNI.RoutingModel_GetSameActivityIndicesOfGroup(swigCPtr, this, group);
2431}
2432
2434 return new RoutingModel.VehicleTypeContainer(mainJNI.RoutingModel_GetVehicleTypeContainer(swigCPtr, this), false);
2435 }
2436
2457 public boolean arcIsMoreConstrainedThanArc(long from, long to1, long to2) {
2458 return mainJNI.RoutingModel_arcIsMoreConstrainedThanArc(swigCPtr, this, from, to1, to2);
2459 }
2460
2467 public String debugOutputAssignment(Assignment solution_assignment, String dimension_to_print) {
2468 return mainJNI.RoutingModel_debugOutputAssignment(swigCPtr, this, Assignment.getCPtr(solution_assignment), solution_assignment, dimension_to_print);
2469 }
2470
2479 public boolean CheckIfAssignmentIsFeasible(Assignment assignment, boolean call_at_solution_monitors) {
2480 return mainJNI.RoutingModel_CheckIfAssignmentIsFeasible(swigCPtr, this, Assignment.getCPtr(assignment), assignment, call_at_solution_monitors);
2481 }
2482
2487 public Solver solver() {
2488 long cPtr = mainJNI.RoutingModel_solver(swigCPtr, this);
2489 return (cPtr == 0) ? null : new Solver(cPtr, false);
2490 }
2491
2496 public boolean checkLimit(SWIGTYPE_p_absl__Duration offset) {
2497 return mainJNI.RoutingModel_checkLimit__SWIG_0(swigCPtr, this, SWIGTYPE_p_absl__Duration.getCPtr(offset));
2498 }
2499
2504 public boolean checkLimit() {
2505 return mainJNI.RoutingModel_checkLimit__SWIG_1(swigCPtr, this);
2506 }
2507
2511 public void UpdateTimeLimit(SWIGTYPE_p_absl__Duration time_limit) {
2512 mainJNI.RoutingModel_UpdateTimeLimit(swigCPtr, this, SWIGTYPE_p_absl__Duration.getCPtr(time_limit));
2513 }
2514
2518 public SWIGTYPE_p_absl__Duration TimeBuffer() {
2519 return new SWIGTYPE_p_absl__Duration(mainJNI.RoutingModel_TimeBuffer(swigCPtr, this), true);
2520 }
2521
2525 public SWIGTYPE_p_std__atomicT_bool_t GetMutableCPSatInterrupt() {
2526 long cPtr = mainJNI.RoutingModel_GetMutableCPSatInterrupt(swigCPtr, this);
2527 return (cPtr == 0) ? null : new SWIGTYPE_p_std__atomicT_bool_t(cPtr, false);
2528 }
2529
2533 public SWIGTYPE_p_std__atomicT_bool_t GetMutableCPInterrupt() {
2534 long cPtr = mainJNI.RoutingModel_GetMutableCPInterrupt(swigCPtr, this);
2535 return (cPtr == 0) ? null : new SWIGTYPE_p_std__atomicT_bool_t(cPtr, false);
2536 }
2537
2541 public void CancelSearch() {
2542 mainJNI.RoutingModel_CancelSearch(swigCPtr, this);
2543 }
2544
2549 public int nodes() {
2550 return mainJNI.RoutingModel_nodes(swigCPtr, this);
2551 }
2552
2556 public int vehicles() {
2557 return mainJNI.RoutingModel_vehicles(swigCPtr, this);
2558 }
2559
2563 public long size() {
2564 return mainJNI.RoutingModel_size(swigCPtr, this);
2565 }
2566
2571 public long getNumberOfDecisionsInFirstSolution(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
2572 return mainJNI.RoutingModel_getNumberOfDecisionsInFirstSolution(swigCPtr, this, search_parameters.toByteArray());
2573 }
2574
2575 public long getNumberOfRejectsInFirstSolution(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
2576 return mainJNI.RoutingModel_getNumberOfRejectsInFirstSolution(swigCPtr, this, search_parameters.toByteArray());
2577 }
2578
2582 public boolean isMatchingModel() {
2583 return mainJNI.RoutingModel_isMatchingModel(swigCPtr, this);
2584 }
2585
2590 public boolean AreRoutesInterdependent(SWIGTYPE_p_operations_research__RoutingSearchParameters parameters) {
2591 return mainJNI.RoutingModel_AreRoutesInterdependent(swigCPtr, this, SWIGTYPE_p_operations_research__RoutingSearchParameters.getCPtr(parameters));
2592 }
2593
2608 public DecisionBuilder makeGuidedSlackFinalizer(RoutingDimension dimension, LongUnaryOperator initializer) {
2609 long cPtr = mainJNI.RoutingModel_makeGuidedSlackFinalizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension, initializer);
2610 return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
2611 }
2612
2629 long cPtr = mainJNI.RoutingModel_makeSelfDependentDimensionFinalizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
2630 return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
2631 }
2632
2634 return new PathsMetadata(mainJNI.RoutingModel_GetPathsMetadata(swigCPtr, this), false);
2635 }
2636
2641 public SWIGTYPE_p_std__dequeT_int_t GetVehiclesOfSameClass(long start_end_index) {
2642 return new SWIGTYPE_p_std__dequeT_int_t(mainJNI.RoutingModel_GetVehiclesOfSameClass(swigCPtr, this, start_end_index), false);
2643 }
2644
2652 public SWIGTYPE_p_std__vectorT_std__pairT_long_long_t_t GetSameVehicleClassArcs(long from_index, long to_index) {
2653 return new SWIGTYPE_p_std__vectorT_std__pairT_long_long_t_t(mainJNI.RoutingModel_GetSameVehicleClassArcs(swigCPtr, this, from_index, to_index), true);
2654 }
2655
2656 // PickupAndDeliveryPolicy
2660
2664 public final static int PICKUP_AND_DELIVERY_NO_ORDER = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_NO_ORDER_get();
2668 public final static int PICKUP_AND_DELIVERY_LIFO = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_LIFO_get();
2672 public final static int PICKUP_AND_DELIVERY_FIFO = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_FIFO_get();
2673
2674 // TransitEvaluatorSign
2678
2679 public final static int kTransitEvaluatorSignUnknown = mainJNI.RoutingModel_kTransitEvaluatorSignUnknown_get();
2680 public final static int kTransitEvaluatorSignPositiveOrZero = mainJNI.RoutingModel_kTransitEvaluatorSignPositiveOrZero_get();
2681 public final static int kTransitEvaluatorSignNegativeOrZero = mainJNI.RoutingModel_kTransitEvaluatorSignNegativeOrZero_get();
2682
2683 // PenaltyCostBehavior
2688
2689 public final static int PENALIZE_ONCE = mainJNI.RoutingModel_PENALIZE_ONCE_get();
2690 public final static int PENALIZE_PER_INACTIVE = mainJNI.RoutingModel_PENALIZE_PER_INACTIVE_get();
2691
2692 // VisitTypePolicy
2706
2710 public final static int TYPE_ADDED_TO_VEHICLE = mainJNI.RoutingModel_TYPE_ADDED_TO_VEHICLE_get();
2717 public final static int ADDED_TYPE_REMOVED_FROM_VEHICLE = mainJNI.RoutingModel_ADDED_TYPE_REMOVED_FROM_VEHICLE_get();
2722 public final static int TYPE_ON_VEHICLE_UP_TO_VISIT = mainJNI.RoutingModel_TYPE_ON_VEHICLE_UP_TO_VISIT_get();
2729 public final static int TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED = mainJNI.RoutingModel_TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED_get();
2730
2731}
void ComputeNeighbors(RoutingModel.NodeNeighborsParameters params)
boolean IsNeighborhoodArcForCostClass(int cost_class, long from, long to)
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()
RoutingModel.ResourceGroup.Attributes GetDimensionAttributesForClass(RoutingDimension dimension, int rc_index)
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()
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)
void AddRestoreDimensionValuesResetCallback(Runnable callback)
SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer GetMutableGlobalCumulLPOptimizer(RoutingDimension dimension)
boolean AddDimensionWithCumulDependentVehicleTransitAndCapacity(int[] fixed_evaluator_indices, int[] cumul_dependent_evaluator_indices, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, String name)
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__optionalT_operations_research__RoutingModel__PickupDeliveryPosition_t GetDeliveryPosition(long node_index)
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()
SWIGTYPE_p_std__optionalT_operations_research__RoutingModel__PickupDeliveryPosition_t GetPickupPosition(long node_index)
boolean HasLocalCumulOptimizer(RoutingDimension dimension)
boolean addDimension(int evaluator_index, long slack_max, long capacity, boolean fix_start_cumul_to_zero, String name)
void AddRouteConstraint(SWIGTYPE_p_std__functionT_std__optionalT_long_t_fstd__vectorT_long_t_const_RF_t route_evaluator)
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)
RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(RoutingModel.NodeNeighborsParameters params)
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)
RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio, long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used, boolean add_vehicle_starts_to_neighbors, boolean add_vehicle_ends_to_neighbors)
SWIGTYPE_p_std__optionalT_long_t GetFirstMatchingPickupDeliverySibling(long node, SWIGTYPE_p_std__functionT_bool_flongF_t is_match)
void SetPathEnergyCostOfVehicle(String force, String distance, long cost_per_unit, int vehicle)
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)
SWIGTYPE_p_std__optionalT_long_t GetRouteCost(long[] route)
static final int TYPE_ADDED_TO_VEHICLE
VisitTypePolicy.
long getArcCostForVehicle(long from_index, long to_index, long vehicle)
void setFirstSolutionEvaluator(LongBinaryOperator evaluator)
SWIGTYPE_p_std__dequeT_int_t GetVehiclesOfSameClass(long start_end_index)
RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio, long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used, boolean add_vehicle_starts_to_neighbors, boolean add_vehicle_ends_to_neighbors, boolean only_sort_neighbors_for_partial_neighborhoods)
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)
SWIGTYPE_p_std__functionT_FloatSlopePiecewiseLinearFunction_const_pflong_longF_t CumulDependentTransitCallback(int callback_index)
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)
static final int PENALIZE_ONCE
PenaltyCostBehavior.
long getArcCostForFirstSolution(long from_index, long to_index)
void setPickupAndDeliveryPolicyOfVehicle(int policy, int vehicle)
com.google.ortools.constraintsolver.RoutingSearchStatus.Value status()
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)
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)
SWIGTYPE_p_std__vectorT_std__pairT_long_long_t_t GetSameVehicleClassArcs(long from_index, long to_index)
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)
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 SetPathEnergyCostsOfVehicle(String force, String distance, long threshold, long cost_per_unit_below_threshold, long cost_per_unit_above_threshold, int vehicle)
void addTemporalTypeIncompatibility(int type1, int type2)
int addDisjunction(long[] indices, long penalty, long max_cardinality, int penalty_cost_behavior)
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()
long getHomogeneousCost(long from_index, long to_index)
void setAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment)
int RegisterCumulDependentTransitCallback(SWIGTYPE_p_std__functionT_FloatSlopePiecewiseLinearFunction_const_pflong_longF_t callback)
void AddRouteConstraint(SWIGTYPE_p_std__functionT_std__optionalT_long_t_fstd__vectorT_long_t_const_RF_t route_evaluator, boolean costs_are_homogeneous_across_vehicles)
void addPickupAndDeliverySets(int pickup_disjunction, int delivery_disjunction)
static long getCPtr(Domain obj)
Definition Domain.java:30