9package com.google.ortools.constraintsolver;
12import com.google.ortools.util.Domain;
15import java.util.function.LongBinaryOperator;
18import java.util.function.LongUnaryOperator;
21 private transient long swigCPtr;
30 return (obj ==
null) ? 0 : obj.swigCPtr;
37 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
39 obj.swigCMemOwn =
false;
45 @SuppressWarnings({
"deprecation",
"removal"})
54 mainJNI.delete_RoutingModel(swigCPtr);
66 private transient long swigCPtr;
75 return (obj ==
null) ? 0 : obj.swigCPtr;
82 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
84 obj.swigCMemOwn =
false;
90 @SuppressWarnings({
"deprecation",
"removal"})
99 mainJNI.delete_RoutingModel_VehicleTypeContainer(swigCPtr);
106 private transient long swigCPtr;
115 return (obj ==
null) ? 0 : obj.swigCPtr;
122 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
124 obj.swigCMemOwn =
false;
130 @SuppressWarnings({
"deprecation",
"removal"})
139 mainJNI.delete_RoutingModel_VehicleTypeContainer_VehicleClassEntry(swigCPtr);
146 mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_vehicle_class_set(swigCPtr,
this, value);
150 return mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_vehicle_class_get(swigCPtr,
this);
154 mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_fixed_cost_set(swigCPtr,
this, value);
158 return mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_fixed_cost_get(swigCPtr,
this);
162 this(mainJNI.new_RoutingModel_VehicleTypeContainer_VehicleClassEntry(),
true);
168 return mainJNI.RoutingModel_VehicleTypeContainer_NumTypes(swigCPtr,
this);
172 return mainJNI.RoutingModel_VehicleTypeContainer_Type(swigCPtr,
this, vehicle);
176 mainJNI.RoutingModel_VehicleTypeContainer_type_index_of_vehicle_set(swigCPtr,
this, value);
180 return mainJNI.RoutingModel_VehicleTypeContainer_type_index_of_vehicle_get(swigCPtr,
this);
184 mainJNI.RoutingModel_VehicleTypeContainer_sorted_vehicle_classes_per_type_set(swigCPtr,
this, SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t.getCPtr(value));
188 long cPtr = mainJNI.RoutingModel_VehicleTypeContainer_sorted_vehicle_classes_per_type_get(swigCPtr,
this);
189 return (cPtr == 0) ? null :
new SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t(cPtr,
false);
193 mainJNI.RoutingModel_VehicleTypeContainer_vehicles_per_vehicle_class_set(swigCPtr,
this, SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t.getCPtr(value));
197 return new SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t(mainJNI.RoutingModel_VehicleTypeContainer_vehicles_per_vehicle_class_get(swigCPtr,
this),
true);
201 this(mainJNI.new_RoutingModel_VehicleTypeContainer(),
true);
220 private transient long swigCPtr;
229 return (obj ==
null) ? 0 : obj.swigCPtr;
236 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
238 obj.swigCMemOwn =
false;
244 @SuppressWarnings({
"deprecation",
"removal"})
253 mainJNI.delete_RoutingModel_ResourceGroup(swigCPtr);
263 private transient long swigCPtr;
272 return (obj ==
null) ? 0 : obj.swigCPtr;
279 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
281 obj.swigCMemOwn =
false;
287 @SuppressWarnings({
"deprecation",
"removal"})
296 mainJNI.delete_RoutingModel_ResourceGroup_Attributes(swigCPtr);
303 this(mainJNI.new_RoutingModel_ResourceGroup_Attributes__SWIG_0(),
true);
311 return new Domain(mainJNI.RoutingModel_ResourceGroup_Attributes_start_domain(swigCPtr,
this),
false);
315 return new Domain(mainJNI.RoutingModel_ResourceGroup_Attributes_end_domain(swigCPtr,
this),
false);
324 private transient long swigCPtr;
333 return (obj ==
null) ? 0 : obj.swigCPtr;
340 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
342 obj.swigCMemOwn =
false;
348 @SuppressWarnings({
"deprecation",
"removal"})
357 mainJNI.delete_RoutingModel_ResourceGroup_Resource(swigCPtr);
383 mainJNI.RoutingModel_ResourceGroup_NotifyVehicleRequiresAResource(swigCPtr,
this, vehicle);
387 return mainJNI.RoutingModel_ResourceGroup_GetVehiclesRequiringAResource(swigCPtr,
this);
391 return mainJNI.RoutingModel_ResourceGroup_VehicleRequiresAResource(swigCPtr,
this, vehicle);
395 mainJNI.RoutingModel_ResourceGroup_SetAllowedResourcesForVehicle(swigCPtr,
this, vehicle, allowed_resource_indices);
399 mainJNI.RoutingModel_ResourceGroup_ClearAllowedResourcesForVehicle(swigCPtr,
this, vehicle);
403 return new SWIGTYPE_p_absl__flat_hash_setT_int_t(mainJNI.RoutingModel_ResourceGroup_GetResourcesMarkedAllowedForVehicle(swigCPtr,
this, vehicle),
false);
407 return mainJNI.RoutingModel_ResourceGroup_IsResourceAllowedForVehicle(swigCPtr,
this, resource, vehicle);
410 public SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__ResourceGroup__Resource_t
GetResources() {
411 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__ResourceGroup__Resource_t(mainJNI.RoutingModel_ResourceGroup_GetResources(swigCPtr,
this),
false);
414 public RoutingModel.ResourceGroup.Resource
GetResource(
int resource_index) {
419 return new SWIGTYPE_p_absl__flat_hash_setT_RoutingDimensionIndex_t(mainJNI.RoutingModel_ResourceGroup_GetAffectedDimensionIndices(swigCPtr,
this),
false);
423 return mainJNI.RoutingModel_ResourceGroup_GetResourceClassesCount(swigCPtr,
this);
427 return mainJNI.RoutingModel_ResourceGroup_GetResourceIndicesInClass(swigCPtr,
this, resource_class);
430 public SWIGTYPE_p_util_intops__StrongVectorT_operations_research__RoutingModel__ResourceClassIndex_std__vectorT_int_t_t
GetResourceIndicesPerClass() {
431 return new SWIGTYPE_p_util_intops__StrongVectorT_operations_research__RoutingModel__ResourceClassIndex_std__vectorT_int_t_t(mainJNI.RoutingModel_ResourceGroup_GetResourceIndicesPerClass(swigCPtr,
this),
false);
435 return mainJNI.RoutingModel_ResourceGroup_GetResourceClassIndex(swigCPtr,
this, resource_index);
439 return mainJNI.RoutingModel_ResourceGroup_Size(swigCPtr,
this);
443 return mainJNI.RoutingModel_ResourceGroup_Index(swigCPtr,
this);
452 private transient long swigCPtr;
461 return (obj ==
null) ? 0 : obj.swigCPtr;
468 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
470 obj.swigCMemOwn =
false;
476 @SuppressWarnings({
"deprecation",
"removal"})
485 mainJNI.delete_RoutingModel_VariableValuePair(swigCPtr);
492 mainJNI.RoutingModel_VariableValuePair_var_index_set(swigCPtr,
this, value);
496 return mainJNI.RoutingModel_VariableValuePair_var_index_get(swigCPtr,
this);
500 mainJNI.RoutingModel_VariableValuePair_value_set(swigCPtr,
this, value);
504 return mainJNI.RoutingModel_VariableValuePair_value_get(swigCPtr,
this);
508 this(mainJNI.new_RoutingModel_VariableValuePair(),
true);
517 private transient long swigCPtr;
526 return (obj ==
null) ? 0 : obj.swigCPtr;
533 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
535 obj.swigCMemOwn =
false;
541 @SuppressWarnings({
"deprecation",
"removal"})
550 mainJNI.delete_RoutingModel_SecondaryOptimizer(swigCPtr);
557 this(mainJNI.new_RoutingModel_SecondaryOptimizer(
RoutingModel.
getCPtr(model), model, search_parameters.toByteArray(), solve_period),
true);
560 public boolean Solve(SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__VariableValuePair_t in_state, SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__VariableValuePair_t out_state) {
561 return mainJNI.RoutingModel_SecondaryOptimizer_Solve(swigCPtr,
this, SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__VariableValuePair_t.getCPtr(in_state), SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__VariableValuePair_t.getCPtr(out_state));
570 return mainJNI.RoutingModel_kNoPenalty_get();
578 return mainJNI.RoutingModel_kNoDisjunction_get();
586 return mainJNI.RoutingModel_kNoDimension_get();
599 this(mainJNI.new_RoutingModel__SWIG_1(
RoutingIndexManager.
getCPtr(index_manager), index_manager, parameters.toByteArray()),
true);
610 return mainJNI.RoutingModel_registerUnaryTransitVector(swigCPtr,
this, values);
614 return mainJNI.RoutingModel_registerUnaryTransitCallback__SWIG_0(swigCPtr,
this, callback, sign);
618 return mainJNI.RoutingModel_registerUnaryTransitCallback__SWIG_1(swigCPtr,
this, callback);
622 return mainJNI.RoutingModel_registerTransitMatrix(swigCPtr,
this, values);
626 return mainJNI.RoutingModel_registerTransitCallback__SWIG_0(swigCPtr,
this, callback, sign);
630 return mainJNI.RoutingModel_registerTransitCallback__SWIG_1(swigCPtr,
this, callback);
655 public boolean addDimension(
int evaluator_index,
long slack_max,
long capacity,
boolean fix_start_cumul_to_zero, String name) {
656 return mainJNI.RoutingModel_addDimension(swigCPtr,
this, evaluator_index, slack_max, capacity, fix_start_cumul_to_zero, name);
660 return mainJNI.RoutingModel_addDimensionWithVehicleTransits(swigCPtr,
this, evaluator_indices, slack_max, capacity, fix_start_cumul_to_zero, name);
664 return mainJNI.RoutingModel_addDimensionWithVehicleCapacity(swigCPtr,
this, evaluator_index, slack_max, vehicle_capacities, fix_start_cumul_to_zero, name);
668 return mainJNI.RoutingModel_addDimensionWithVehicleTransitAndCapacity(swigCPtr,
this, evaluator_indices, slack_max, vehicle_capacities, fix_start_cumul_to_zero, name);
682 return new IntBoolPair(mainJNI.RoutingModel_addConstantDimensionWithSlack(swigCPtr,
this, value, capacity, slack_max, fix_start_cumul_to_zero, name),
true);
686 return new IntBoolPair(mainJNI.RoutingModel_addConstantDimension(swigCPtr,
this, value, capacity, fix_start_cumul_to_zero, name),
true);
701 return new IntBoolPair(mainJNI.RoutingModel_addVectorDimension(swigCPtr,
this, values, capacity, fix_start_cumul_to_zero, name),
true);
716 return new IntBoolPair(mainJNI.RoutingModel_addMatrixDimension(swigCPtr,
this, values, capacity, fix_start_cumul_to_zero, name),
true);
723 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_p_t(mainJNI.RoutingModel_GetUnaryDimensions(swigCPtr,
this),
true);
730 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t(mainJNI.RoutingModel_GetDimensionsWithGlobalCumulOptimizers(swigCPtr,
this),
true);
734 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t(mainJNI.RoutingModel_GetDimensionsWithLocalCumulOptimizers(swigCPtr,
this),
true);
741 return mainJNI.RoutingModel_HasGlobalCumulOptimizer(swigCPtr,
this,
RoutingDimension.
getCPtr(dimension), dimension);
745 return mainJNI.RoutingModel_HasLocalCumulOptimizer(swigCPtr,
this,
RoutingDimension.
getCPtr(dimension), dimension);
753 long cPtr = mainJNI.RoutingModel_GetMutableGlobalCumulLPOptimizer(swigCPtr,
this,
RoutingDimension.
getCPtr(dimension), dimension);
754 return (cPtr == 0) ? null :
new SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer(cPtr,
false);
758 long cPtr = mainJNI.RoutingModel_GetMutableGlobalCumulMPOptimizer(swigCPtr,
this,
RoutingDimension.
getCPtr(dimension), dimension);
759 return (cPtr == 0) ? null :
new SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer(cPtr,
false);
763 long cPtr = mainJNI.RoutingModel_GetMutableLocalCumulLPOptimizer(swigCPtr,
this,
RoutingDimension.
getCPtr(dimension), dimension);
764 return (cPtr == 0) ? null :
new SWIGTYPE_p_operations_research__LocalDimensionCumulOptimizer(cPtr,
false);
771 return mainJNI.RoutingModel_hasDimension(swigCPtr,
this, dimension_name);
778 return new RoutingDimension(mainJNI.RoutingModel_getDimensionOrDie(swigCPtr,
this, dimension_name),
false);
786 long cPtr = mainJNI.RoutingModel_getMutableDimension(swigCPtr,
this, dimension_name);
797 mainJNI.RoutingModel_setPrimaryConstrainedDimension(swigCPtr,
this, dimension_name);
804 return mainJNI.RoutingModel_getPrimaryConstrainedDimension(swigCPtr,
this);
811 long cPtr = mainJNI.RoutingModel_AddResourceGroup(swigCPtr,
this);
815 public SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__RoutingModel__ResourceGroup_t_t
GetResourceGroups() {
816 return new SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__RoutingModel__ResourceGroup_t_t(mainJNI.RoutingModel_GetResourceGroups(swigCPtr,
this),
false);
820 long cPtr = mainJNI.RoutingModel_GetResourceGroup(swigCPtr,
this, rg_index);
829 return mainJNI.RoutingModel_GetDimensionResourceGroupIndices(swigCPtr,
this,
RoutingDimension.
getCPtr(dimension), dimension);
837 return mainJNI.RoutingModel_GetDimensionResourceGroupIndex(swigCPtr,
this,
RoutingDimension.
getCPtr(dimension), dimension);
859 return mainJNI.RoutingModel_addDisjunction__SWIG_0(swigCPtr,
this, indices, penalty, max_cardinality);
881 return mainJNI.RoutingModel_addDisjunction__SWIG_1(swigCPtr,
this, indices, penalty);
903 return mainJNI.RoutingModel_addDisjunction__SWIG_2(swigCPtr,
this, indices);
910 return mainJNI.RoutingModel_getDisjunctionIndices(swigCPtr,
this, index);
918 return mainJNI.RoutingModel_GetDisjunctionNodeIndices(swigCPtr,
this, index);
925 return mainJNI.RoutingModel_getDisjunctionPenalty(swigCPtr,
this, index);
933 return mainJNI.RoutingModel_getDisjunctionMaxCardinality(swigCPtr,
this, index);
940 return mainJNI.RoutingModel_getNumberOfDisjunctions(swigCPtr,
this);
948 return mainJNI.RoutingModel_HasMandatoryDisjunctions(swigCPtr,
this);
956 return mainJNI.RoutingModel_HasMaxCardinalityConstrainedDisjunctions(swigCPtr,
this);
967 mainJNI.RoutingModel_ignoreDisjunctionsAlreadyForcedToZero(swigCPtr,
this);
976 mainJNI.RoutingModel_addSoftSameVehicleConstraint(swigCPtr,
this, indices, cost);
986 mainJNI.RoutingModel_setAllowedVehiclesForIndex(swigCPtr,
this,
vehicles, index);
993 return mainJNI.RoutingModel_isVehicleAllowedForIndex(swigCPtr,
this, vehicle, index);
1012 mainJNI.RoutingModel_addPickupAndDelivery(swigCPtr,
this, pickup, delivery);
1021 mainJNI.RoutingModel_addPickupAndDeliverySets(swigCPtr,
this, pickup_disjunction, delivery_disjunction);
1028 private transient long swigCPtr;
1037 return (obj ==
null) ? 0 : obj.swigCPtr;
1044 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
1046 obj.swigCMemOwn =
false;
1052 @SuppressWarnings({
"deprecation",
"removal"})
1058 if (swigCPtr != 0) {
1061 mainJNI.delete_RoutingModel_PickupDeliveryPosition(swigCPtr);
1071 mainJNI.RoutingModel_PickupDeliveryPosition_pd_pair_index_set(swigCPtr,
this, value);
1078 return mainJNI.RoutingModel_PickupDeliveryPosition_pd_pair_index_get(swigCPtr,
this);
1086 mainJNI.RoutingModel_PickupDeliveryPosition_alternative_index_set(swigCPtr,
this, value);
1094 return mainJNI.RoutingModel_PickupDeliveryPosition_alternative_index_get(swigCPtr,
this);
1098 this(mainJNI.new_RoutingModel_PickupDeliveryPosition(),
true);
1106 public SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__PickupDeliveryPosition_t
GetPickupPositions(
long node_index) {
1107 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__PickupDeliveryPosition_t(mainJNI.RoutingModel_GetPickupPositions(swigCPtr,
this, node_index),
false);
1113 public SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__PickupDeliveryPosition_t
GetDeliveryPositions(
long node_index) {
1114 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__PickupDeliveryPosition_t(mainJNI.RoutingModel_GetDeliveryPositions(swigCPtr,
this, node_index),
false);
1121 return mainJNI.RoutingModel_IsPickup(swigCPtr,
this, node_index);
1125 return mainJNI.RoutingModel_IsDelivery(swigCPtr,
this, node_index);
1133 mainJNI.RoutingModel_setPickupAndDeliveryPolicyOfAllVehicles(swigCPtr,
this, policy);
1137 mainJNI.RoutingModel_setPickupAndDeliveryPolicyOfVehicle(swigCPtr,
this, policy, vehicle);
1141 return mainJNI.RoutingModel_getPickupAndDeliveryPolicyOfVehicle(swigCPtr,
this, vehicle);
1149 return mainJNI.RoutingModel_getNumOfSingletonNodes(swigCPtr,
this);
1153 mainJNI.RoutingModel_setVisitType(swigCPtr,
this, index, type, type_policy);
1157 return mainJNI.RoutingModel_getVisitType(swigCPtr,
this, index);
1161 return mainJNI.RoutingModel_GetSingleNodesOfType(swigCPtr,
this, type);
1165 return mainJNI.RoutingModel_GetPairIndicesOfType(swigCPtr,
this, type);
1169 return mainJNI.RoutingModel_GetVisitTypePolicy(swigCPtr,
this, index);
1178 mainJNI.RoutingModel_closeVisitTypes(swigCPtr,
this);
1182 return mainJNI.RoutingModel_getNumberOfVisitTypes(swigCPtr,
this);
1192 mainJNI.RoutingModel_addHardTypeIncompatibility(swigCPtr,
this, type1, type2);
1196 mainJNI.RoutingModel_addTemporalTypeIncompatibility(swigCPtr,
this, type1, type2);
1200 return new SWIGTYPE_p_absl__flat_hash_setT_int_t(mainJNI.RoutingModel_getTemporalTypeIncompatibilitiesOfType(swigCPtr,
this, type),
false);
1208 return mainJNI.RoutingModel_hasHardTypeIncompatibilities(swigCPtr,
this);
1212 return mainJNI.RoutingModel_hasTemporalTypeIncompatibilities(swigCPtr,
this);
1222 mainJNI.RoutingModel_addRequiredTypeAlternativesWhenAddingType(swigCPtr,
this, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
1233 mainJNI.RoutingModel_addRequiredTypeAlternativesWhenRemovingType(swigCPtr,
this, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
1240 return new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(mainJNI.RoutingModel_GetRequiredTypeAlternativesWhenAddingType(swigCPtr,
this, type),
false);
1247 return new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(mainJNI.RoutingModel_GetRequiredTypeAlternativesWhenRemovingType(swigCPtr,
this, type),
false);
1255 return mainJNI.RoutingModel_hasSameVehicleTypeRequirements(swigCPtr,
this);
1259 return mainJNI.RoutingModel_hasTemporalTypeRequirements(swigCPtr,
this);
1269 return mainJNI.RoutingModel_unperformedPenalty(swigCPtr,
this, var_index);
1278 return mainJNI.RoutingModel_unperformedPenaltyOrValue(swigCPtr,
this, default_value, var_index);
1287 return mainJNI.RoutingModel_getDepot(swigCPtr,
this);
1297 mainJNI.RoutingModel_SetMaximumNumberOfActiveVehicles(swigCPtr,
this, max_active_vehicles);
1304 return mainJNI.RoutingModel_GetMaximumNumberOfActiveVehicles(swigCPtr,
this);
1313 mainJNI.RoutingModel_setArcCostEvaluatorOfAllVehicles(swigCPtr,
this, evaluator_index);
1320 mainJNI.RoutingModel_setArcCostEvaluatorOfVehicle(swigCPtr,
this, evaluator_index, vehicle);
1328 mainJNI.RoutingModel_setFixedCostOfAllVehicles(swigCPtr,
this, cost);
1335 mainJNI.RoutingModel_setFixedCostOfVehicle(swigCPtr,
this, cost, vehicle);
1344 return mainJNI.RoutingModel_getFixedCostOfVehicle(swigCPtr,
this, vehicle);
1348 mainJNI.RoutingModel_SetPathEnergyCostOfVehicle(swigCPtr,
this, force, distance, unit_cost, vehicle);
1369 mainJNI.RoutingModel_setAmortizedCostFactorsOfAllVehicles(swigCPtr,
this, linear_cost_factor, quadratic_cost_factor);
1376 mainJNI.RoutingModel_setAmortizedCostFactorsOfVehicle(swigCPtr,
this, linear_cost_factor, quadratic_cost_factor, vehicle);
1380 return mainJNI.RoutingModel_getAmortizedLinearCostFactorOfVehicles(swigCPtr,
this);
1384 return mainJNI.RoutingModel_getAmortizedQuadraticCostFactorOfVehicles(swigCPtr,
this);
1388 mainJNI.RoutingModel_SetVehicleUsedWhenEmpty(swigCPtr,
this, is_used, vehicle);
1392 return mainJNI.RoutingModel_IsVehicleUsedWhenEmpty(swigCPtr,
this, vehicle);
1401 mainJNI.RoutingModel_setFirstSolutionEvaluator(swigCPtr,
this, evaluator);
1416 mainJNI.RoutingModel_addSearchMonitor(swigCPtr,
this,
SearchMonitor.
getCPtr(monitor), monitor);
1428 mainJNI.RoutingModel_addAtSolutionCallback__SWIG_0(swigCPtr,
this, callback, track_unchecked_neighbors);
1440 mainJNI.RoutingModel_addAtSolutionCallback__SWIG_1(swigCPtr,
this, callback);
1450 mainJNI.RoutingModel_addVariableMinimizedByFinalizer(swigCPtr,
this,
IntVar.
getCPtr(var), var);
1458 mainJNI.RoutingModel_addVariableMaximizedByFinalizer(swigCPtr,
this,
IntVar.
getCPtr(var), var);
1466 mainJNI.RoutingModel_AddWeightedVariableMinimizedByFinalizer(swigCPtr,
this,
IntVar.
getCPtr(var), var, cost);
1474 mainJNI.RoutingModel_AddWeightedVariableMaximizedByFinalizer(swigCPtr,
this,
IntVar.
getCPtr(var), var, cost);
1482 mainJNI.RoutingModel_addVariableTargetToFinalizer(swigCPtr,
this,
IntVar.
getCPtr(var), var, target);
1490 mainJNI.RoutingModel_AddWeightedVariableTargetToFinalizer(swigCPtr,
this,
IntVar.
getCPtr(var), var, target, cost);
1502 mainJNI.RoutingModel_closeModel(swigCPtr,
this);
1510 mainJNI.RoutingModel_closeModelWithParameters(swigCPtr,
this, search_parameters.toByteArray());
1522 long cPtr = mainJNI.RoutingModel_solve__SWIG_0(swigCPtr,
this,
Assignment.
getCPtr(assignment), assignment);
1523 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1535 long cPtr = mainJNI.RoutingModel_solve__SWIG_1(swigCPtr,
this);
1536 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1549 long cPtr = mainJNI.RoutingModel_solveWithParameters(swigCPtr,
this, search_parameters.toByteArray());
1550 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1558 long cPtr = mainJNI.RoutingModel_solveFromAssignmentWithParameters(swigCPtr,
this,
Assignment.
getCPtr(assignment), assignment, search_parameters.toByteArray());
1559 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1569 long cPtr = mainJNI.RoutingModel_FastSolveFromAssignmentWithParameters__SWIG_0(swigCPtr,
this,
Assignment.
getCPtr(assignment), assignment, search_parameters.toByteArray(), check_solution_in_cp, SWIGTYPE_p_absl__flat_hash_setT_operations_research__IntVar_p_t.
getCPtr(touched));
1570 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1580 long cPtr = mainJNI.RoutingModel_FastSolveFromAssignmentWithParameters__SWIG_1(swigCPtr,
this,
Assignment.
getCPtr(assignment), assignment, search_parameters.toByteArray(), check_solution_in_cp);
1581 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1588 public Assignment SolveFromAssignmentsWithParameters(SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t assignments, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t solutions) {
1589 long cPtr = mainJNI.RoutingModel_SolveFromAssignmentsWithParameters__SWIG_0(swigCPtr,
this, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t.getCPtr(assignments), search_parameters.toByteArray(), SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t.getCPtr(solutions));
1590 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1598 long cPtr = mainJNI.RoutingModel_SolveFromAssignmentsWithParameters__SWIG_1(swigCPtr,
this, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t.getCPtr(assignments), search_parameters.toByteArray());
1599 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1607 long cPtr = mainJNI.RoutingModel_SolveWithIteratedLocalSearch(swigCPtr,
this, search_parameters.toByteArray());
1608 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1630 return mainJNI.RoutingModel_computeLowerBound(swigCPtr,
this);
1638 return mainJNI.RoutingModel_objective_lower_bound(swigCPtr,
this);
1645 return mainJNI.RoutingModel_status(swigCPtr,
this);
1652 return mainJNI.RoutingModel_enable_deep_serialization(swigCPtr,
this);
1666 long cPtr = mainJNI.RoutingModel_applyLocks(swigCPtr,
this, locks);
1667 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
1681 return mainJNI.RoutingModel_applyLocksToAllVehicles(swigCPtr,
this, locks, close_routes);
1691 long cPtr = mainJNI.RoutingModel_preAssignment(swigCPtr,
this);
1692 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1696 long cPtr = mainJNI.RoutingModel_mutablePreAssignment(swigCPtr,
this);
1697 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1706 return mainJNI.RoutingModel_writeAssignment(swigCPtr,
this, file_name);
1715 long cPtr = mainJNI.RoutingModel_readAssignment(swigCPtr,
this, file_name);
1716 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1724 long cPtr = mainJNI.RoutingModel_restoreAssignment(swigCPtr,
this,
Assignment.
getCPtr(solution), solution);
1725 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1736 long cPtr = mainJNI.RoutingModel_readAssignmentFromRoutes(swigCPtr,
this, routes, ignore_inactive_indices);
1737 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1759 return mainJNI.RoutingModel_routesToAssignment(swigCPtr,
this, routes, ignore_inactive_indices, close_routes,
Assignment.
getCPtr(assignment), assignment);
1768 mainJNI.RoutingModel_assignmentToRoutes(swigCPtr,
this,
Assignment.
getCPtr(assignment), assignment, routes);
1795 long cPtr = mainJNI.RoutingModel_compactAssignment(swigCPtr,
this,
Assignment.
getCPtr(assignment), assignment);
1796 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1805 long cPtr = mainJNI.RoutingModel_compactAndCheckAssignment(swigCPtr,
this,
Assignment.
getCPtr(assignment), assignment);
1806 return (cPtr == 0) ? null :
new Assignment(cPtr,
false);
1813 mainJNI.RoutingModel_addToAssignment(swigCPtr,
this,
IntVar.
getCPtr(var), var);
1817 mainJNI.RoutingModel_addIntervalToAssignment(swigCPtr,
this,
IntervalVar.
getCPtr(interval), interval);
1825 private transient long swigCPtr;
1834 return (obj ==
null) ? 0 : obj.swigCPtr;
1841 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
1843 obj.swigCMemOwn =
false;
1849 @SuppressWarnings({
"deprecation",
"removal"})
1855 if (swigCPtr != 0) {
1858 mainJNI.delete_RoutingModel_RouteDimensionTravelInfo(swigCPtr);
1868 private transient long swigCPtr;
1877 return (obj ==
null) ? 0 : obj.swigCPtr;
1884 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
1886 obj.swigCMemOwn =
false;
1892 @SuppressWarnings({
"deprecation",
"removal"})
1898 if (swigCPtr != 0) {
1901 mainJNI.delete_RoutingModel_RouteDimensionTravelInfo_TransitionInfo(swigCPtr);
1913 private transient long swigCPtr;
1922 return (obj ==
null) ? 0 : obj.swigCPtr;
1929 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
1931 obj.swigCMemOwn =
false;
1937 @SuppressWarnings({
"deprecation",
"removal"})
1943 if (swigCPtr != 0) {
1946 mainJNI.delete_RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation(swigCPtr);
1956 mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation_x_anchors_set(swigCPtr,
this, SWIGTYPE_p_absl__InlinedVectorT_long_8_t.getCPtr(value));
1963 return new SWIGTYPE_p_absl__InlinedVectorT_long_8_t(mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation_x_anchors_get(swigCPtr,
this),
true);
1974 mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation_y_anchors_set(swigCPtr,
this, SWIGTYPE_p_absl__InlinedVectorT_long_8_t.getCPtr(value));
1985 return new SWIGTYPE_p_absl__InlinedVectorT_long_8_t(mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation_y_anchors_get(swigCPtr,
this),
true);
1989 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation_toString__SWIG_0(swigCPtr,
this, line_prefix);
1993 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation_toString__SWIG_1(swigCPtr,
this);
1997 this(mainJNI.new_RoutingModel_RouteDimensionTravelInfo_TransitionInfo_PiecewiseLinearFormulation(),
true);
2015 long cPtr = mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_travel_start_dependent_travel_get(swigCPtr,
this);
2034 long cPtr = mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_travel_compression_cost_get(swigCPtr,
this);
2044 mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_pre_travel_transit_value_set(swigCPtr,
this, value);
2053 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_pre_travel_transit_value_get(swigCPtr,
this);
2057 mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_post_travel_transit_value_set(swigCPtr,
this, value);
2061 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_post_travel_transit_value_get(swigCPtr,
this);
2069 mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_compressed_travel_value_lower_bound_set(swigCPtr,
this, value);
2077 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_compressed_travel_value_lower_bound_get(swigCPtr,
this);
2087 mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_travel_value_upper_bound_set(swigCPtr,
this, value);
2097 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_travel_value_upper_bound_get(swigCPtr,
this);
2101 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_toString__SWIG_0(swigCPtr,
this, line_prefix);
2105 return mainJNI.RoutingModel_RouteDimensionTravelInfo_TransitionInfo_toString__SWIG_1(swigCPtr,
this);
2109 this(mainJNI.new_RoutingModel_RouteDimensionTravelInfo_TransitionInfo(),
true);
2118 public void setTransition_info(SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__RouteDimensionTravelInfo__TransitionInfo_t value) {
2119 mainJNI.RoutingModel_RouteDimensionTravelInfo_transition_info_set(swigCPtr,
this, SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__RouteDimensionTravelInfo__TransitionInfo_t.getCPtr(value));
2126 public SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__RouteDimensionTravelInfo__TransitionInfo_t
getTransition_info() {
2127 long cPtr = mainJNI.RoutingModel_RouteDimensionTravelInfo_transition_info_get(swigCPtr,
this);
2128 return (cPtr == 0) ? null :
new SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__RouteDimensionTravelInfo__TransitionInfo_t(cPtr,
false);
2135 mainJNI.RoutingModel_RouteDimensionTravelInfo_travel_cost_coefficient_set(swigCPtr,
this, value);
2142 return mainJNI.RoutingModel_RouteDimensionTravelInfo_travel_cost_coefficient_get(swigCPtr,
this);
2146 return mainJNI.RoutingModel_RouteDimensionTravelInfo_toString__SWIG_0(swigCPtr,
this, line_prefix);
2150 return mainJNI.RoutingModel_RouteDimensionTravelInfo_toString__SWIG_1(swigCPtr,
this);
2154 this(mainJNI.new_RoutingModel_RouteDimensionTravelInfo(),
true);
2160 private transient long swigCPtr;
2169 return (obj ==
null) ? 0 : obj.swigCPtr;
2176 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
2178 obj.swigCMemOwn =
false;
2184 @SuppressWarnings({
"deprecation",
"removal"})
2190 if (swigCPtr != 0) {
2193 mainJNI.delete_RoutingModel_NodeNeighborsByCostClass(swigCPtr);
2200 this(mainJNI.new_RoutingModel_NodeNeighborsByCostClass(),
true);
2208 mainJNI.RoutingModel_NodeNeighborsByCostClass_ComputeNeighbors(swigCPtr,
this,
RoutingModel.
getCPtr(routing_model), routing_model, num_neighbors, add_vehicle_starts_to_neighbors);
2215 return mainJNI.RoutingModel_NodeNeighborsByCostClass_GetNeighborsOfNodeForCostClass(swigCPtr,
this, cost_class, node_index);
2226 public RoutingModel.NodeNeighborsByCostClass
GetOrCreateNodeNeighborsByCostClass(
double neighbors_ratio,
long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used,
boolean add_vehicle_starts_to_neighbors) {
2227 long cPtr = mainJNI.RoutingModel_GetOrCreateNodeNeighborsByCostClass__SWIG_0(swigCPtr,
this, neighbors_ratio, min_neighbors, SWIGTYPE_p_double.getCPtr(neighbors_ratio_used), add_vehicle_starts_to_neighbors);
2238 long cPtr = mainJNI.RoutingModel_GetOrCreateNodeNeighborsByCostClass__SWIG_1(swigCPtr,
this, neighbors_ratio, min_neighbors, SWIGTYPE_p_double.getCPtr(neighbors_ratio_used));
2247 long cPtr = mainJNI.RoutingModel_GetOrCreateNodeNeighborsByCostClass__SWIG_2(swigCPtr,
this, num_neighbors, add_vehicle_starts_to_neighbors);
2256 long cPtr = mainJNI.RoutingModel_GetOrCreateNodeNeighborsByCostClass__SWIG_3(swigCPtr,
this, num_neighbors);
2276 return mainJNI.RoutingModel_start(swigCPtr,
this, vehicle);
2282 public long end(
int vehicle) {
2283 return mainJNI.RoutingModel_end(swigCPtr,
this, vehicle);
2290 return mainJNI.RoutingModel_isStart(swigCPtr,
this, index);
2297 return mainJNI.RoutingModel_isEnd(swigCPtr,
this, index);
2305 return mainJNI.RoutingModel_VehicleIndex(swigCPtr,
this, index);
2314 return mainJNI.RoutingModel_next(swigCPtr,
this,
Assignment.
getCPtr(assignment), assignment, index);
2321 return mainJNI.RoutingModel_isVehicleUsed(swigCPtr,
this,
Assignment.
getCPtr(assignment), assignment, vehicle);
2329 return mainJNI.RoutingModel_nexts(swigCPtr,
this);
2337 return mainJNI.RoutingModel_vehicleVars(swigCPtr,
this);
2346 return mainJNI.RoutingModel_ResourceVars(swigCPtr,
this, resource_group);
2354 long cPtr = mainJNI.RoutingModel_nextVar(swigCPtr,
this, index);
2355 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
2362 long cPtr = mainJNI.RoutingModel_activeVar(swigCPtr,
this, index);
2363 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
2371 long cPtr = mainJNI.RoutingModel_activeVehicleVar(swigCPtr,
this, vehicle);
2372 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
2381 long cPtr = mainJNI.RoutingModel_VehicleRouteConsideredVar(swigCPtr,
this, vehicle);
2382 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
2390 long cPtr = mainJNI.RoutingModel_vehicleVar(swigCPtr,
this, index);
2391 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
2400 long cPtr = mainJNI.RoutingModel_ResourceVar(swigCPtr,
this, vehicle, resource_group);
2401 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
2408 long cPtr = mainJNI.RoutingModel_costVar(swigCPtr,
this);
2409 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
2417 return mainJNI.RoutingModel_getArcCostForVehicle(swigCPtr,
this, from_index, to_index, vehicle);
2424 return mainJNI.RoutingModel_costsAreHomogeneousAcrossVehicles(swigCPtr,
this);
2432 return mainJNI.RoutingModel_getHomogeneousCost(swigCPtr,
this, from_index, to_index);
2440 return mainJNI.RoutingModel_getArcCostForFirstSolution(swigCPtr,
this, from_index, to_index);
2452 return mainJNI.RoutingModel_getArcCostForClass(swigCPtr,
this, from_index, to_index, cost_class_index);
2459 return mainJNI.RoutingModel_getCostClassIndexOfVehicle(swigCPtr,
this, vehicle);
2467 return mainJNI.RoutingModel_hasVehicleWithCostClassIndex(swigCPtr,
this, cost_class_index);
2474 return mainJNI.RoutingModel_getCostClassesCount(swigCPtr,
this);
2481 return mainJNI.RoutingModel_getNonZeroCostClassesCount(swigCPtr,
this);
2485 return mainJNI.RoutingModel_getVehicleClassIndexOfVehicle(swigCPtr,
this, vehicle);
2493 return mainJNI.RoutingModel_GetVehicleOfClass(swigCPtr,
this, vehicle_class);
2500 return mainJNI.RoutingModel_getVehicleClassesCount(swigCPtr,
this);
2507 return mainJNI.RoutingModel_getSameVehicleIndicesOfIndex(swigCPtr,
this, node);
2535 return mainJNI.RoutingModel_arcIsMoreConstrainedThanArc(swigCPtr,
this, from, to1, to2);
2545 return mainJNI.RoutingModel_debugOutputAssignment(swigCPtr,
this,
Assignment.
getCPtr(solution_assignment), solution_assignment, dimension_to_print);
2557 return mainJNI.RoutingModel_CheckIfAssignmentIsFeasible(swigCPtr,
this,
Assignment.
getCPtr(assignment), assignment, call_at_solution_monitors);
2565 long cPtr = mainJNI.RoutingModel_solver(swigCPtr,
this);
2566 return (cPtr == 0) ? null :
new Solver(cPtr,
false);
2574 return mainJNI.RoutingModel_checkLimit__SWIG_0(swigCPtr,
this, SWIGTYPE_p_absl__Duration.getCPtr(offset));
2582 return mainJNI.RoutingModel_checkLimit__SWIG_1(swigCPtr,
this);
2589 mainJNI.RoutingModel_UpdateTimeLimit(swigCPtr,
this, SWIGTYPE_p_absl__Duration.getCPtr(time_limit));
2596 return new SWIGTYPE_p_absl__Duration(mainJNI.RoutingModel_TimeBuffer(swigCPtr,
this),
true);
2603 long cPtr = mainJNI.RoutingModel_GetMutableCPSatInterrupt(swigCPtr,
this);
2604 return (cPtr == 0) ? null :
new SWIGTYPE_p_std__atomicT_bool_t(cPtr,
false);
2611 long cPtr = mainJNI.RoutingModel_GetMutableCPInterrupt(swigCPtr,
this);
2612 return (cPtr == 0) ? null :
new SWIGTYPE_p_std__atomicT_bool_t(cPtr,
false);
2619 mainJNI.RoutingModel_CancelSearch(swigCPtr,
this);
2627 return mainJNI.RoutingModel_nodes(swigCPtr,
this);
2634 return mainJNI.RoutingModel_vehicles(swigCPtr,
this);
2641 return mainJNI.RoutingModel_size(swigCPtr,
this);
2649 return mainJNI.RoutingModel_getNumberOfDecisionsInFirstSolution(swigCPtr,
this, search_parameters.toByteArray());
2653 return mainJNI.RoutingModel_getNumberOfRejectsInFirstSolution(swigCPtr,
this, search_parameters.toByteArray());
2660 return mainJNI.RoutingModel_isMatchingModel(swigCPtr,
this);
2668 return mainJNI.RoutingModel_AreRoutesInterdependent(swigCPtr,
this, SWIGTYPE_p_operations_research__RoutingSearchParameters.getCPtr(parameters));
2686 long cPtr = mainJNI.RoutingModel_makeGuidedSlackFinalizer(swigCPtr,
this,
RoutingDimension.
getCPtr(dimension), dimension, initializer);
2706 long cPtr = mainJNI.RoutingModel_makeSelfDependentDimensionFinalizer(swigCPtr,
this,
RoutingDimension.
getCPtr(dimension), dimension);
2711 return new PathsMetadata(mainJNI.RoutingModel_GetPathsMetadata(swigCPtr,
this),
false);
2736 public final static int ROUTING_FAIL = mainJNI.RoutingModel_ROUTING_FAIL_get();
static long swigRelease(VehicleClassEntry obj)
static long getCPtr(VehicleClassEntry obj)
void setVehicle_class(int value)
synchronized void delete()
VehicleClassEntry(long cPtr, boolean cMemoryOwn)
transient boolean swigCMemOwn
void setFixed_cost(long value)
static long getCPtr(Domain obj)