Google OR-Tools v9.15
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.4.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, index), 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, dimension_index, 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
897 public int addDisjunction(long[] indices, long penalty, long max_cardinality, int penalty_cost_behavior) {
898 return mainJNI.RoutingModel_addDisjunction__SWIG_0(swigCPtr, this, indices, penalty, max_cardinality, penalty_cost_behavior);
899}
900
925 public int addDisjunction(long[] indices, long penalty, long max_cardinality) {
926 return mainJNI.RoutingModel_addDisjunction__SWIG_1(swigCPtr, this, indices, penalty, max_cardinality);
927}
928
953 public int addDisjunction(long[] indices, long penalty) {
954 return mainJNI.RoutingModel_addDisjunction__SWIG_2(swigCPtr, this, indices, penalty);
955}
956
976 public int addDisjunction(long[] indices) {
977 return mainJNI.RoutingModel_addDisjunction__SWIG_3(swigCPtr, this, indices);
978}
979
983 public int[] getDisjunctionIndices(long index) {
984 return mainJNI.RoutingModel_getDisjunctionIndices(swigCPtr, this, index);
985}
986
991 public long[] GetDisjunctionNodeIndices(int index) {
992 return mainJNI.RoutingModel_GetDisjunctionNodeIndices(swigCPtr, this, index);
993}
994
998 public long getDisjunctionPenalty(int index) {
999 return mainJNI.RoutingModel_getDisjunctionPenalty(swigCPtr, this, index);
1000 }
1001
1006 public long getDisjunctionMaxCardinality(int index) {
1007 return mainJNI.RoutingModel_getDisjunctionMaxCardinality(swigCPtr, this, index);
1008 }
1009
1015 return mainJNI.RoutingModel_GetDisjunctionPenaltyCostBehavior(swigCPtr, this, index);
1016 }
1017
1022 return mainJNI.RoutingModel_getNumberOfDisjunctions(swigCPtr, this);
1023 }
1024
1029 public boolean HasMandatoryDisjunctions() {
1030 return mainJNI.RoutingModel_HasMandatoryDisjunctions(swigCPtr, this);
1031 }
1032
1038 return mainJNI.RoutingModel_HasMaxCardinalityConstrainedDisjunctions(swigCPtr, this);
1039 }
1040
1049 mainJNI.RoutingModel_ignoreDisjunctionsAlreadyForcedToZero(swigCPtr, this);
1050 }
1051
1059 public void addSoftSameVehicleConstraint(long[] indices, long cost) {
1060 mainJNI.RoutingModel_addSoftSameVehicleConstraint(swigCPtr, this, indices, cost);
1061 }
1062
1067 return mainJNI.RoutingModel_GetNumberOfSoftSameVehicleConstraints(swigCPtr, this);
1068 }
1069
1074 public long[] GetSoftSameVehicleIndices(int index) {
1075 return mainJNI.RoutingModel_GetSoftSameVehicleIndices(swigCPtr, this, index);
1076}
1077
1081 public long GetSoftSameVehicleCost(int index) {
1082 return mainJNI.RoutingModel_GetSoftSameVehicleCost(swigCPtr, this, index);
1083 }
1084
1091 public void setAllowedVehiclesForIndex(SWIGTYPE_p_absl__SpanT_int_const_t vehicles, long index) {
1092 mainJNI.RoutingModel_setAllowedVehiclesForIndex(swigCPtr, this, SWIGTYPE_p_absl__SpanT_int_const_t.getCPtr(vehicles), index);
1093 }
1094
1098 public boolean isVehicleAllowedForIndex(int vehicle, long index) {
1099 return mainJNI.RoutingModel_isVehicleAllowedForIndex(swigCPtr, this, vehicle, index);
1100 }
1101
1117 public void addPickupAndDelivery(long pickup, long delivery) {
1118 mainJNI.RoutingModel_addPickupAndDelivery(swigCPtr, this, pickup, delivery);
1119 }
1120
1126 public void addPickupAndDeliverySets(int pickup_disjunction, int delivery_disjunction) {
1127 mainJNI.RoutingModel_addPickupAndDeliverySets(swigCPtr, this, pickup_disjunction, delivery_disjunction);
1128 }
1129
1133 static public class PickupDeliveryPosition {
1134 private transient long swigCPtr;
1135 protected transient boolean swigCMemOwn;
1136
1137 public PickupDeliveryPosition(long cPtr, boolean cMemoryOwn) {
1138 swigCMemOwn = cMemoryOwn;
1139 swigCPtr = cPtr;
1140 }
1141
1142 public static long getCPtr(PickupDeliveryPosition obj) {
1143 return (obj == null) ? 0 : obj.swigCPtr;
1144 }
1145
1146 public static long swigRelease(PickupDeliveryPosition obj) {
1147 long ptr = 0;
1148 if (obj != null) {
1149 if (!obj.swigCMemOwn)
1150 throw new RuntimeException("Cannot release ownership as memory is not owned");
1151 ptr = obj.swigCPtr;
1152 obj.swigCMemOwn = false;
1153 obj.delete();
1154 }
1155 return ptr;
1156 }
1157
1158 @SuppressWarnings({"deprecation", "removal"})
1159 protected void finalize() {
1160 delete();
1161 }
1162
1163 public synchronized void delete() {
1164 if (swigCPtr != 0) {
1165 if (swigCMemOwn) {
1166 swigCMemOwn = false;
1167 mainJNI.delete_RoutingModel_PickupDeliveryPosition(swigCPtr);
1168 }
1169 swigCPtr = 0;
1170 }
1171 }
1172
1176 public void setPd_pair_index(int value) {
1177 mainJNI.RoutingModel_PickupDeliveryPosition_pd_pair_index_set(swigCPtr, this, value);
1178 }
1179
1183 public int getPd_pair_index() {
1184 return mainJNI.RoutingModel_PickupDeliveryPosition_pd_pair_index_get(swigCPtr, this);
1185 }
1186
1191 public void setAlternative_index(int value) {
1192 mainJNI.RoutingModel_PickupDeliveryPosition_alternative_index_set(swigCPtr, this, value);
1193 }
1194
1200 return mainJNI.RoutingModel_PickupDeliveryPosition_alternative_index_get(swigCPtr, this);
1201 }
1202
1204 this(mainJNI.new_RoutingModel_PickupDeliveryPosition(), true);
1205 }
1206
1207 }
1208
1212 public SWIGTYPE_p_std__optionalT_operations_research__RoutingModel__PickupDeliveryPosition_t GetPickupPosition(long node_index) {
1213 return new SWIGTYPE_p_std__optionalT_operations_research__RoutingModel__PickupDeliveryPosition_t(mainJNI.RoutingModel_GetPickupPosition(swigCPtr, this, node_index), true);
1214 }
1215
1219 public SWIGTYPE_p_std__optionalT_operations_research__RoutingModel__PickupDeliveryPosition_t GetDeliveryPosition(long node_index) {
1220 return new SWIGTYPE_p_std__optionalT_operations_research__RoutingModel__PickupDeliveryPosition_t(mainJNI.RoutingModel_GetDeliveryPosition(swigCPtr, this, node_index), true);
1221 }
1222
1226 public boolean IsPickup(long node_index) {
1227 return mainJNI.RoutingModel_IsPickup(swigCPtr, this, node_index);
1228 }
1229
1230 public boolean IsDelivery(long node_index) {
1231 return mainJNI.RoutingModel_IsDelivery(swigCPtr, this, node_index);
1232 }
1233
1239 mainJNI.RoutingModel_setPickupAndDeliveryPolicyOfAllVehicles(swigCPtr, this, policy);
1240 }
1241
1242 public void setPickupAndDeliveryPolicyOfVehicle(int policy, int vehicle) {
1243 mainJNI.RoutingModel_setPickupAndDeliveryPolicyOfVehicle(swigCPtr, this, policy, vehicle);
1244 }
1245
1246 public int getPickupAndDeliveryPolicyOfVehicle(int vehicle) {
1247 return mainJNI.RoutingModel_getPickupAndDeliveryPolicyOfVehicle(swigCPtr, this, vehicle);
1248 }
1249
1255 return mainJNI.RoutingModel_getNumOfSingletonNodes(swigCPtr, this);
1256 }
1257
1258 public SWIGTYPE_p_std__optionalT_long_t GetFirstMatchingPickupDeliverySibling(long node, SWIGTYPE_p_std__functionT_bool_flongF_t is_match) {
1259 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);
1260 }
1261
1262 public void setVisitType(long index, int type, int type_policy) {
1263 mainJNI.RoutingModel_setVisitType(swigCPtr, this, index, type, type_policy);
1264 }
1265
1266 public int getVisitType(long index) {
1267 return mainJNI.RoutingModel_getVisitType(swigCPtr, this, index);
1268 }
1269
1270 public int[] GetSingleNodesOfType(int type) {
1271 return mainJNI.RoutingModel_GetSingleNodesOfType(swigCPtr, this, type);
1272}
1273
1274 public int[] GetPairIndicesOfType(int type) {
1275 return mainJNI.RoutingModel_GetPairIndicesOfType(swigCPtr, this, type);
1276}
1277
1278 public int GetVisitTypePolicy(long index) {
1279 return mainJNI.RoutingModel_GetVisitTypePolicy(swigCPtr, this, index);
1280 }
1281
1283 return mainJNI.RoutingModel_getNumberOfVisitTypes(swigCPtr, this);
1284 }
1285
1295 public void addHardTypeIncompatibility(int type1, int type2) {
1296 mainJNI.RoutingModel_addHardTypeIncompatibility(swigCPtr, this, type1, type2);
1297 }
1298
1299 public void addTemporalTypeIncompatibility(int type1, int type2) {
1300 mainJNI.RoutingModel_addTemporalTypeIncompatibility(swigCPtr, this, type1, type2);
1301 }
1302
1303 public SWIGTYPE_p_absl__flat_hash_setT_int_t getTemporalTypeIncompatibilitiesOfType(int type) {
1304 return new SWIGTYPE_p_absl__flat_hash_setT_int_t(mainJNI.RoutingModel_getTemporalTypeIncompatibilitiesOfType(swigCPtr, this, type), false);
1305 }
1306
1312 return mainJNI.RoutingModel_hasHardTypeIncompatibilities(swigCPtr, this);
1313 }
1314
1316 return mainJNI.RoutingModel_hasTemporalTypeIncompatibilities(swigCPtr, this);
1317 }
1318
1325 public void addRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
1326 mainJNI.RoutingModel_addRequiredTypeAlternativesWhenAddingType(swigCPtr, this, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
1327 }
1328
1336 public void addRequiredTypeAlternativesWhenRemovingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
1337 mainJNI.RoutingModel_addRequiredTypeAlternativesWhenRemovingType(swigCPtr, this, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
1338 }
1339
1343 public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenAddingType(int type) {
1344 return new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(mainJNI.RoutingModel_GetRequiredTypeAlternativesWhenAddingType(swigCPtr, this, type), false);
1345 }
1346
1350 public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenRemovingType(int type) {
1351 return new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(mainJNI.RoutingModel_GetRequiredTypeAlternativesWhenRemovingType(swigCPtr, this, type), false);
1352 }
1353
1359 return mainJNI.RoutingModel_hasSameVehicleTypeRequirements(swigCPtr, this);
1360 }
1361
1363 return mainJNI.RoutingModel_hasTemporalTypeRequirements(swigCPtr, this);
1364 }
1365
1372 public long unperformedPenalty(long var_index) {
1373 return mainJNI.RoutingModel_unperformedPenalty(swigCPtr, this, var_index);
1374 }
1375
1381 public long unperformedPenaltyOrValue(long default_value, long var_index) {
1382 return mainJNI.RoutingModel_unperformedPenaltyOrValue(swigCPtr, this, default_value, var_index);
1383 }
1384
1390 public long getDepot() {
1391 return mainJNI.RoutingModel_getDepot(swigCPtr, this);
1392 }
1393
1400 public void SetMaximumNumberOfActiveVehicles(int max_active_vehicles) {
1401 mainJNI.RoutingModel_SetMaximumNumberOfActiveVehicles(swigCPtr, this, max_active_vehicles);
1402 }
1403
1408 return mainJNI.RoutingModel_GetMaximumNumberOfActiveVehicles(swigCPtr, this);
1409 }
1410
1416 public void setArcCostEvaluatorOfAllVehicles(int evaluator_index) {
1417 mainJNI.RoutingModel_setArcCostEvaluatorOfAllVehicles(swigCPtr, this, evaluator_index);
1418 }
1419
1423 public void setArcCostEvaluatorOfVehicle(int evaluator_index, int vehicle) {
1424 mainJNI.RoutingModel_setArcCostEvaluatorOfVehicle(swigCPtr, this, evaluator_index, vehicle);
1425 }
1426
1431 public void setFixedCostOfAllVehicles(long cost) {
1432 mainJNI.RoutingModel_setFixedCostOfAllVehicles(swigCPtr, this, cost);
1433 }
1434
1438 public void setFixedCostOfVehicle(long cost, int vehicle) {
1439 mainJNI.RoutingModel_setFixedCostOfVehicle(swigCPtr, this, cost, vehicle);
1440 }
1441
1447 public long getFixedCostOfVehicle(int vehicle) {
1448 return mainJNI.RoutingModel_getFixedCostOfVehicle(swigCPtr, this, vehicle);
1449 }
1450
1451 public void SetPathEnergyCostOfVehicle(String force, String distance, long cost_per_unit, int vehicle) {
1452 mainJNI.RoutingModel_SetPathEnergyCostOfVehicle(swigCPtr, this, force, distance, cost_per_unit, vehicle);
1453 }
1454
1455 public void SetPathEnergyCostsOfVehicle(String force, String distance, long threshold, long cost_per_unit_below_threshold, long cost_per_unit_above_threshold, int vehicle) {
1456 mainJNI.RoutingModel_SetPathEnergyCostsOfVehicle(swigCPtr, this, force, distance, threshold, cost_per_unit_below_threshold, cost_per_unit_above_threshold, vehicle);
1457 }
1458
1476 public void setAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor) {
1477 mainJNI.RoutingModel_setAmortizedCostFactorsOfAllVehicles(swigCPtr, this, linear_cost_factor, quadratic_cost_factor);
1478 }
1479
1483 public void setAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle) {
1484 mainJNI.RoutingModel_setAmortizedCostFactorsOfVehicle(swigCPtr, this, linear_cost_factor, quadratic_cost_factor, vehicle);
1485 }
1486
1488 return mainJNI.RoutingModel_getAmortizedLinearCostFactorOfVehicles(swigCPtr, this);
1489}
1490
1492 return mainJNI.RoutingModel_getAmortizedQuadraticCostFactorOfVehicles(swigCPtr, this);
1493}
1494
1495 public SWIGTYPE_p_std__optionalT_long_t GetRouteCost(long[] route) {
1496 return new SWIGTYPE_p_std__optionalT_long_t(mainJNI.RoutingModel_GetRouteCost(swigCPtr, this, route), true);
1497 }
1498
1499 public void SetVehicleUsedWhenEmpty(boolean is_used, int vehicle) {
1500 mainJNI.RoutingModel_SetVehicleUsedWhenEmpty(swigCPtr, this, is_used, vehicle);
1501 }
1502
1503 public boolean IsVehicleUsedWhenEmpty(int vehicle) {
1504 return mainJNI.RoutingModel_IsVehicleUsedWhenEmpty(swigCPtr, this, vehicle);
1505 }
1506
1512 public void setFirstSolutionEvaluator(LongBinaryOperator evaluator) {
1513 mainJNI.RoutingModel_setFirstSolutionEvaluator(swigCPtr, this, evaluator);
1514 }
1515
1523 mainJNI.RoutingModel_SetFirstSolutionHint(swigCPtr, this, Assignment.getCPtr(hint), hint);
1524 }
1525
1530 long cPtr = mainJNI.RoutingModel_GetFirstSolutionHint(swigCPtr, this);
1531 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1532 }
1533
1539 mainJNI.RoutingModel_addLocalSearchOperator(swigCPtr, this, LocalSearchOperator.getCPtr(ls_operator), ls_operator);
1540 }
1541
1545 public void addSearchMonitor(SearchMonitor monitor) {
1546 mainJNI.RoutingModel_addSearchMonitor(swigCPtr, this, SearchMonitor.getCPtr(monitor), monitor);
1547 }
1548
1549 public void AddEnterSearchCallback(Runnable callback) {
1550 mainJNI.RoutingModel_AddEnterSearchCallback(swigCPtr, this, callback);
1551 }
1552
1561 public void addAtSolutionCallback(Runnable callback, boolean track_unchecked_neighbors) {
1562 mainJNI.RoutingModel_addAtSolutionCallback__SWIG_0(swigCPtr, this, callback, track_unchecked_neighbors);
1563 }
1564
1573 public void addAtSolutionCallback(Runnable callback) {
1574 mainJNI.RoutingModel_addAtSolutionCallback__SWIG_1(swigCPtr, this, callback);
1575 }
1576
1577 public void AddRestoreDimensionValuesResetCallback(Runnable callback) {
1578 mainJNI.RoutingModel_AddRestoreDimensionValuesResetCallback(swigCPtr, this, callback);
1579 }
1580
1588 mainJNI.RoutingModel_addVariableMinimizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var);
1589 }
1590
1596 mainJNI.RoutingModel_addVariableMaximizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var);
1597 }
1598
1604 mainJNI.RoutingModel_AddWeightedVariableMinimizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, cost);
1605 }
1606
1612 mainJNI.RoutingModel_AddWeightedVariableMaximizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, cost);
1613 }
1614
1619 public void addVariableTargetToFinalizer(IntVar var, long target) {
1620 mainJNI.RoutingModel_addVariableTargetToFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, target);
1621 }
1622
1627 public void AddWeightedVariableTargetToFinalizer(IntVar var, long target, long cost) {
1628 mainJNI.RoutingModel_AddWeightedVariableTargetToFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, target, cost);
1629 }
1630
1639 public void closeModel() {
1640 mainJNI.RoutingModel_closeModel(swigCPtr, this);
1641 }
1642
1647 public void closeModelWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1648 mainJNI.RoutingModel_closeModelWithParameters(swigCPtr, this, search_parameters.toByteArray());
1649 }
1650
1659 public Assignment solve(Assignment assignment) {
1660 long cPtr = mainJNI.RoutingModel_solve__SWIG_0(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
1661 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1662 }
1663
1673 long cPtr = mainJNI.RoutingModel_solve__SWIG_1(swigCPtr, this);
1674 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1675 }
1676
1686 public Assignment solveWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t solutions) {
1687 long cPtr = mainJNI.RoutingModel_solveWithParameters__SWIG_0(swigCPtr, this, search_parameters.toByteArray(), SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t.getCPtr(solutions));
1688 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1689 }
1690
1700 public Assignment solveWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1701 long cPtr = mainJNI.RoutingModel_solveWithParameters__SWIG_1(swigCPtr, this, search_parameters.toByteArray());
1702 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1703 }
1704
1709 public Assignment solveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t solutions) {
1710 long cPtr = mainJNI.RoutingModel_solveFromAssignmentWithParameters__SWIG_0(swigCPtr, this, Assignment.getCPtr(assignment), assignment, search_parameters.toByteArray(), SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t.getCPtr(solutions));
1711 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1712 }
1713
1718 public Assignment solveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1719 long cPtr = mainJNI.RoutingModel_solveFromAssignmentWithParameters__SWIG_1(swigCPtr, this, Assignment.getCPtr(assignment), assignment, search_parameters.toByteArray());
1720 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1721 }
1722
1729 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) {
1730 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));
1731 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1732 }
1733
1740 public Assignment FastSolveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, boolean check_solution_in_cp) {
1741 long cPtr = mainJNI.RoutingModel_FastSolveFromAssignmentWithParameters__SWIG_1(swigCPtr, this, Assignment.getCPtr(assignment), assignment, search_parameters.toByteArray(), check_solution_in_cp);
1742 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1743 }
1744
1749 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) {
1750 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));
1751 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1752 }
1753
1758 public Assignment SolveFromAssignmentsWithParameters(SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t assignments, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1759 long cPtr = mainJNI.RoutingModel_SolveFromAssignmentsWithParameters__SWIG_1(swigCPtr, this, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t.getCPtr(assignments), search_parameters.toByteArray());
1760 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1761 }
1762
1767 public Assignment SolveWithIteratedLocalSearch(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1768 long cPtr = mainJNI.RoutingModel_SolveWithIteratedLocalSearch(swigCPtr, this, search_parameters.toByteArray());
1769 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1770 }
1771
1779 public void setAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment) {
1780 mainJNI.RoutingModel_setAssignmentFromOtherModelAssignment(swigCPtr, this, Assignment.getCPtr(target_assignment), target_assignment, RoutingModel.getCPtr(source_model), source_model, Assignment.getCPtr(source_assignment), source_assignment);
1781 }
1782
1786 public SWIGTYPE_p_operations_research__SubSolverStatistics GetSubSolverStatistics() {
1787 return new SWIGTYPE_p_operations_research__SubSolverStatistics(mainJNI.RoutingModel_GetSubSolverStatistics(swigCPtr, this), true);
1788 }
1789
1797 public long computeLowerBound() {
1798 return mainJNI.RoutingModel_computeLowerBound(swigCPtr, this);
1799 }
1800
1806 return mainJNI.RoutingModel_objective_lower_bound(swigCPtr, this);
1807 }
1808
1813 return com.google.ortools.constraintsolver.RoutingSearchStatus.Value.forNumber(mainJNI.RoutingModel_status(swigCPtr, this));
1814}
1815
1820 return new RoutingSearchStats(mainJNI.RoutingModel_search_stats(swigCPtr, this), false);
1821 }
1822
1826 public boolean enable_deep_serialization() {
1827 return mainJNI.RoutingModel_enable_deep_serialization(swigCPtr, this);
1828 }
1829
1840 public IntVar applyLocks(SWIGTYPE_p_absl__SpanT_long_const_t locks) {
1841 long cPtr = mainJNI.RoutingModel_applyLocks(swigCPtr, this, SWIGTYPE_p_absl__SpanT_long_const_t.getCPtr(locks));
1842 return (cPtr == 0) ? null : new IntVar(cPtr, false);
1843 }
1844
1855 public boolean applyLocksToAllVehicles(long[][] locks, boolean close_routes) {
1856 return mainJNI.RoutingModel_applyLocksToAllVehicles(swigCPtr, this, locks, close_routes);
1857 }
1858
1866 long cPtr = mainJNI.RoutingModel_preAssignment(swigCPtr, this);
1867 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1868 }
1869
1871 long cPtr = mainJNI.RoutingModel_mutablePreAssignment(swigCPtr, this);
1872 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1873 }
1874
1880 public boolean writeAssignment(String file_name) {
1881 return mainJNI.RoutingModel_writeAssignment(swigCPtr, this, file_name);
1882 }
1883
1889 public Assignment readAssignment(String file_name) {
1890 long cPtr = mainJNI.RoutingModel_readAssignment(swigCPtr, this, file_name);
1891 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1892 }
1893
1899 long cPtr = mainJNI.RoutingModel_restoreAssignment(swigCPtr, this, Assignment.getCPtr(solution), solution);
1900 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1901 }
1902
1910 public Assignment readAssignmentFromRoutes(long[][] routes, boolean ignore_inactive_indices) {
1911 long cPtr = mainJNI.RoutingModel_readAssignmentFromRoutes(swigCPtr, this, routes, ignore_inactive_indices);
1912 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1913 }
1914
1933 public boolean routesToAssignment(long[][] routes, boolean ignore_inactive_indices, boolean close_routes, Assignment assignment) {
1934 return mainJNI.RoutingModel_routesToAssignment(swigCPtr, this, routes, ignore_inactive_indices, close_routes, Assignment.getCPtr(assignment), assignment);
1935 }
1936
1942 public void assignmentToRoutes(Assignment assignment, long[][] routes) {
1943 mainJNI.RoutingModel_assignmentToRoutes(swigCPtr, this, Assignment.getCPtr(assignment), assignment, routes);
1944 }
1945
1970 long cPtr = mainJNI.RoutingModel_compactAssignment(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
1971 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1972 }
1973
1980 long cPtr = mainJNI.RoutingModel_compactAndCheckAssignment(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
1981 return (cPtr == 0) ? null : new Assignment(cPtr, false);
1982 }
1983
1987 public void addToAssignment(IntVar var) {
1988 mainJNI.RoutingModel_addToAssignment(swigCPtr, this, IntVar.getCPtr(var), var);
1989 }
1990
1991 public void addIntervalToAssignment(IntervalVar interval) {
1992 mainJNI.RoutingModel_addIntervalToAssignment(swigCPtr, this, IntervalVar.getCPtr(interval), interval);
1993 }
1994
1995 static public class NodeNeighborsParameters {
1996 private transient long swigCPtr;
1997 protected transient boolean swigCMemOwn;
1998
1999 public NodeNeighborsParameters(long cPtr, boolean cMemoryOwn) {
2000 swigCMemOwn = cMemoryOwn;
2001 swigCPtr = cPtr;
2002 }
2003
2004 public static long getCPtr(NodeNeighborsParameters obj) {
2005 return (obj == null) ? 0 : obj.swigCPtr;
2006 }
2007
2008 public static long swigRelease(NodeNeighborsParameters obj) {
2009 long ptr = 0;
2010 if (obj != null) {
2011 if (!obj.swigCMemOwn)
2012 throw new RuntimeException("Cannot release ownership as memory is not owned");
2013 ptr = obj.swigCPtr;
2014 obj.swigCMemOwn = false;
2015 obj.delete();
2016 }
2017 return ptr;
2018 }
2019
2020 @SuppressWarnings({"deprecation", "removal"})
2021 protected void finalize() {
2022 delete();
2023 }
2024
2025 public synchronized void delete() {
2026 if (swigCPtr != 0) {
2027 if (swigCMemOwn) {
2028 swigCMemOwn = false;
2029 mainJNI.delete_RoutingModel_NodeNeighborsParameters(swigCPtr);
2030 }
2031 swigCPtr = 0;
2032 }
2033 }
2034
2035 public void setNum_neighbors(int value) {
2036 mainJNI.RoutingModel_NodeNeighborsParameters_num_neighbors_set(swigCPtr, this, value);
2037 }
2038
2039 public int getNum_neighbors() {
2040 return mainJNI.RoutingModel_NodeNeighborsParameters_num_neighbors_get(swigCPtr, this);
2041 }
2042
2043 public void setAdd_vehicle_starts_to_neighbors(boolean value) {
2044 mainJNI.RoutingModel_NodeNeighborsParameters_add_vehicle_starts_to_neighbors_set(swigCPtr, this, value);
2045 }
2046
2048 return mainJNI.RoutingModel_NodeNeighborsParameters_add_vehicle_starts_to_neighbors_get(swigCPtr, this);
2049 }
2050
2051 public void setAdd_vehicle_ends_to_neighbors(boolean value) {
2052 mainJNI.RoutingModel_NodeNeighborsParameters_add_vehicle_ends_to_neighbors_set(swigCPtr, this, value);
2053 }
2054
2056 return mainJNI.RoutingModel_NodeNeighborsParameters_add_vehicle_ends_to_neighbors_get(swigCPtr, this);
2057 }
2058
2060 mainJNI.RoutingModel_NodeNeighborsParameters_only_sort_neighbors_for_partial_neighborhoods_set(swigCPtr, this, value);
2061 }
2062
2064 return mainJNI.RoutingModel_NodeNeighborsParameters_only_sort_neighbors_for_partial_neighborhoods_get(swigCPtr, this);
2065 }
2066
2068 this(mainJNI.new_RoutingModel_NodeNeighborsParameters(), true);
2069 }
2070
2071 }
2072
2073 static public class NodeNeighborsByCostClass {
2074 private transient long swigCPtr;
2075 protected transient boolean swigCMemOwn;
2076
2077 public NodeNeighborsByCostClass(long cPtr, boolean cMemoryOwn) {
2078 swigCMemOwn = cMemoryOwn;
2079 swigCPtr = cPtr;
2080 }
2081
2082 public static long getCPtr(NodeNeighborsByCostClass obj) {
2083 return (obj == null) ? 0 : obj.swigCPtr;
2084 }
2085
2086 public static long swigRelease(NodeNeighborsByCostClass obj) {
2087 long ptr = 0;
2088 if (obj != null) {
2089 if (!obj.swigCMemOwn)
2090 throw new RuntimeException("Cannot release ownership as memory is not owned");
2091 ptr = obj.swigCPtr;
2092 obj.swigCMemOwn = false;
2093 obj.delete();
2094 }
2095 return ptr;
2096 }
2097
2098 @SuppressWarnings({"deprecation", "removal"})
2099 protected void finalize() {
2100 delete();
2101 }
2102
2103 public synchronized void delete() {
2104 if (swigCPtr != 0) {
2105 if (swigCMemOwn) {
2106 swigCMemOwn = false;
2107 mainJNI.delete_RoutingModel_NodeNeighborsByCostClass(swigCPtr);
2108 }
2109 swigCPtr = 0;
2110 }
2111 }
2112
2114 this(mainJNI.new_RoutingModel_NodeNeighborsByCostClass(RoutingModel.getCPtr(routing_model), routing_model), true);
2115 }
2116
2121 public void ComputeNeighbors(RoutingModel.NodeNeighborsParameters params) {
2122 mainJNI.RoutingModel_NodeNeighborsByCostClass_ComputeNeighbors(swigCPtr, this, RoutingModel.NodeNeighborsParameters.getCPtr(params), params);
2123 }
2124
2130 public int[] GetIncomingNeighborsOfNodeForCostClass(int cost_class, int node_index) {
2131 return mainJNI.RoutingModel_NodeNeighborsByCostClass_GetIncomingNeighborsOfNodeForCostClass(swigCPtr, this, cost_class, node_index);
2132 }
2133
2139 public int[] GetOutgoingNeighborsOfNodeForCostClass(int cost_class, int node_index) {
2140 return mainJNI.RoutingModel_NodeNeighborsByCostClass_GetOutgoingNeighborsOfNodeForCostClass(swigCPtr, this, cost_class, node_index);
2141 }
2142
2148 public boolean IsNeighborhoodArcForCostClass(int cost_class, long from, long to) {
2149 return mainJNI.RoutingModel_NodeNeighborsByCostClass_IsNeighborhoodArcForCostClass(swigCPtr, this, cost_class, from, to);
2150 }
2151
2152 public boolean IsFullNeighborhood() {
2153 return mainJNI.RoutingModel_NodeNeighborsByCostClass_IsFullNeighborhood(swigCPtr, this);
2154 }
2155
2156 }
2157
2164 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) {
2165 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);
2166 return (cPtr == 0) ? null : new RoutingModel.NodeNeighborsByCostClass(cPtr, false);
2167 }
2168
2175 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) {
2176 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);
2177 return (cPtr == 0) ? null : new RoutingModel.NodeNeighborsByCostClass(cPtr, false);
2178 }
2179
2186 public RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio, long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used, boolean add_vehicle_starts_to_neighbors) {
2187 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);
2188 return (cPtr == 0) ? null : new RoutingModel.NodeNeighborsByCostClass(cPtr, false);
2189 }
2190
2197 public RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio, long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used) {
2198 long cPtr = mainJNI.RoutingModel_GetOrCreateNodeNeighborsByCostClass__SWIG_3(swigCPtr, this, neighbors_ratio, min_neighbors, SWIGTYPE_p_double.getCPtr(neighbors_ratio_used));
2199 return (cPtr == 0) ? null : new RoutingModel.NodeNeighborsByCostClass(cPtr, false);
2200 }
2201
2207 long cPtr = mainJNI.RoutingModel_GetOrCreateNodeNeighborsByCostClass__SWIG_4(swigCPtr, this, RoutingModel.NodeNeighborsParameters.getCPtr(params), params);
2208 return (cPtr == 0) ? null : new RoutingModel.NodeNeighborsByCostClass(cPtr, false);
2209 }
2210
2219 mainJNI.RoutingModel_addLocalSearchFilter(swigCPtr, this, LocalSearchFilter.getCPtr(filter), filter);
2220 }
2221
2226 public long start(int vehicle) {
2227 return mainJNI.RoutingModel_start(swigCPtr, this, vehicle);
2228 }
2229
2233 public long end(int vehicle) {
2234 return mainJNI.RoutingModel_end(swigCPtr, this, vehicle);
2235 }
2236
2240 public boolean isStart(long index) {
2241 return mainJNI.RoutingModel_isStart(swigCPtr, this, index);
2242 }
2243
2247 public boolean isEnd(long index) {
2248 return mainJNI.RoutingModel_isEnd(swigCPtr, this, index);
2249 }
2250
2255 public int VehicleIndex(long index) {
2256 return mainJNI.RoutingModel_VehicleIndex(swigCPtr, this, index);
2257 }
2258
2264 public long next(Assignment assignment, long index) {
2265 return mainJNI.RoutingModel_next(swigCPtr, this, Assignment.getCPtr(assignment), assignment, index);
2266 }
2267
2271 public boolean isVehicleUsed(Assignment assignment, int vehicle) {
2272 return mainJNI.RoutingModel_isVehicleUsed(swigCPtr, this, Assignment.getCPtr(assignment), assignment, vehicle);
2273 }
2274
2279 public IntVar[] nexts() {
2280 return mainJNI.RoutingModel_nexts(swigCPtr, this);
2281}
2282
2287 public IntVar[] vehicleVars() {
2288 return mainJNI.RoutingModel_vehicleVars(swigCPtr, this);
2289}
2290
2296 public IntVar[] ResourceVars(int resource_group) {
2297 return mainJNI.RoutingModel_ResourceVars(swigCPtr, this, resource_group);
2298}
2299
2304 public IntVar nextVar(long index) {
2305 long cPtr = mainJNI.RoutingModel_nextVar(swigCPtr, this, index);
2306 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2307 }
2308
2312 public IntVar activeVar(long index) {
2313 long cPtr = mainJNI.RoutingModel_activeVar(swigCPtr, this, index);
2314 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2315 }
2316
2321 public IntVar activeVehicleVar(int vehicle) {
2322 long cPtr = mainJNI.RoutingModel_activeVehicleVar(swigCPtr, this, vehicle);
2323 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2324 }
2325
2331 public IntVar VehicleRouteConsideredVar(int vehicle) {
2332 long cPtr = mainJNI.RoutingModel_VehicleRouteConsideredVar(swigCPtr, this, vehicle);
2333 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2334 }
2335
2340 public IntVar vehicleVar(long index) {
2341 long cPtr = mainJNI.RoutingModel_vehicleVar(swigCPtr, this, index);
2342 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2343 }
2344
2350 public IntVar ResourceVar(int vehicle, int resource_group) {
2351 long cPtr = mainJNI.RoutingModel_ResourceVar(swigCPtr, this, vehicle, resource_group);
2352 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2353 }
2354
2358 public IntVar costVar() {
2359 long cPtr = mainJNI.RoutingModel_costVar(swigCPtr, this);
2360 return (cPtr == 0) ? null : new IntVar(cPtr, false);
2361 }
2362
2367 public long getArcCostForVehicle(long from_index, long to_index, long vehicle) {
2368 return mainJNI.RoutingModel_getArcCostForVehicle(swigCPtr, this, from_index, to_index, vehicle);
2369 }
2370
2375 return mainJNI.RoutingModel_costsAreHomogeneousAcrossVehicles(swigCPtr, this);
2376 }
2377
2382 public long getHomogeneousCost(long from_index, long to_index) {
2383 return mainJNI.RoutingModel_getHomogeneousCost(swigCPtr, this, from_index, to_index);
2384 }
2385
2390 public long getArcCostForFirstSolution(long from_index, long to_index) {
2391 return mainJNI.RoutingModel_getArcCostForFirstSolution(swigCPtr, this, from_index, to_index);
2392 }
2393
2402 public long getArcCostForClass(long from_index, long to_index, long cost_class_index) {
2403 return mainJNI.RoutingModel_getArcCostForClass(swigCPtr, this, from_index, to_index, cost_class_index);
2404 }
2405
2409 public int getCostClassIndexOfVehicle(long vehicle) {
2410 return mainJNI.RoutingModel_getCostClassIndexOfVehicle(swigCPtr, this, vehicle);
2411}
2412
2417 public boolean hasVehicleWithCostClassIndex(int cost_class_index) {
2418 return mainJNI.RoutingModel_hasVehicleWithCostClassIndex(swigCPtr, this, cost_class_index);
2419 }
2420
2424 public int getCostClassesCount() {
2425 return mainJNI.RoutingModel_getCostClassesCount(swigCPtr, this);
2426 }
2427
2432 return mainJNI.RoutingModel_getNonZeroCostClassesCount(swigCPtr, this);
2433 }
2434
2435 public int getVehicleClassIndexOfVehicle(long vehicle) {
2436 return mainJNI.RoutingModel_getVehicleClassIndexOfVehicle(swigCPtr, this, vehicle);
2437}
2438
2443 public int GetVehicleOfClass(int vehicle_class) {
2444 return mainJNI.RoutingModel_GetVehicleOfClass(swigCPtr, this, vehicle_class);
2445 }
2446
2451 return mainJNI.RoutingModel_getVehicleClassesCount(swigCPtr, this);
2452 }
2453
2457 public int[] getSameVehicleIndicesOfIndex(int node) {
2458 return mainJNI.RoutingModel_getSameVehicleIndicesOfIndex(swigCPtr, this, node);
2459}
2460
2461 public void AddSameActivityGroup(SWIGTYPE_p_absl__SpanT_int_const_t nodes) {
2462 mainJNI.RoutingModel_AddSameActivityGroup(swigCPtr, this, SWIGTYPE_p_absl__SpanT_int_const_t.getCPtr(nodes));
2463 }
2464
2468 public int[] GetSameActivityIndicesOfIndex(int node) {
2469 return mainJNI.RoutingModel_GetSameActivityIndicesOfIndex(swigCPtr, this, node);
2470}
2471
2475 public int GetSameActivityGroupOfIndex(int node) {
2476 return mainJNI.RoutingModel_GetSameActivityGroupOfIndex(swigCPtr, this, node);
2477 }
2478
2482 public int[] GetSameActivityGroups() {
2483 return mainJNI.RoutingModel_GetSameActivityGroups(swigCPtr, this);
2484}
2485
2490 return mainJNI.RoutingModel_GetSameActivityGroupsCount(swigCPtr, this);
2491 }
2492
2496 public int[] GetSameActivityIndicesOfGroup(int group) {
2497 return mainJNI.RoutingModel_GetSameActivityIndicesOfGroup(swigCPtr, this, group);
2498}
2499
2501 return new RoutingModel.VehicleTypeContainer(mainJNI.RoutingModel_GetVehicleTypeContainer(swigCPtr, this), false);
2502 }
2503
2524 public boolean arcIsMoreConstrainedThanArc(long from, long to1, long to2) {
2525 return mainJNI.RoutingModel_arcIsMoreConstrainedThanArc(swigCPtr, this, from, to1, to2);
2526 }
2527
2534 public String debugOutputAssignment(Assignment solution_assignment, String dimension_to_print) {
2535 return mainJNI.RoutingModel_debugOutputAssignment(swigCPtr, this, Assignment.getCPtr(solution_assignment), solution_assignment, dimension_to_print);
2536 }
2537
2546 public boolean CheckIfAssignmentIsFeasible(Assignment assignment, boolean call_at_solution_monitors) {
2547 return mainJNI.RoutingModel_CheckIfAssignmentIsFeasible(swigCPtr, this, Assignment.getCPtr(assignment), assignment, call_at_solution_monitors);
2548 }
2549
2554 public Solver solver() {
2555 long cPtr = mainJNI.RoutingModel_solver(swigCPtr, this);
2556 return (cPtr == 0) ? null : new Solver(cPtr, false);
2557 }
2558
2563 public boolean checkLimit(SWIGTYPE_p_absl__Duration offset) {
2564 return mainJNI.RoutingModel_checkLimit__SWIG_0(swigCPtr, this, SWIGTYPE_p_absl__Duration.getCPtr(offset));
2565 }
2566
2571 public boolean checkLimit() {
2572 return mainJNI.RoutingModel_checkLimit__SWIG_1(swigCPtr, this);
2573 }
2574
2578 public void UpdateTimeLimit(SWIGTYPE_p_absl__Duration time_limit) {
2579 mainJNI.RoutingModel_UpdateTimeLimit(swigCPtr, this, SWIGTYPE_p_absl__Duration.getCPtr(time_limit));
2580 }
2581
2585 public SWIGTYPE_p_absl__Duration TimeBuffer() {
2586 return new SWIGTYPE_p_absl__Duration(mainJNI.RoutingModel_TimeBuffer(swigCPtr, this), true);
2587 }
2588
2592 public SWIGTYPE_p_std__atomicT_bool_t GetMutableCPSatInterrupt() {
2593 long cPtr = mainJNI.RoutingModel_GetMutableCPSatInterrupt(swigCPtr, this);
2594 return (cPtr == 0) ? null : new SWIGTYPE_p_std__atomicT_bool_t(cPtr, false);
2595 }
2596
2600 public SWIGTYPE_p_std__atomicT_bool_t GetMutableCPInterrupt() {
2601 long cPtr = mainJNI.RoutingModel_GetMutableCPInterrupt(swigCPtr, this);
2602 return (cPtr == 0) ? null : new SWIGTYPE_p_std__atomicT_bool_t(cPtr, false);
2603 }
2604
2608 public void CancelSearch() {
2609 mainJNI.RoutingModel_CancelSearch(swigCPtr, this);
2610 }
2611
2616 public int nodes() {
2617 return mainJNI.RoutingModel_nodes(swigCPtr, this);
2618 }
2619
2623 public int vehicles() {
2624 return mainJNI.RoutingModel_vehicles(swigCPtr, this);
2625 }
2626
2630 public long size() {
2631 return mainJNI.RoutingModel_size(swigCPtr, this);
2632 }
2633
2638 public long getNumberOfDecisionsInFirstSolution(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
2639 return mainJNI.RoutingModel_getNumberOfDecisionsInFirstSolution(swigCPtr, this, search_parameters.toByteArray());
2640 }
2641
2642 public long getNumberOfRejectsInFirstSolution(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
2643 return mainJNI.RoutingModel_getNumberOfRejectsInFirstSolution(swigCPtr, this, search_parameters.toByteArray());
2644 }
2645
2649 public boolean isMatchingModel() {
2650 return mainJNI.RoutingModel_isMatchingModel(swigCPtr, this);
2651 }
2652
2657 public boolean AreRoutesInterdependent(SWIGTYPE_p_operations_research__RoutingSearchParameters parameters) {
2658 return mainJNI.RoutingModel_AreRoutesInterdependent(swigCPtr, this, SWIGTYPE_p_operations_research__RoutingSearchParameters.getCPtr(parameters));
2659 }
2660
2675 public DecisionBuilder makeGuidedSlackFinalizer(RoutingDimension dimension, LongUnaryOperator initializer) {
2676 long cPtr = mainJNI.RoutingModel_makeGuidedSlackFinalizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension, initializer);
2677 return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
2678 }
2679
2696 long cPtr = mainJNI.RoutingModel_makeSelfDependentDimensionFinalizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
2697 return (cPtr == 0) ? null : new DecisionBuilder(cPtr, false);
2698 }
2699
2701 return new PathsMetadata(mainJNI.RoutingModel_GetPathsMetadata(swigCPtr, this), false);
2702 }
2703
2708 public SWIGTYPE_p_std__dequeT_int_t GetVehiclesOfSameClass(long start_end_index) {
2709 return new SWIGTYPE_p_std__dequeT_int_t(mainJNI.RoutingModel_GetVehiclesOfSameClass(swigCPtr, this, start_end_index), false);
2710 }
2711
2719 public SWIGTYPE_p_std__vectorT_std__pairT_long_long_t_t GetSameVehicleClassArcs(long from_index, long to_index) {
2720 return new SWIGTYPE_p_std__vectorT_std__pairT_long_long_t_t(mainJNI.RoutingModel_GetSameVehicleClassArcs(swigCPtr, this, from_index, to_index), true);
2721 }
2722
2723 // PickupAndDeliveryPolicy
2727
2731 public final static int PICKUP_AND_DELIVERY_NO_ORDER = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_NO_ORDER_get();
2735 public final static int PICKUP_AND_DELIVERY_LIFO = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_LIFO_get();
2739 public final static int PICKUP_AND_DELIVERY_FIFO = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_FIFO_get();
2740
2741 // TransitEvaluatorSign
2745
2746 public final static int kTransitEvaluatorSignUnknown = mainJNI.RoutingModel_kTransitEvaluatorSignUnknown_get();
2747 public final static int kTransitEvaluatorSignPositiveOrZero = mainJNI.RoutingModel_kTransitEvaluatorSignPositiveOrZero_get();
2748 public final static int kTransitEvaluatorSignNegativeOrZero = mainJNI.RoutingModel_kTransitEvaluatorSignNegativeOrZero_get();
2749
2750 // PenaltyCostBehavior
2755
2756 public final static int PENALIZE_ONCE = mainJNI.RoutingModel_PENALIZE_ONCE_get();
2757 public final static int PENALIZE_PER_INACTIVE = mainJNI.RoutingModel_PENALIZE_PER_INACTIVE_get();
2758
2759 // VisitTypePolicy
2771
2775 public final static int TYPE_ADDED_TO_VEHICLE = mainJNI.RoutingModel_TYPE_ADDED_TO_VEHICLE_get();
2782 public final static int ADDED_TYPE_REMOVED_FROM_VEHICLE = mainJNI.RoutingModel_ADDED_TYPE_REMOVED_FROM_VEHICLE_get();
2787 public final static int TYPE_ON_VEHICLE_UP_TO_VISIT = mainJNI.RoutingModel_TYPE_ON_VEHICLE_UP_TO_VISIT_get();
2794 public final static int TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED = mainJNI.RoutingModel_TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED_get();
2795
2796}
void ComputeNeighbors(RoutingModel.NodeNeighborsParameters params)
boolean IsNeighborhoodArcForCostClass(int cost_class, long from, long to)
RoutingModel.ResourceGroup.Attributes GetDimensionAttributes(int index)
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)
RoutingModel.ResourceGroup.Attributes GetDimensionAttributesForClass(int dimension_index, int rc_index)
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()
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)
Assignment solveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t solutions)
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)
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)
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)
Assignment solveWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t solutions)
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)
void setAllowedVehiclesForIndex(SWIGTYPE_p_absl__SpanT_int_const_t vehicles, long index)
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)
IntVar applyLocks(SWIGTYPE_p_absl__SpanT_long_const_t locks)
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)
void addRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives)
void AddSameActivityGroup(SWIGTYPE_p_absl__SpanT_int_const_t nodes)
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)
SWIGTYPE_p_operations_research__SubSolverStatistics GetSubSolverStatistics()
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 addPickupAndDeliverySets(int pickup_disjunction, int delivery_disjunction)
static long getCPtr(Domain obj)
Definition Domain.java:30