9package com.google.ortools.constraintsolver;
13import java.util.function.LongBinaryOperator;
37 private transient long swigCPtr;
46 return (obj ==
null) ? 0 : obj.swigCPtr;
53 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
55 obj.swigCMemOwn =
false;
61 @SuppressWarnings({
"deprecation",
"removal"})
70 mainJNI.delete_RoutingDimension(swigCPtr);
80 long cPtr = mainJNI.RoutingDimension_model(swigCPtr,
this);
81 return (cPtr == 0) ? null :
new RoutingModel(cPtr,
false);
90 return mainJNI.RoutingDimension_getTransitValue(swigCPtr,
this, from_index, to_index, vehicle);
98 return mainJNI.RoutingDimension_getTransitValueFromClass(swigCPtr,
this, from_index, to_index, vehicle_class);
106 long cPtr = mainJNI.RoutingDimension_cumulVar(swigCPtr,
this, index);
107 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
111 long cPtr = mainJNI.RoutingDimension_transitVar(swigCPtr,
this, index);
112 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
116 long cPtr = mainJNI.RoutingDimension_fixedTransitVar(swigCPtr,
this, index);
117 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
121 long cPtr = mainJNI.RoutingDimension_slackVar(swigCPtr,
this, index);
122 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
130 return mainJNI.RoutingDimension_cumuls(swigCPtr,
this);
134 return mainJNI.RoutingDimension_fixed_transits(swigCPtr,
this);
138 return mainJNI.RoutingDimension_transits(swigCPtr,
this);
142 return mainJNI.RoutingDimension_slacks(swigCPtr,
this);
151 mainJNI.RoutingDimension_setSpanUpperBoundForVehicle(swigCPtr,
this, upper_bound, vehicle);
163 mainJNI.RoutingDimension_setSpanCostCoefficientForVehicle(swigCPtr,
this, coefficient, vehicle);
167 mainJNI.RoutingDimension_setSpanCostCoefficientForAllVehicles(swigCPtr,
this, coefficient);
180 mainJNI.RoutingDimension_SetSlackCostCoefficientForVehicle(swigCPtr,
this, coefficient, vehicle);
184 mainJNI.RoutingDimension_SetSlackCostCoefficientForAllVehicles(swigCPtr,
this, coefficient);
196 mainJNI.RoutingDimension_setGlobalSpanCostCoefficient(swigCPtr,
this, coefficient);
210 mainJNI.RoutingDimension_setCumulVarSoftUpperBound(swigCPtr,
this, index, upper_bound, coefficient);
218 return mainJNI.RoutingDimension_hasCumulVarSoftUpperBound(swigCPtr,
this, index);
227 return mainJNI.RoutingDimension_getCumulVarSoftUpperBound(swigCPtr,
this, index);
236 return mainJNI.RoutingDimension_getCumulVarSoftUpperBoundCoefficient(swigCPtr,
this, index);
251 mainJNI.RoutingDimension_setCumulVarSoftLowerBound(swigCPtr,
this, index, lower_bound, coefficient);
259 return mainJNI.RoutingDimension_hasCumulVarSoftLowerBound(swigCPtr,
this, index);
268 return mainJNI.RoutingDimension_getCumulVarSoftLowerBound(swigCPtr,
this, index);
277 return mainJNI.RoutingDimension_getCumulVarSoftLowerBoundCoefficient(swigCPtr,
this, index);
298 mainJNI.RoutingDimension_setBreakIntervalsOfVehicle__SWIG_0(swigCPtr,
this, breaks, vehicle, pre_travel_evaluator, post_travel_evaluator);
305 mainJNI.RoutingDimension_setBreakIntervalsOfVehicle__SWIG_1(swigCPtr,
this, breaks, vehicle, node_visit_transits);
315 mainJNI.RoutingDimension_setBreakDistanceDurationOfVehicle(swigCPtr,
this, distance, duration, vehicle);
323 mainJNI.RoutingDimension_InitializeBreaks(swigCPtr,
this);
330 return mainJNI.RoutingDimension_HasBreakConstraints(swigCPtr,
this);
338 mainJNI.RoutingDimension_setBreakIntervalsOfVehicle__SWIG_2(swigCPtr,
this, breaks, vehicle, node_visit_transits, delays);
345 return mainJNI.RoutingDimension_getBreakIntervalsOfVehicle(swigCPtr,
this, vehicle);
349 return mainJNI.RoutingDimension_GetPreTravelEvaluatorOfVehicle(swigCPtr,
this, vehicle);
353 return mainJNI.RoutingDimension_GetPostTravelEvaluatorOfVehicle(swigCPtr,
this, vehicle);
360 long cPtr = mainJNI.RoutingDimension_base_dimension(swigCPtr,
this);
374 return mainJNI.RoutingDimension_shortestTransitionSlack(swigCPtr,
this, node);
381 return mainJNI.RoutingDimension_name(swigCPtr,
this);
385 mainJNI.RoutingDimension_setPickupToDeliveryLimitFunctionForPair(swigCPtr,
this, limit_function, pair_index);
389 return mainJNI.RoutingDimension_hasPickupToDeliveryLimits(swigCPtr,
this);
393 mainJNI.RoutingDimension_addNodePrecedence(swigCPtr,
this, first_node, second_node, offset);
397 return mainJNI.RoutingDimension_getSpanUpperBoundForVehicle(swigCPtr,
this, vehicle);
401 return mainJNI.RoutingDimension_getSpanCostCoefficientForVehicle(swigCPtr,
this, vehicle);
405 return mainJNI.RoutingDimension_GetSlackCostCoefficientForVehicle(swigCPtr,
this, vehicle);
409 return mainJNI.RoutingDimension_getGlobalSpanCostCoefficient(swigCPtr,
this);
413 return mainJNI.RoutingDimension_GetGlobalOptimizerOffset(swigCPtr,
this);
417 return mainJNI.RoutingDimension_getLocalOptimizerOffsetForVehicle(swigCPtr,
this, vehicle);
425 mainJNI.RoutingDimension_setSoftSpanUpperBoundForVehicle(swigCPtr,
this,
BoundCost.
getCPtr(bound_cost), bound_cost, vehicle);
429 return mainJNI.RoutingDimension_hasSoftSpanUpperBounds(swigCPtr,
this);
433 return new BoundCost(mainJNI.RoutingDimension_getSoftSpanUpperBoundForVehicle(swigCPtr,
this, vehicle),
true);
441 mainJNI.RoutingDimension_setQuadraticCostSoftSpanUpperBoundForVehicle(swigCPtr,
this,
BoundCost.
getCPtr(bound_cost), bound_cost, vehicle);
445 return mainJNI.RoutingDimension_hasQuadraticCostSoftSpanUpperBounds(swigCPtr,
this);
449 return new BoundCost(mainJNI.RoutingDimension_getQuadraticCostSoftSpanUpperBoundForVehicle(swigCPtr,
this, vehicle),
true);