Java Reference
Java Reference
RoutingModel.java
Go to the documentation of this file.
108 mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_vehicle_class_set(swigCPtr, this, value);
112 return mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_vehicle_class_get(swigCPtr, this);
116 mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_fixed_cost_set(swigCPtr, this, value);
120 return mainJNI.RoutingModel_VehicleTypeContainer_VehicleClassEntry_fixed_cost_get(swigCPtr, this);
145 public void setSorted_vehicle_classes_per_type(SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t value) {
146 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));
149 public SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t getSorted_vehicle_classes_per_type() {
150 long cPtr = mainJNI.RoutingModel_VehicleTypeContainer_sorted_vehicle_classes_per_type_get(swigCPtr, this);
151 return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t(cPtr, false);
155 mainJNI.RoutingModel_VehicleTypeContainer_vehicles_per_vehicle_class_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t.getCPtr(value));
159 return new SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t(mainJNI.RoutingModel_VehicleTypeContainer_vehicles_per_vehicle_class_get(swigCPtr, this), true);
245 this(mainJNI.new_RoutingModel_ResourceGroup_Attributes__SWIG_1(Domain.getCPtr(start_domain), start_domain, Domain.getCPtr(end_domain), end_domain), true);
249 return new Domain(mainJNI.RoutingModel_ResourceGroup_Attributes_start_domain(swigCPtr, this), false);
253 return new Domain(mainJNI.RoutingModel_ResourceGroup_Attributes_end_domain(swigCPtr, this), false);
289 public RoutingModel.ResourceGroup.Attributes GetDimensionAttributes(RoutingDimension dimension) {
290 return new RoutingModel.ResourceGroup.Attributes(mainJNI.RoutingModel_ResourceGroup_Resource_GetDimensionAttributes(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension), false);
303 public int AddResource(RoutingModel.ResourceGroup.Attributes attributes, RoutingDimension dimension) {
304 return mainJNI.RoutingModel_ResourceGroup_AddResource(swigCPtr, this, RoutingModel.ResourceGroup.Attributes.getCPtr(attributes), attributes, RoutingDimension.getCPtr(dimension), dimension);
324 public SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__ResourceGroup__Resource_t GetResources() {
325 return new SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__ResourceGroup__Resource_t(mainJNI.RoutingModel_ResourceGroup_GetResources(swigCPtr, this), false);
329 return new RoutingModel.ResourceGroup.Resource(mainJNI.RoutingModel_ResourceGroup_GetResource(swigCPtr, this, resource_index), false);
332 public SWIGTYPE_p_absl__flat_hash_setT_operations_research__RoutingModel__DimensionIndex_t GetAffectedDimensionIndices() {
333 return new SWIGTYPE_p_absl__flat_hash_setT_operations_research__RoutingModel__DimensionIndex_t(mainJNI.RoutingModel_ResourceGroup_GetAffectedDimensionIndices(swigCPtr, this), false);
371 this(mainJNI.new_RoutingModel__SWIG_0(RoutingIndexManager.getCPtr(index_manager), index_manager), true);
374 public RoutingModel(RoutingIndexManager index_manager, com.google.ortools.constraintsolver.RoutingModelParameters parameters) {
375 this(mainJNI.new_RoutingModel__SWIG_1(RoutingIndexManager.getCPtr(index_manager), index_manager, parameters.toByteArray()), true);
427 public boolean addDimension(int evaluator_index, long slack_max, long capacity, boolean fix_start_cumul_to_zero, String name) {
428 return mainJNI.RoutingModel_addDimension(swigCPtr, this, evaluator_index, slack_max, capacity, fix_start_cumul_to_zero, name);
431 public boolean addDimensionWithVehicleTransits(int[] evaluator_indices, long slack_max, long capacity, boolean fix_start_cumul_to_zero, String name) {
432 return mainJNI.RoutingModel_addDimensionWithVehicleTransits(swigCPtr, this, evaluator_indices, slack_max, capacity, fix_start_cumul_to_zero, name);
435 public boolean addDimensionWithVehicleCapacity(int evaluator_index, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, String name) {
436 return mainJNI.RoutingModel_addDimensionWithVehicleCapacity(swigCPtr, this, evaluator_index, slack_max, vehicle_capacities, fix_start_cumul_to_zero, name);
439 public boolean addDimensionWithVehicleTransitAndCapacity(int[] evaluator_indices, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, String name) {
440 return mainJNI.RoutingModel_addDimensionWithVehicleTransitAndCapacity(swigCPtr, this, evaluator_indices, slack_max, vehicle_capacities, fix_start_cumul_to_zero, name);
453 public IntBoolPair addConstantDimensionWithSlack(long value, long capacity, long slack_max, boolean fix_start_cumul_to_zero, String name) {
454 return new IntBoolPair(mainJNI.RoutingModel_addConstantDimensionWithSlack(swigCPtr, this, value, capacity, slack_max, fix_start_cumul_to_zero, name), true);
457 public IntBoolPair addConstantDimension(long value, long capacity, boolean fix_start_cumul_to_zero, String name) {
458 return new IntBoolPair(mainJNI.RoutingModel_addConstantDimension(swigCPtr, this, value, capacity, fix_start_cumul_to_zero, name), true);
472 public IntBoolPair addVectorDimension(long[] values, long capacity, boolean fix_start_cumul_to_zero, String name) {
473 return new IntBoolPair(mainJNI.RoutingModel_addVectorDimension(swigCPtr, this, values, capacity, fix_start_cumul_to_zero, name), true);
487 public IntBoolPair addMatrixDimension(long[][] values, long capacity, boolean fix_start_cumul_to_zero, String name) {
488 return new IntBoolPair(mainJNI.RoutingModel_addMatrixDimension(swigCPtr, this, values, capacity, fix_start_cumul_to_zero, name), true);
502 public Constraint MakePathSpansAndTotalSlacks(RoutingDimension dimension, IntVar[] spans, IntVar[] total_slacks) {
503 long cPtr = mainJNI.RoutingModel_MakePathSpansAndTotalSlacks(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension, spans, total_slacks);
507 public SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__GlobalDimensionCumulOptimizer_t_t GetGlobalDimensionCumulMPOptimizers() {
508 return new SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__GlobalDimensionCumulOptimizer_t_t(mainJNI.RoutingModel_GetGlobalDimensionCumulMPOptimizers(swigCPtr, this), false);
511 public SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer GetMutableGlobalCumulMPOptimizer(RoutingDimension dimension) {
512 long cPtr = mainJNI.RoutingModel_GetMutableGlobalCumulMPOptimizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
513 return (cPtr == 0) ? null : new SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer(cPtr, false);
527 return new RoutingDimension(mainJNI.RoutingModel_getDimensionOrDie(swigCPtr, this, dimension_name), false);
564 public SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__RoutingModel__ResourceGroup_t_t GetResourceGroups() {
565 return new SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__RoutingModel__ResourceGroup_t_t(mainJNI.RoutingModel_GetResourceGroups(swigCPtr, this), false);
578 return mainJNI.RoutingModel_GetDimensionResourceGroupIndices(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
586 return mainJNI.RoutingModel_GetDimensionResourceGroupIndex(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
608 return mainJNI.RoutingModel_addDisjunction__SWIG_0(swigCPtr, this, indices, penalty, max_cardinality);
770 mainJNI.RoutingModel_addPickupAndDeliverySets(swigCPtr, this, pickup_disjunction, delivery_disjunction);
845 return new SWIGTYPE_p_absl__flat_hash_setT_int_t(mainJNI.RoutingModel_getTemporalTypeIncompatibilitiesOfType(swigCPtr, this, type), false);
866 public void addRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
867 mainJNI.RoutingModel_addRequiredTypeAlternativesWhenAddingType(swigCPtr, this, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
877 public void addRequiredTypeAlternativesWhenRemovingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives) {
878 mainJNI.RoutingModel_addRequiredTypeAlternativesWhenRemovingType(swigCPtr, this, dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t.getCPtr(required_type_alternatives));
884 public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenAddingType(int type) {
885 return new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(mainJNI.RoutingModel_GetRequiredTypeAlternativesWhenAddingType(swigCPtr, this, type), false);
891 public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenRemovingType(int type) {
892 return new SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t(mainJNI.RoutingModel_GetRequiredTypeAlternativesWhenRemovingType(swigCPtr, this, type), false);
923 return mainJNI.RoutingModel_unperformedPenaltyOrValue(swigCPtr, this, default_value, var_index);
1009 public void setAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor) {
1010 mainJNI.RoutingModel_setAmortizedCostFactorsOfAllVehicles(swigCPtr, this, linear_cost_factor, quadratic_cost_factor);
1016 public void setAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle) {
1017 mainJNI.RoutingModel_setAmortizedCostFactorsOfVehicle(swigCPtr, this, linear_cost_factor, quadratic_cost_factor, vehicle);
1050 mainJNI.RoutingModel_addLocalSearchOperator(swigCPtr, this, LocalSearchOperator.getCPtr(ls_operator), ls_operator);
1057 mainJNI.RoutingModel_addSearchMonitor(swigCPtr, this, SearchMonitor.getCPtr(monitor), monitor);
1076 mainJNI.RoutingModel_addVariableMinimizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var);
1084 mainJNI.RoutingModel_addVariableMaximizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var);
1092 mainJNI.RoutingModel_AddWeightedVariableMinimizedByFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, cost);
1100 mainJNI.RoutingModel_addVariableTargetToFinalizer(swigCPtr, this, IntVar.getCPtr(var), var, target);
1119 public void closeModelWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1120 mainJNI.RoutingModel_closeModelWithParameters(swigCPtr, this, search_parameters.toByteArray());
1132 long cPtr = mainJNI.RoutingModel_solve__SWIG_0(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
1158 public Assignment solveWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1159 long cPtr = mainJNI.RoutingModel_solveWithParameters(swigCPtr, this, search_parameters.toByteArray());
1167 public Assignment solveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1168 long cPtr = mainJNI.RoutingModel_solveFromAssignmentWithParameters(swigCPtr, this, Assignment.getCPtr(assignment), assignment, search_parameters.toByteArray());
1176 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) {
1177 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));
1185 public Assignment SolveFromAssignmentsWithParameters(SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t assignments, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1186 long cPtr = mainJNI.RoutingModel_SolveFromAssignmentsWithParameters__SWIG_1(swigCPtr, this, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t.getCPtr(assignments), search_parameters.toByteArray());
1197 public void setAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment) {
1198 mainJNI.RoutingModel_setAssignmentFromOtherModelAssignment(swigCPtr, this, Assignment.getCPtr(target_assignment), target_assignment, RoutingModel.getCPtr(source_model), source_model, Assignment.getCPtr(source_assignment), source_assignment);
1288 long cPtr = mainJNI.RoutingModel_restoreAssignment(swigCPtr, this, Assignment.getCPtr(solution), solution);
1300 long cPtr = mainJNI.RoutingModel_readAssignmentFromRoutes(swigCPtr, this, routes, ignore_inactive_indices);
1322 public boolean routesToAssignment(long[][] routes, boolean ignore_inactive_indices, boolean close_routes, Assignment assignment) {
1323 return mainJNI.RoutingModel_routesToAssignment(swigCPtr, this, routes, ignore_inactive_indices, close_routes, Assignment.getCPtr(assignment), assignment);
1332 mainJNI.RoutingModel_assignmentToRoutes(swigCPtr, this, Assignment.getCPtr(assignment), assignment, routes);
1359 long cPtr = mainJNI.RoutingModel_compactAssignment(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
1369 long cPtr = mainJNI.RoutingModel_compactAndCheckAssignment(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
1381 mainJNI.RoutingModel_addIntervalToAssignment(swigCPtr, this, IntervalVar.getCPtr(interval), interval);
1392 mainJNI.RoutingModel_addLocalSearchFilter(swigCPtr, this, LocalSearchFilter.getCPtr(filter), filter);
1438 return mainJNI.RoutingModel_next(swigCPtr, this, Assignment.getCPtr(assignment), assignment, index);
1445 return mainJNI.RoutingModel_isVehicleUsed(swigCPtr, this, Assignment.getCPtr(assignment), assignment, vehicle);
1541 return mainJNI.RoutingModel_getArcCostForVehicle(swigCPtr, this, from_index, to_index, vehicle);
1576 return mainJNI.RoutingModel_getArcCostForClass(swigCPtr, this, from_index, to_index, cost_class_index);
1635 return new RoutingModel.VehicleTypeContainer(mainJNI.RoutingModel_GetVehicleTypeContainer(swigCPtr, this), false);
1668 public String debugOutputAssignment(Assignment solution_assignment, String dimension_to_print) {
1669 return mainJNI.RoutingModel_debugOutputAssignment(swigCPtr, this, Assignment.getCPtr(solution_assignment), solution_assignment, dimension_to_print);
1719 public long getNumberOfDecisionsInFirstSolution(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1720 return mainJNI.RoutingModel_getNumberOfDecisionsInFirstSolution(swigCPtr, this, search_parameters.toByteArray());
1723 public long getNumberOfRejectsInFirstSolution(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters) {
1724 return mainJNI.RoutingModel_getNumberOfRejectsInFirstSolution(swigCPtr, this, search_parameters.toByteArray());
1748 public DecisionBuilder makeGuidedSlackFinalizer(RoutingDimension dimension, LongUnaryOperator initializer) {
1749 long cPtr = mainJNI.RoutingModel_makeGuidedSlackFinalizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension, initializer);
1769 long cPtr = mainJNI.RoutingModel_makeSelfDependentDimensionFinalizer(swigCPtr, this, RoutingDimension.getCPtr(dimension), dimension);
1793 public final static int ROUTING_FAIL_TIMEOUT = mainJNI.RoutingModel_ROUTING_FAIL_TIMEOUT_get();
1807 public final static int PICKUP_AND_DELIVERY_NO_ORDER = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_NO_ORDER_get();
1811 public final static int PICKUP_AND_DELIVERY_LIFO = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_LIFO_get();
1815 public final static int PICKUP_AND_DELIVERY_FIFO = mainJNI.RoutingModel_PICKUP_AND_DELIVERY_FIFO_get();
1835 public final static int TYPE_ADDED_TO_VEHICLE = mainJNI.RoutingModel_TYPE_ADDED_TO_VEHICLE_get();
1842 public final static int ADDED_TYPE_REMOVED_FROM_VEHICLE = mainJNI.RoutingModel_ADDED_TYPE_REMOVED_FROM_VEHICLE_get();
1847 public final static int TYPE_ON_VEHICLE_UP_TO_VISIT = mainJNI.RoutingModel_TYPE_ON_VEHICLE_UP_TO_VISIT_get();
1854 public final static int TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED = mainJNI.RoutingModel_TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED_get();
An Assignment is a variable -> domains mapping, used to report solutions to the user.
Definition: Assignment.java:15
A constraint is the main modeling object.
A DecisionBuilder is responsible for creating the search tree.
Definition: DecisionBuilder.java:15
We call domain any subset of Int64 = [kint64min, kint64max].
Definition: constraintsolver/Domain.java:21
The class IntVar is a subset of IntExpr.
Interval variables are often used in scheduling.
Classes to which this template function can be applied to as of 04/2014.
Definition: LocalSearchFilter.java:43
This class represent a reversible FIFO structure.
Definition: LocalSearchOperator.java:37
Dimensions represent quantities accumulated at nodes along the routes.
Definition: RoutingDimension.java:36
Manager for any NodeIndex <-> variable index conversion.
Definition: RoutingIndexManager.java:34
Attributes for a dimension.
Definition: RoutingModel.java:212
synchronized void delete()
Definition: RoutingModel.java:230
Attributes()
Definition: RoutingModel.java:240
Attributes(long cPtr, boolean cMemoryOwn)
Definition: RoutingModel.java:216
Attributes(Domain start_domain, Domain end_domain)
Definition: RoutingModel.java:244
Domain start_domain()
Definition: RoutingModel.java:248
Domain end_domain()
Definition: RoutingModel.java:252
A Resource sets attributes (costs/constraints) for a set of dimensions.
Definition: RoutingModel.java:261
synchronized void delete()
Definition: RoutingModel.java:279
RoutingModel.ResourceGroup.Attributes GetDimensionAttributes(RoutingDimension dimension)
Definition: RoutingModel.java:289
Resource(long cPtr, boolean cMemoryOwn)
Definition: RoutingModel.java:265
A ResourceGroup defines a set of available Resources with attributes on one or multiple dimensions.
Definition: RoutingModel.java:181
synchronized void delete()
Definition: RoutingModel.java:199
ResourceGroup(long cPtr, boolean cMemoryOwn)
Definition: RoutingModel.java:185
int AddResource(RoutingModel.ResourceGroup.Attributes attributes, RoutingDimension dimension)
Adds a Resource with the given attributes for the corresponding dimension.
Definition: RoutingModel.java:303
SWIGTYPE_p_std__vectorT_operations_research__RoutingModel__ResourceGroup__Resource_t GetResources()
Definition: RoutingModel.java:324
int[] GetVehiclesRequiringAResource()
Definition: RoutingModel.java:316
RoutingModel.ResourceGroup.Resource GetResource(int resource_index)
Definition: RoutingModel.java:328
ResourceGroup(RoutingModel model)
Definition: RoutingModel.java:295
boolean VehicleRequiresAResource(int vehicle)
Definition: RoutingModel.java:320
void NotifyVehicleRequiresAResource(int vehicle)
Notifies that the given vehicle index requires a resource from this group if the vehicle is used (i....
Definition: RoutingModel.java:312
SWIGTYPE_p_absl__flat_hash_setT_operations_research__RoutingModel__DimensionIndex_t GetAffectedDimensionIndices()
Definition: RoutingModel.java:332
int Size()
Definition: RoutingModel.java:336
Definition: RoutingModel.java:79
synchronized void delete()
Definition: RoutingModel.java:97
VehicleClassEntry(long cPtr, boolean cMemoryOwn)
Definition: RoutingModel.java:83
void setFixed_cost(long value)
Definition: RoutingModel.java:115
VehicleClassEntry()
Definition: RoutingModel.java:123
long getFixed_cost()
Definition: RoutingModel.java:119
void setVehicle_class(int value)
Definition: RoutingModel.java:107
int getVehicle_class()
Definition: RoutingModel.java:111
Struct used to sort and store vehicles by their type.
Definition: RoutingModel.java:51
void setVehicles_per_vehicle_class(SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t value)
Definition: RoutingModel.java:154
synchronized void delete()
Definition: RoutingModel.java:69
VehicleTypeContainer(long cPtr, boolean cMemoryOwn)
Definition: RoutingModel.java:55
void setType_index_of_vehicle(int[] value)
Definition: RoutingModel.java:137
SWIGTYPE_p_std__vectorT_std__dequeT_int_t_t getVehicles_per_vehicle_class()
Definition: RoutingModel.java:158
void setSorted_vehicle_classes_per_type(SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t value)
Definition: RoutingModel.java:145
int NumTypes()
Definition: RoutingModel.java:129
VehicleTypeContainer()
Definition: RoutingModel.java:162
int[] getType_index_of_vehicle()
Definition: RoutingModel.java:141
int Type(int vehicle)
Definition: RoutingModel.java:133
SWIGTYPE_p_std__vectorT_std__setT_operations_research__RoutingModel__VehicleTypeContainer__VehicleClassEntry_t_t getSorted_vehicle_classes_per_type()
Definition: RoutingModel.java:149
void setArcCostEvaluatorOfAllVehicles(int evaluator_index)
Sets the cost function of the model such that the cost of a segment of a route between node 'from' a...
Definition: RoutingModel.java:957
IntVar activeVar(long index)
Returns the active variable of the node corresponding to index.
Definition: RoutingModel.java:1485
boolean isVehicleUsed(Assignment assignment, int vehicle)
Returns true if the route of 'vehicle' is non empty in 'assignment'.
Definition: RoutingModel.java:1444
boolean isMatchingModel()
Returns true if a vehicle/node matching problem is detected.
Definition: RoutingModel.java:1730
long end(int vehicle)
Returns the variable index of the ending node of a vehicle route.
Definition: RoutingModel.java:1406
int VehicleIndex(long index)
Returns the vehicle of the given start/end index, and -1 if the given index is not a vehicle start/e...
Definition: RoutingModel.java:1428
int getVehicleClassIndexOfVehicle(long vehicle)
Definition: RoutingModel.java:1608
void addIntervalToAssignment(IntervalVar interval)
Definition: RoutingModel.java:1380
int GetMaximumNumberOfActiveVehicles()
Returns the maximum number of active vehicles.
Definition: RoutingModel.java:948
long getArcCostForClass(long from_index, long to_index, long cost_class_index)
Returns the cost of the segment between two nodes for a given cost class.
Definition: RoutingModel.java:1575
static final int TYPE_ON_VEHICLE_UP_TO_VISIT
With the following policy, the visit enforces that type 'T' is considered on the route from its star...
Definition: RoutingModel.java:1847
void addVariableMaximizedByFinalizer(IntVar var)
Adds a variable to maximize in the solution finalizer (see above for information on the solution fin...
Definition: RoutingModel.java:1083
int getVehicleClassesCount()
Returns the number of different vehicle classes in the model.
Definition: RoutingModel.java:1623
synchronized void delete()
Definition: RoutingModel.java:36
Assignment compactAndCheckAssignment(Assignment assignment)
Same as CompactAssignment() but also checks the validity of the final compact solution; if it is not...
Definition: RoutingModel.java:1368
boolean addDimensionWithVehicleTransits(int[] evaluator_indices, long slack_max, long capacity, boolean fix_start_cumul_to_zero, String name)
Definition: RoutingModel.java:431
Assignment restoreAssignment(Assignment solution)
Restores an assignment as a solution in the routing model and returns the new solution.
Definition: RoutingModel.java:1287
static final int ROUTING_FAIL_TIMEOUT
Time limit reached before finding a solution with RoutingModel::Solve().
Definition: RoutingModel.java:1793
void addRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives)
If type_D depends on type_R when adding type_D, any node_D of type_D and VisitTypePolicy TYPE_ADDED_...
Definition: RoutingModel.java:866
void setPickupAndDeliveryPolicyOfVehicle(int policy, int vehicle)
Definition: RoutingModel.java:781
static long getKNoPenalty()
Constant used to express a hard constraint instead of a soft penalty.
Definition: RoutingModel.java:345
void addLocalSearchOperator(LocalSearchOperator ls_operator)
Adds a local search operator to the set of operators used to solve the vehicle routing problem.
Definition: RoutingModel.java:1049
long[] getAmortizedQuadraticCostFactorOfVehicles()
Definition: RoutingModel.java:1024
int addDisjunction(long[] indices, long penalty)
Adds a disjunction constraint on the indices: exactly 'max_cardinality' of the indices are active.
Definition: RoutingModel.java:629
static int getKNoDisjunction()
Constant used to express the "no disjunction" index, returned when a node does not appear in any dis...
Definition: RoutingModel.java:353
boolean writeAssignment(String file_name)
Writes the current solution to a file containing an AssignmentProto.
Definition: RoutingModel.java:1269
long next(Assignment assignment, long index)
Assignment inspection Returns the variable index of the node directly after the node corresponding ...
Definition: RoutingModel.java:1437
void closeModel()
Closes the current routing model; after this method is called, no modification to the model can be d...
Definition: RoutingModel.java:1111
IntVar activeVehicleVar(int vehicle)
Returns the active variable of the vehicle.
Definition: RoutingModel.java:1494
static int getKNoDimension()
Constant used to express the "no dimension" index, returned when a dimension name does not correspon...
Definition: RoutingModel.java:361
Constraint MakePathSpansAndTotalSlacks(RoutingDimension dimension, IntVar[] spans, IntVar[] total_slacks)
For every vehicle of the routing model:
Definition: RoutingModel.java:502
boolean isStart(long index)
Returns true if 'index' represents the first node of a route.
Definition: RoutingModel.java:1413
SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenAddingType(int type)
Returns the set of requirement alternatives when adding the given type.
Definition: RoutingModel.java:884
int getCostClassIndexOfVehicle(long vehicle)
Get the cost class index of the given vehicle.
Definition: RoutingModel.java:1582
Assignment mutablePreAssignment()
Definition: RoutingModel.java:1259
IntBoolPair addConstantDimension(long value, long capacity, boolean fix_start_cumul_to_zero, String name)
Definition: RoutingModel.java:457
Assignment SolveFromAssignmentsWithParameters(SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t assignments, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)
Same as above but will try all assignments in order as first solutions until one succeeds.
Definition: RoutingModel.java:1185
int GetDimensionResourceGroupIndex(RoutingDimension dimension)
Returns the index of the resource group attached to the dimension.
Definition: RoutingModel.java:585
long getDisjunctionPenalty(int index)
Returns the penalty of the node disjunction of index 'index'.
Definition: RoutingModel.java:673
int getNumberOfDisjunctions()
Returns the number of node disjunctions in the model.
Definition: RoutingModel.java:688
static final int TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED
The visit doesn't have an impact on the number of types 'T' on the route, as it's (virtually) added ...
Definition: RoutingModel.java:1854
long getArcCostForFirstSolution(long from_index, long to_index)
Returns the cost of the arc in the context of the first solution strategy.
Definition: RoutingModel.java:1563
boolean arcIsMoreConstrainedThanArc(long from, long to1, long to2)
Returns whether the arc from->to1 is more constrained than from->to2, taking into account,...
Definition: RoutingModel.java:1658
boolean hasTemporalTypeIncompatibilities()
Definition: RoutingModel.java:856
void addVariableMinimizedByFinalizer(IntVar var)
Adds a variable to minimize in the solution finalizer.
Definition: RoutingModel.java:1075
int getPickupAndDeliveryPolicyOfVehicle(int vehicle)
Definition: RoutingModel.java:785
void AddWeightedVariableMinimizedByFinalizer(IntVar var, long cost)
Adds a variable to minimize in the solution finalizer, with a weighted priority: the higher the more...
Definition: RoutingModel.java:1091
void closeVisitTypes()
This function should be called once all node visit types have been set and prior to adding any incom...
Definition: RoutingModel.java:822
boolean hasSameVehicleTypeRequirements()
Returns true iff any same-route (resp.
Definition: RoutingModel.java:899
IntVar[] nexts()
Returns all next variables of the model, such that Nexts(i) is the next variable of the node corresp...
Definition: RoutingModel.java:1452
IntVar vehicleVar(long index)
Returns the vehicle variable of the node corresponding to index.
Definition: RoutingModel.java:1513
static final int TYPE_ADDED_TO_VEHICLE
Set the node visit types and incompatibilities/requirements between the types (see below).
Definition: RoutingModel.java:1835
Assignment preAssignment()
Returns an assignment used to fix some of the variables of the problem.
Definition: RoutingModel.java:1254
Assignment solveWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)
Solves the current routing model with the given parameters.
Definition: RoutingModel.java:1158
boolean addDimensionWithVehicleTransitAndCapacity(int[] evaluator_indices, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, String name)
Definition: RoutingModel.java:439
int[] getSameVehicleIndicesOfIndex(int node)
Returns variable indices of nodes constrained to be on the same route.
Definition: RoutingModel.java:1630
int GetVisitTypePolicy(long index)
Definition: RoutingModel.java:813
int registerUnaryTransitVector(long[] values)
Registers 'callback' and returns its index.
Definition: RoutingModel.java:381
static final int ADDED_TYPE_REMOVED_FROM_VEHICLE
When visited, one instance of type 'T' previously added to the route (TYPE_ADDED_TO_VEHICLE),...
Definition: RoutingModel.java:1842
Assignment readAssignment(String file_name)
Reads an assignment from a file and returns the current solution.
Definition: RoutingModel.java:1278
int[] GetDimensionResourceGroupIndices(RoutingDimension dimension)
Returns the indices of resource groups for this dimension.
Definition: RoutingModel.java:577
int getNumOfSingletonNodes()
Returns the number of non-start/end nodes which do not appear in a pickup/delivery pair.
Definition: RoutingModel.java:793
int getNonZeroCostClassesCount()
Ditto, minus the 'always zero', built-in cost class.
Definition: RoutingModel.java:1604
boolean isVehicleAllowedForIndex(int vehicle, long index)
Returns true if a vehicle is allowed to visit a given node.
Definition: RoutingModel.java:741
int GetVehicleOfClass(int vehicle_class)
Returns a vehicle of the given vehicle class, and -1 if there are no vehicles for this class.
Definition: RoutingModel.java:1616
IntVar[] vehicleVars()
Returns all vehicle variables of the model, such that VehicleVars(i) is the vehicle variable of the ...
Definition: RoutingModel.java:1460
IntVar[] ResourceVars(int resource_group)
Returns vehicle resource variables for a given resource group, such that ResourceVars(r_g)[v] is the...
Definition: RoutingModel.java:1469
RoutingDimension getMutableDimension(String dimension_name)
Returns a dimension from its name.
Definition: RoutingModel.java:534
int registerPositiveTransitCallback(LongBinaryOperator callback)
Definition: RoutingModel.java:401
static final int ROUTING_INVALID
Model, model parameters or flags are not valid.
Definition: RoutingModel.java:1797
String getPrimaryConstrainedDimension()
Get the primary constrained dimension, or an empty string if it is unset.
Definition: RoutingModel.java:552
boolean hasDimension(String dimension_name)
Returns true if a dimension exists for a given dimension name.
Definition: RoutingModel.java:519
Solver solver()
Returns a vector cumul_bounds, for which cumul_bounds[i][j] is a pair containing the minimum and max...
Definition: RoutingModel.java:1681
static final int PICKUP_AND_DELIVERY_LIFO
Deliveries must be performed in reverse order of pickups.
Definition: RoutingModel.java:1811
void addHardTypeIncompatibility(int type1, int type2)
Incompatibilities: Two nodes with "hard" incompatible types cannot share the same route at all,...
Definition: RoutingModel.java:836
void setAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle)
Sets the linear and quadratic cost factor of the given vehicle.
Definition: RoutingModel.java:1016
void addPickupAndDeliverySets(int pickup_disjunction, int delivery_disjunction)
Same as AddPickupAndDelivery but notifying that the performed node from the disjunction of index 'pi...
Definition: RoutingModel.java:769
long getArcCostForVehicle(long from_index, long to_index, long vehicle)
Returns the cost of the transit arc between two nodes for a given vehicle.
Definition: RoutingModel.java:1540
int getCostClassesCount()
Returns the number of different cost classes in the model.
Definition: RoutingModel.java:1597
void addRequiredTypeAlternativesWhenRemovingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives)
The following requirements apply when visiting dependent nodes that remove their type from the route...
Definition: RoutingModel.java:877
boolean applyLocksToAllVehicles(long[][] locks, boolean close_routes)
Applies lock chains to all vehicles to the next search, such that locks[p] is the lock chain for rou...
Definition: RoutingModel.java:1244
DecisionBuilder makeGuidedSlackFinalizer(RoutingDimension dimension, LongUnaryOperator initializer)
The next few members are in the public section only for testing purposes.
Definition: RoutingModel.java:1748
void setPrimaryConstrainedDimension(String dimension_name)
Set the given dimension as "primary constrained".
Definition: RoutingModel.java:545
void addVariableTargetToFinalizer(IntVar var, long target)
Add a variable to set the closest possible to the target value in the solution finalizer.
Definition: RoutingModel.java:1099
void SetMaximumNumberOfActiveVehicles(int max_active_vehicles)
Constrains the maximum number of active vehicles, aka the number of vehicles which do not have an em...
Definition: RoutingModel.java:941
RoutingDimension getDimensionOrDie(String dimension_name)
Returns a dimension from its name.
Definition: RoutingModel.java:526
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)
Same as above but will try all assignments in order as first solutions until one succeeds.
Definition: RoutingModel.java:1176
IntVar ResourceVar(int vehicle, int resource_group)
Returns the resource variable for the given vehicle index in the given resource group.
Definition: RoutingModel.java:1523
int registerTransitCallback(LongBinaryOperator callback)
Definition: RoutingModel.java:397
SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__GlobalDimensionCumulOptimizer_t_t GetGlobalDimensionCumulMPOptimizers()
Definition: RoutingModel.java:507
long getDisjunctionMaxCardinality(int index)
Returns the maximum number of possible active nodes of the node disjunction of index 'index'.
Definition: RoutingModel.java:681
boolean isEnd(long index)
Returns true if 'index' represents the last node of a route.
Definition: RoutingModel.java:1420
boolean routesToAssignment(long[][] routes, boolean ignore_inactive_indices, boolean close_routes, Assignment assignment)
Fills an assignment from a specification of the routes of the vehicles.
Definition: RoutingModel.java:1322
void setFixedCostOfAllVehicles(long cost)
Sets the fixed cost of all vehicle routes.
Definition: RoutingModel.java:972
void setArcCostEvaluatorOfVehicle(int evaluator_index, int vehicle)
Sets the cost function for a given vehicle route.
Definition: RoutingModel.java:964
boolean IsVehicleUsedWhenEmpty(int vehicle)
Definition: RoutingModel.java:1032
RoutingModel(RoutingIndexManager index_manager)
Constructor taking an index manager.
Definition: RoutingModel.java:370
IntVar VehicleRouteConsideredVar(int vehicle)
Returns the variable specifying whether or not the given vehicle route is considered for costs and c...
Definition: RoutingModel.java:1504
int addDisjunction(long[] indices, long penalty, long max_cardinality)
Adds a disjunction constraint on the indices: exactly 'max_cardinality' of the indices are active.
Definition: RoutingModel.java:607
void addSearchMonitor(SearchMonitor monitor)
Adds a search monitor to the search used to solve the routing model.
Definition: RoutingModel.java:1056
void addTemporalTypeIncompatibility(int type1, int type2)
Definition: RoutingModel.java:840
Assignment solve()
Solves the current routing model; closes the current model.
Definition: RoutingModel.java:1144
void ignoreDisjunctionsAlreadyForcedToZero()
SPECIAL: Makes the solver ignore all the disjunctions whose active variables are all trivially zero ...
Definition: RoutingModel.java:715
void setAllowedVehiclesForIndex(int[] vehicles, long index)
Sets the vehicles which can visit a given node.
Definition: RoutingModel.java:734
void setVisitType(long index, int type, int type_policy)
Definition: RoutingModel.java:797
void addAtSolutionCallback(Runnable callback)
Adds a callback called each time a solution is found during the search.
Definition: RoutingModel.java:1065
boolean hasTemporalTypeRequirements()
Definition: RoutingModel.java:903
static final int PICKUP_AND_DELIVERY_FIFO
Deliveries must be performed in the same order as pickups.
Definition: RoutingModel.java:1815
long computeLowerBound()
Computes a lower bound to the routing problem solving a linear assignment problem.
Definition: RoutingModel.java:1208
void assignmentToRoutes(Assignment assignment, long[][] routes)
Converts the solution in the given assignment to routes for all vehicles.
Definition: RoutingModel.java:1331
SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenRemovingType(int type)
Returns the set of requirement alternatives when removing the given type.
Definition: RoutingModel.java:891
void addSoftSameVehicleConstraint(long[] indices, long cost)
Adds a soft constraint to force a set of variable indices to be on the same vehicle.
Definition: RoutingModel.java:724
int getNumberOfVisitTypes()
Definition: RoutingModel.java:826
IntBoolPair addMatrixDimension(long[][] values, long capacity, boolean fix_start_cumul_to_zero, String name)
Creates a dimension where the transit variable is constrained to be equal to 'values[i][next(i)]' fo...
Definition: RoutingModel.java:487
String debugOutputAssignment(Assignment solution_assignment, String dimension_to_print)
Print some debugging information about an assignment, including the feasible intervals of the CumulV...
Definition: RoutingModel.java:1668
boolean costsAreHomogeneousAcrossVehicles()
Whether costs are homogeneous across all vehicles.
Definition: RoutingModel.java:1547
IntVar applyLocks(long[] locks)
Applies a lock chain to the next search.
Definition: RoutingModel.java:1229
long getFixedCostOfVehicle(int vehicle)
Returns the route fixed cost taken into account if the route of the vehicle is not empty,...
Definition: RoutingModel.java:988
static final int ROUTING_FAIL
No solution found to the problem after calling RoutingModel::Solve().
Definition: RoutingModel.java:1789
boolean addDimensionWithVehicleCapacity(int evaluator_index, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, String name)
Definition: RoutingModel.java:435
int getVisitType(long index)
Definition: RoutingModel.java:801
long getHomogeneousCost(long from_index, long to_index)
Returns the cost of the segment between two nodes supposing all vehicle costs are the same (returns ...
Definition: RoutingModel.java:1555
boolean checkLimit()
Returns true if the search limit has been crossed.
Definition: RoutingModel.java:1689
static final int ROUTING_SUCCESS
Problem solved successfully after calling RoutingModel::Solve().
Definition: RoutingModel.java:1785
long getDepot()
Returns the variable index of the first starting or ending node of all routes.
Definition: RoutingModel.java:931
void setAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor)
The following methods set the linear and quadratic cost factors of vehicles (must be positive values...
Definition: RoutingModel.java:1009
int registerPositiveUnaryTransitCallback(LongUnaryOperator callback)
Definition: RoutingModel.java:389
long[] GetDisjunctionNodeIndices(int index)
Returns the variable indices of the nodes in the disjunction of index 'index'.
Definition: RoutingModel.java:666
Assignment solve(Assignment assignment)
Solves the current routing model; closes the current model.
Definition: RoutingModel.java:1131
boolean HasMaxCardinalityConstrainedDisjunctions()
Returns true if the model contains at least one disjunction which is constrained by its max_cardinal...
Definition: RoutingModel.java:704
int nodes()
Sizes and indices Returns the number of nodes in the model.
Definition: RoutingModel.java:1697
int addDisjunction(long[] indices)
Adds a disjunction constraint on the indices: exactly 'max_cardinality' of the indices are active.
Definition: RoutingModel.java:651
long unperformedPenalty(long var_index)
Get the "unperformed" penalty of a node.
Definition: RoutingModel.java:913
long unperformedPenaltyOrValue(long default_value, long var_index)
Same as above except that it returns default_value instead of 0 when penalty is not well defined (de...
Definition: RoutingModel.java:922
void addLocalSearchFilter(LocalSearchFilter filter)
Adds a custom local search filter to the list of filters used to speed up local search by pruning un...
Definition: RoutingModel.java:1391
long getNumberOfDecisionsInFirstSolution(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)
Returns statistics on first solution search, number of decisions sent to filters,...
Definition: RoutingModel.java:1719
SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer GetMutableGlobalCumulMPOptimizer(RoutingDimension dimension)
Definition: RoutingModel.java:511
void setFixedCostOfVehicle(long cost, int vehicle)
Sets the fixed cost of one vehicle route.
Definition: RoutingModel.java:979
IntVar nextVar(long index)
Returns the next variable of the node corresponding to index.
Definition: RoutingModel.java:1477
boolean addDimension(int evaluator_index, long slack_max, long capacity, boolean fix_start_cumul_to_zero, String name)
Model creation Methods to add dimensions to routes; dimensions represent quantities accumulated at ...
Definition: RoutingModel.java:427
void SetVehicleUsedWhenEmpty(boolean is_used, int vehicle)
Definition: RoutingModel.java:1028
RoutingModel.VehicleTypeContainer GetVehicleTypeContainer()
Definition: RoutingModel.java:1634
IntBoolPair addVectorDimension(long[] values, long capacity, boolean fix_start_cumul_to_zero, String name)
Creates a dimension where the transit variable is constrained to be equal to 'values[i]' for node i;...
Definition: RoutingModel.java:472
Assignment compactAssignment(Assignment assignment)
Converts the solution in the given assignment to routes for all vehicles.
Definition: RoutingModel.java:1358
boolean HasMandatoryDisjunctions()
Returns true if the model contains mandatory disjunctions (ones with kNoPenalty as penalty).
Definition: RoutingModel.java:696
int registerUnaryTransitCallback(LongUnaryOperator callback)
Definition: RoutingModel.java:385
boolean hasVehicleWithCostClassIndex(int cost_class_index)
Returns true iff the model contains a vehicle with the given cost_class_index.
Definition: RoutingModel.java:1590
RoutingModel(RoutingIndexManager index_manager, com.google.ortools.constraintsolver.RoutingModelParameters parameters)
Definition: RoutingModel.java:374
void addPickupAndDelivery(long pickup, long delivery)
Notifies that index1 and index2 form a pair of nodes which should belong to the same route.
Definition: RoutingModel.java:760
int[] getDisjunctionIndices(long index)
Returns the indices of the disjunctions to which an index belongs.
Definition: RoutingModel.java:658
Assignment solveFromAssignmentWithParameters(Assignment assignment, com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)
Same as above, except that if assignment is not null, it will be used as the initial solution.
Definition: RoutingModel.java:1167
IntVar costVar()
Returns the global cost variable which is being minimized.
Definition: RoutingModel.java:1531
void addToAssignment(IntVar var)
Adds an extra variable to the vehicle routing assignment.
Definition: RoutingModel.java:1376
RoutingModel.ResourceGroup GetResourceGroup(int rg_index)
Definition: RoutingModel.java:568
static final int PICKUP_AND_DELIVERY_NO_ORDER
Types of precedence policy applied to pickup and delivery pairs.
Definition: RoutingModel.java:1807
RoutingModel(long cPtr, boolean cMemoryOwn)
Definition: RoutingModel.java:22
int registerTransitMatrix(long[][] values)
Definition: RoutingModel.java:393
long[] getAmortizedLinearCostFactorOfVehicles()
Definition: RoutingModel.java:1020
int[] GetPairIndicesOfType(int type)
Definition: RoutingModel.java:809
IntBoolPair addConstantDimensionWithSlack(long value, long capacity, long slack_max, boolean fix_start_cumul_to_zero, String name)
Creates a dimension where the transit variable is constrained to be equal to 'value'; 'capacity' is ...
Definition: RoutingModel.java:453
void setFirstSolutionEvaluator(LongBinaryOperator evaluator)
Gets/sets the evaluator used during the search.
Definition: RoutingModel.java:1041
SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__RoutingModel__ResourceGroup_t_t GetResourceGroups()
Definition: RoutingModel.java:564
long getNumberOfRejectsInFirstSolution(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)
Definition: RoutingModel.java:1723
boolean hasHardTypeIncompatibilities()
Returns true iff any hard (resp.
Definition: RoutingModel.java:852
Assignment readAssignmentFromRoutes(long[][] routes, boolean ignore_inactive_indices)
Restores the routes as the current solution.
Definition: RoutingModel.java:1299
void closeModelWithParameters(com.google.ortools.constraintsolver.RoutingSearchParameters search_parameters)
Same as above taking search parameters (as of 10/2015 some the parameters have to be set when closin...
Definition: RoutingModel.java:1119
DecisionBuilder makeSelfDependentDimensionFinalizer(RoutingDimension dimension)
MakeSelfDependentDimensionFinalizer is a finalizer for the slacks of a self-dependent dimension.
Definition: RoutingModel.java:1768
SWIGTYPE_p_absl__flat_hash_setT_int_t getTemporalTypeIncompatibilitiesOfType(int type)
Definition: RoutingModel.java:844
void setAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment)
Given a "source_model" and its "source_assignment", resets "target_assignment" with the IntVar varia...
Definition: RoutingModel.java:1197
void setPickupAndDeliveryPolicyOfAllVehicles(int policy)
Sets the Pickup and delivery policy of all vehicles.
Definition: RoutingModel.java:777
int[] GetSingleNodesOfType(int type)
Definition: RoutingModel.java:805
A search monitor is a simple set of callbacks to monitor all search events.
Definition: SearchMonitor.java:14
Solver Class A solver represents the main computation engine.
Definition: Solver.java:76