public class RoutingModel
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RoutingModel.NodeNeighborsByCostClass |
static class |
RoutingModel.NodeNeighborsParameters |
static class |
RoutingModel.PickupDeliveryPosition
The position of a node in the set of pickup and delivery pairs.
|
static class |
RoutingModel.ResourceGroup
A ResourceGroup defines a set of available Resources with attributes on
one or multiple dimensions. |
static class |
RoutingModel.SecondaryOptimizer
Class used to solve a secondary model within a first solution strategy.
|
static class |
RoutingModel.VariableValuePair
Struct used to store a variable value.
|
static class |
RoutingModel.VehicleTypeContainer
Struct used to sort and store vehicles by their type.
|
Modifier and Type | Field and Description |
---|---|
static int |
ADDED_TYPE_REMOVED_FROM_VEHICLE
When visited, one instance of type 'T' previously added to the route
(TYPE_ADDED_TO_VEHICLE), if any, is removed from the vehicle. |
static int |
kTransitEvaluatorSignNegativeOrZero |
static int |
kTransitEvaluatorSignPositiveOrZero |
static int |
kTransitEvaluatorSignUnknown
Represents the sign of values returned by a transit evaluator.
|
static int |
PENALIZE_ONCE
The following enum is used to describe how the penalty cost is computed
when using AddDisjunction. |
static int |
PENALIZE_PER_INACTIVE |
static int |
PICKUP_AND_DELIVERY_FIFO
Deliveries must be performed in the same order as pickups.
|
static int |
PICKUP_AND_DELIVERY_LIFO
Deliveries must be performed in reverse order of pickups.
|
static int |
PICKUP_AND_DELIVERY_NO_ORDER
Any precedence is accepted.
|
protected boolean |
swigCMemOwn |
static int |
TYPE_ADDED_TO_VEHICLE
When visited, the number of types 'T' on the vehicle increases by one.
|
static int |
TYPE_ON_VEHICLE_UP_TO_VISIT
With the following policy, the visit enforces that type 'T' is
considered on the route from its start until this node is visited. |
static 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 and removed directly. |
Constructor and Description |
---|
RoutingModel(long cPtr,
boolean cMemoryOwn) |
RoutingModel(RoutingIndexManager index_manager)
Constructor taking an index manager.
|
RoutingModel(RoutingIndexManager index_manager,
RoutingModelParameters parameters) |
Modifier and Type | Method and Description |
---|---|
IntVar |
activeVar(long index)
Returns the active variable of the node corresponding to index.
|
IntVar |
activeVehicleVar(int vehicle)
Returns the active variable of the vehicle.
|
void |
addAtSolutionCallback(java.lang.Runnable callback)
Adds a callback called each time a solution is found during the search.
|
void |
addAtSolutionCallback(java.lang.Runnable callback,
boolean track_unchecked_neighbors)
Adds a callback called each time a solution is found during the search.
|
IntBoolPair |
addConstantDimension(long value,
long capacity,
boolean fix_start_cumul_to_zero,
java.lang.String name) |
IntBoolPair |
addConstantDimensionWithSlack(long value,
long capacity,
long slack_max,
boolean fix_start_cumul_to_zero,
java.lang.String name)
Creates a dimension where the transit variable is constrained to be
equal to 'value'; 'capacity' is the upper bound of the cumul variables. |
boolean |
addDimension(int evaluator_index,
long slack_max,
long capacity,
boolean fix_start_cumul_to_zero,
java.lang.String name)
Model creation
Methods to add dimensions to routes; dimensions represent quantities accumulated at nodes along the routes. |
boolean |
AddDimensionWithCumulDependentVehicleTransitAndCapacity(int[] fixed_evaluator_indices,
int[] cumul_dependent_evaluator_indices,
long slack_max,
long[] vehicle_capacities,
boolean fix_start_cumul_to_zero,
java.lang.String name)
Creates a dimension where the transit variable on arc i->j is the sum of:
- A "fixed" transit value, obtained from the fixed_evaluator_index for this vehicle, referencing evaluators in transit_evaluators_, and - A FloatSlopePiecewiseLinearFunction of the cumul of node i, obtained from the cumul_dependent_evaluator_index of this vehicle, pointing to an evaluator in cumul_dependent_transit_evaluators_. |
boolean |
addDimensionWithVehicleCapacity(int evaluator_index,
long slack_max,
long[] vehicle_capacities,
boolean fix_start_cumul_to_zero,
java.lang.String name) |
boolean |
addDimensionWithVehicleTransitAndCapacity(int[] evaluator_indices,
long slack_max,
long[] vehicle_capacities,
boolean fix_start_cumul_to_zero,
java.lang.String name) |
boolean |
addDimensionWithVehicleTransits(int[] evaluator_indices,
long slack_max,
long capacity,
boolean fix_start_cumul_to_zero,
java.lang.String name) |
int |
addDisjunction(long[] indices)
Adds a disjunction constraint on the indices: exactly 'max_cardinality' of
the indices are active. |
int |
addDisjunction(long[] indices,
long penalty)
Adds a disjunction constraint on the indices: exactly 'max_cardinality' of
the indices are active. |
int |
addDisjunction(long[] indices,
long penalty,
long max_cardinality)
Adds a disjunction constraint on the indices: exactly 'max_cardinality' of
the indices are active. |
int |
addDisjunction(long[] indices,
long penalty,
long max_cardinality,
int penalty_cost_behavior)
Adds a disjunction constraint on the indices: exactly 'max_cardinality' of
the indices are active. |
void |
AddEnterSearchCallback(java.lang.Runnable callback) |
void |
addHardTypeIncompatibility(int type1,
int type2)
Incompatibilities:
Two nodes with "hard" incompatible types cannot share the same route at all, while with a "temporal" incompatibility they can't be on the same route at the same time. |
void |
addIntervalToAssignment(IntervalVar interval) |
void |
addLocalSearchFilter(LocalSearchFilter filter)
Adds a custom local search filter to the list of filters used to speed up
local search by pruning unfeasible variable assignments. |
void |
addLocalSearchOperator(LocalSearchOperator ls_operator)
Adds a local search operator to the set of operators used to solve the
vehicle routing problem. |
IntBoolPair |
addMatrixDimension(long[][] values,
long capacity,
boolean fix_start_cumul_to_zero,
java.lang.String name)
Creates a dimension where the transit variable is constrained to be
equal to 'values[i][next(i)]' for node i; 'capacity' is the upper bound of the cumul variables. |
void |
addPickupAndDelivery(long pickup,
long delivery)
Notifies that index1 and index2 form a pair of nodes which should belong
to the same route. |
void |
addPickupAndDeliverySets(int pickup_disjunction,
int delivery_disjunction)
Same as AddPickupAndDelivery but notifying that the performed node from
the disjunction of index 'pickup_disjunction' is on the same route as the performed node from the disjunction of index 'delivery_disjunction'. |
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_TO_VEHICLE or TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED requires at least one type_R on its vehicle at the time node_D is visited. |
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, i.e. type_R must be on the vehicle when type_D of VisitTypePolicy ADDED_TYPE_REMOVED_FROM_VEHICLE, TYPE_ON_VEHICLE_UP_TO_VISIT or TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED is visited. |
RoutingModel.ResourceGroup |
AddResourceGroup()
Adds a resource group to the routing model and returns a pointer to it.
|
void |
AddRestoreDimensionValuesResetCallback(java.lang.Runnable callback) |
void |
AddRouteConstraint(SWIGTYPE_p_std__functionT_std__optionalT_long_t_fstd__vectorT_long_t_const_RF_t route_evaluator) |
void |
AddRouteConstraint(SWIGTYPE_p_std__functionT_std__optionalT_long_t_fstd__vectorT_long_t_const_RF_t route_evaluator,
boolean costs_are_homogeneous_across_vehicles) |
void |
addSearchMonitor(SearchMonitor monitor)
Adds a search monitor to the search used to solve the routing model.
|
void |
addSoftSameVehicleConstraint(long[] indices,
long cost)
Adds a soft constraint to force a set of variable indices to be on the
same vehicle. |
void |
addTemporalTypeIncompatibility(int type1,
int type2) |
void |
addToAssignment(IntVar var)
Adds an extra variable to the vehicle routing assignment.
|
void |
addVariableMaximizedByFinalizer(IntVar var)
Adds a variable to maximize in the solution finalizer (see above for
information on the solution finalizer). |
void |
addVariableMinimizedByFinalizer(IntVar var)
Adds a variable to minimize in the solution finalizer.
|
void |
addVariableTargetToFinalizer(IntVar var,
long target)
Add a variable to set the closest possible to the target value in the
solution finalizer. |
IntBoolPair |
addVectorDimension(long[] values,
long capacity,
boolean fix_start_cumul_to_zero,
java.lang.String name)
Creates a dimension where the transit variable is constrained to be
equal to 'values[i]' for node i; 'capacity' is the upper bound of the cumul variables. |
void |
AddWeightedVariableMaximizedByFinalizer(IntVar var,
long cost)
Adds a variable to maximize in the solution finalizer, with a weighted
priority: the higher the more priority it has. |
void |
AddWeightedVariableMinimizedByFinalizer(IntVar var,
long cost)
Adds a variable to minimize in the solution finalizer, with a weighted
priority: the higher the more priority it has. |
void |
AddWeightedVariableTargetToFinalizer(IntVar var,
long target,
long cost)
Same as above with a weighted priority: the higher the cost, the more
priority it has to be set close to the target value. |
IntVar |
applyLocks(long[] locks)
Applies a lock chain to the next search.
|
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 route p. |
boolean |
arcIsMoreConstrainedThanArc(long from,
long to1,
long to2)
Returns whether the arc from->to1 is more constrained than from->to2,
taking into account, in order: - whether the destination node isn't an end node - whether the destination node is mandatory - whether the destination node is bound to the same vehicle as the source - the "primary constrained" dimension (see SetPrimaryConstrainedDimension) It then breaks ties using, in order: - the arc cost (taking unperformed penalties into account) - the size of the vehicle vars of "to1" and "to2" (lowest size wins) - the value: the lowest value of the indices to1 and to2 wins. |
boolean |
AreRoutesInterdependent(SWIGTYPE_p_operations_research__RoutingSearchParameters parameters)
Returns true if routes are interdependent.
|
void |
assignmentToRoutes(Assignment assignment,
long[][] routes)
Converts the solution in the given assignment to routes for all vehicles.
|
void |
CancelSearch()
Cancels the current search.
|
boolean |
CheckIfAssignmentIsFeasible(Assignment assignment,
boolean call_at_solution_monitors)
Returns a vector cumul_bounds, for which cumul_bounds[i][j] is a pair
containing the minimum and maximum of the CumulVar of the jth node on route i. |
boolean |
checkLimit()
Returns true if the search limit has been crossed with the given time
offset. |
boolean |
checkLimit(SWIGTYPE_p_absl__Duration offset)
Returns true if the search limit has been crossed with the given time
offset. |
void |
closeModel()
Closes the current routing model; after this method is called, no
modification to the model can be done, but RoutesToAssignment becomes available. |
void |
closeModelWithParameters(RoutingSearchParameters search_parameters)
Same as above taking search parameters (as of 10/2015 some the parameters
have to be set when closing the model). |
Assignment |
compactAndCheckAssignment(Assignment assignment)
Same as CompactAssignment() but also checks the validity of the final
compact solution; if it is not valid, no attempts to repair it are made (instead, the method returns nullptr). |
Assignment |
compactAssignment(Assignment assignment)
Converts the solution in the given assignment to routes for all vehicles.
|
long |
computeLowerBound()
Computes a lower bound to the routing problem solving a linear assignment
problem. |
boolean |
costsAreHomogeneousAcrossVehicles()
Whether costs are homogeneous across all vehicles.
|
IntVar |
costVar()
Returns the global cost variable which is being minimized.
|
SWIGTYPE_p_std__functionT_FloatSlopePiecewiseLinearFunction_const_pflong_longF_t |
CumulDependentTransitCallback(int callback_index) |
java.lang.String |
debugOutputAssignment(Assignment solution_assignment,
java.lang.String dimension_to_print)
Print some debugging information about an assignment, including the
feasible intervals of the CumulVar for dimension "dimension_to_print" at each step of the routes. |
void |
delete() |
boolean |
enable_deep_serialization()
Returns the value of the internal enable_deep_serialization_ parameter.
|
long |
end(int vehicle)
Returns the variable index of the ending node of a vehicle route.
|
Assignment |
FastSolveFromAssignmentWithParameters(Assignment assignment,
RoutingSearchParameters search_parameters,
boolean check_solution_in_cp)
Improves a given assignment using unchecked local search.
|
Assignment |
FastSolveFromAssignmentWithParameters(Assignment assignment,
RoutingSearchParameters search_parameters,
boolean check_solution_in_cp,
SWIGTYPE_p_absl__flat_hash_setT_operations_research__IntVar_p_t touched)
Improves a given assignment using unchecked local search.
|
protected void |
finalize() |
long[] |
getAmortizedLinearCostFactorOfVehicles() |
long[] |
getAmortizedQuadraticCostFactorOfVehicles() |
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. |
long |
getArcCostForFirstSolution(long from_index,
long to_index)
Returns the cost of the arc in the context of the first solution strategy.
|
long |
getArcCostForVehicle(long from_index,
long to_index,
long vehicle)
Returns the cost of the transit arc between two nodes for a given vehicle.
|
int |
getCostClassesCount()
Returns the number of different cost classes in the model.
|
int |
getCostClassIndexOfVehicle(long vehicle)
Get the cost class index of the given vehicle.
|
static long |
getCPtr(RoutingModel obj) |
SWIGTYPE_p_std__optionalT_operations_research__RoutingModel__PickupDeliveryPosition_t |
GetDeliveryPosition(long node_index)
Returns the pickup and delivery positions where the node is a delivery.
|
long |
getDepot()
Returns the variable index of the first starting or ending node of all
routes. |
RoutingDimension |
getDimensionOrDie(java.lang.String dimension_name)
Returns a dimension from its name.
|
int |
GetDimensionResourceGroupIndex(RoutingDimension dimension)
Returns the index of the resource group attached to the dimension.
|
int[] |
GetDimensionResourceGroupIndices(RoutingDimension dimension)
Returns the indices of resource groups for this dimension.
|
SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t |
GetDimensionsWithGlobalCumulOptimizers()
Returns the dimensions which have [global|local]_dimension_optimizers_.
|
SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t |
GetDimensionsWithLocalCumulOptimizers() |
int[] |
getDisjunctionIndices(long index)
Returns the indices of the disjunctions to which an index belongs.
|
long |
getDisjunctionMaxCardinality(int index)
Returns the maximum number of possible active nodes of the node
disjunction of index 'index'. |
long[] |
GetDisjunctionNodeIndices(int index)
Returns the variable indices of the nodes in the disjunction of index
'index'. |
long |
getDisjunctionPenalty(int index)
Returns the penalty of the node disjunction of index 'index'.
|
int |
GetDisjunctionPenaltyCostBehavior(int index)
Returns the PenaltyCostBehavior used by the disjunction of index
'index'. |
SWIGTYPE_p_std__optionalT_long_t |
GetFirstMatchingPickupDeliverySibling(long node,
SWIGTYPE_p_std__functionT_bool_flongF_t is_match) |
Assignment |
GetFirstSolutionHint()
Returns the current hint assignment.
|
long |
getFixedCostOfVehicle(int vehicle)
Returns the route fixed cost taken into account if the route of the
vehicle is not empty, aka there's at least one node on the route other than the first and last nodes. |
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 the cost for the first vehicle otherwise). |
static int |
getKNoDimension()
Constant used to express the "no dimension" index, returned when a
dimension name does not correspond to an actual dimension. |
static int |
getKNoDisjunction()
Constant used to express the "no disjunction" index, returned when a node
does not appear in any disjunction. |
static long |
getKNoPenalty()
Constant used to express a hard constraint instead of a soft penalty.
|
int |
GetMaximumNumberOfActiveVehicles()
Returns the maximum number of active vehicles.
|
SWIGTYPE_p_std__atomicT_bool_t |
GetMutableCPInterrupt()
Returns the atomic<bool> to stop the CP solver.
|
SWIGTYPE_p_std__atomicT_bool_t |
GetMutableCPSatInterrupt()
Returns the atomic<bool> to stop the CP-SAT solver.
|
RoutingDimension |
getMutableDimension(java.lang.String dimension_name)
Returns a dimension from its name.
|
SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer |
GetMutableGlobalCumulLPOptimizer(RoutingDimension dimension)
Returns the global/local dimension cumul optimizer for a given dimension,
or nullptr if there is none. |
SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer |
GetMutableGlobalCumulMPOptimizer(RoutingDimension dimension) |
SWIGTYPE_p_operations_research__LocalDimensionCumulOptimizer |
GetMutableLocalCumulLPOptimizer(RoutingDimension dimension) |
int |
getNonZeroCostClassesCount()
Ditto, minus the 'always zero', built-in cost class.
|
long |
getNumberOfDecisionsInFirstSolution(RoutingSearchParameters search_parameters)
Returns statistics on first solution search, number of decisions sent to
filters, number of decisions rejected by filters. |
int |
getNumberOfDisjunctions()
Returns the number of node disjunctions in the model.
|
long |
getNumberOfRejectsInFirstSolution(RoutingSearchParameters search_parameters) |
int |
getNumberOfVisitTypes() |
int |
getNumOfSingletonNodes()
Returns the number of non-start/end nodes which do not appear in a
pickup/delivery pair. |
RoutingModel.NodeNeighborsByCostClass |
GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio,
long min_neighbors,
SWIGTYPE_p_double neighbors_ratio_used)
Returns neighbors of all nodes for every cost class.
|
RoutingModel.NodeNeighborsByCostClass |
GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio,
long min_neighbors,
SWIGTYPE_p_double neighbors_ratio_used,
boolean add_vehicle_starts_to_neighbors)
Returns neighbors of all nodes for every cost class.
|
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)
Returns neighbors of all nodes for every cost class.
|
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)
Returns neighbors of all nodes for every cost class.
|
RoutingModel.NodeNeighborsByCostClass |
GetOrCreateNodeNeighborsByCostClass(RoutingModel.NodeNeighborsParameters params)
Returns parameters.num_neighbors neighbors of all nodes for every cost
class. |
int[] |
GetPairIndicesOfType(int type) |
PathsMetadata |
GetPathsMetadata() |
int |
getPickupAndDeliveryPolicyOfVehicle(int vehicle) |
SWIGTYPE_p_std__optionalT_operations_research__RoutingModel__PickupDeliveryPosition_t |
GetPickupPosition(long node_index)
Returns the pickup and delivery positions where the node is a pickup.
|
java.lang.String |
getPrimaryConstrainedDimension()
Get the primary constrained dimension, or an empty string if it is unset.
|
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.
|
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.
|
RoutingModel.ResourceGroup |
GetResourceGroup(int rg_index) |
SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__RoutingModel__ResourceGroup_t_t |
GetResourceGroups() |
SWIGTYPE_p_std__optionalT_long_t |
GetRouteCost(long[] route) |
int |
GetSameActivityGroupOfIndex(int node)
Returns the same activity group of the node.
|
int |
GetSameActivityGroupsCount()
Returns the number of same activity groups.
|
int[] |
GetSameActivityIndicesOfGroup(int group)
Returns variable indices of nodes in the same activity group.
|
int[] |
GetSameActivityIndicesOfIndex(int node)
Returns variable indices of nodes constrained to have the same activity.
|
SWIGTYPE_p_std__vectorT_std__pairT_long_long_t_t |
GetSameVehicleClassArcs(long from_index,
long to_index)
Returns all arcs which are equivalent to the {from_index, to_index} arc
wrt vehicle classes. |
int[] |
getSameVehicleIndicesOfIndex(int node)
Returns variable indices of nodes constrained to be on the same route.
|
int[] |
GetSingleNodesOfType(int type) |
SWIGTYPE_p_absl__flat_hash_setT_int_t |
getTemporalTypeIncompatibilitiesOfType(int type) |
SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_p_t |
GetUnaryDimensions()
Returns dimensions for which all transit evaluators are unary.
|
int |
getVehicleClassesCount()
Returns the number of different vehicle classes in the model.
|
int |
getVehicleClassIndexOfVehicle(long vehicle) |
int |
GetVehicleOfClass(int vehicle_class)
Returns a vehicle of the given vehicle class, and -1 if there are no
vehicles for this class. |
SWIGTYPE_p_std__dequeT_int_t |
GetVehiclesOfSameClass(long start_end_index)
Returns indices of the vehicles which are in the same vehicle class as the
vehicle starting or ending at start_end_index. |
RoutingModel.VehicleTypeContainer |
GetVehicleTypeContainer() |
int |
getVisitType(long index) |
int |
GetVisitTypePolicy(long index) |
boolean |
hasDimension(java.lang.String dimension_name)
Returns true if a dimension exists for a given dimension name.
|
boolean |
HasGlobalCumulOptimizer(RoutingDimension dimension)
Returns whether the given dimension has global/local cumul optimizers.
|
boolean |
hasHardTypeIncompatibilities()
Returns true iff any hard (resp. temporal) type incompatibilities have
been added to the model. |
boolean |
HasLocalCumulOptimizer(RoutingDimension dimension) |
boolean |
HasMandatoryDisjunctions()
Returns true if the model contains mandatory disjunctions (ones with
kNoPenalty as penalty). |
boolean |
HasMaxCardinalityConstrainedDisjunctions()
Returns true if the model contains at least one disjunction which is
constrained by its max_cardinality. |
boolean |
hasSameVehicleTypeRequirements()
Returns true iff any same-route (resp. temporal) type requirements have
been added to the model. |
boolean |
hasTemporalTypeIncompatibilities() |
boolean |
hasTemporalTypeRequirements() |
boolean |
hasVehicleWithCostClassIndex(int cost_class_index)
Returns true iff the model contains a vehicle with the given
cost_class_index. |
void |
ignoreDisjunctionsAlreadyForcedToZero()
SPECIAL: Makes the solver ignore all the disjunctions whose active
variables are all trivially zero (i.e. |
boolean |
IsDelivery(long node_index) |
boolean |
isEnd(long index)
Returns true if 'index' represents the last node of a route.
|
boolean |
isMatchingModel()
Returns true if a vehicle/node matching problem is detected.
|
boolean |
IsPickup(long node_index)
Returns whether the node is a pickup (resp. delivery).
|
boolean |
isStart(long index)
Returns true if 'index' represents the first node of a route.
|
boolean |
isVehicleAllowedForIndex(int vehicle,
long index)
Returns true if a vehicle is allowed to visit a given node.
|
boolean |
isVehicleUsed(Assignment assignment,
int vehicle)
Returns true if the route of 'vehicle' is non empty in 'assignment'.
|
boolean |
IsVehicleUsedWhenEmpty(int vehicle) |
DecisionBuilder |
makeGuidedSlackFinalizer(RoutingDimension dimension,
java.util.function.LongUnaryOperator initializer)
The next few members are in the public section only for testing purposes.
|
DecisionBuilder |
makeSelfDependentDimensionFinalizer(RoutingDimension dimension)
MakeSelfDependentDimensionFinalizer is a finalizer for the slacks of a
self-dependent dimension. |
Assignment |
mutablePreAssignment() |
long |
next(Assignment assignment,
long index)
Assignment inspection
Returns the variable index of the node directly after the node corresponding to 'index' in 'assignment'. |
IntVar[] |
nexts()
Returns all next variables of the model, such that Nexts(i) is the next
variable of the node corresponding to i. |
IntVar |
nextVar(long index)
Returns the next variable of the node corresponding to index.
|
int |
nodes()
Sizes and indices
Returns the number of nodes in the model. |
long |
objective_lower_bound()
Returns the current lower bound found by internal solvers during the
search. |
Assignment |
preAssignment()
Returns an assignment used to fix some of the variables of the problem.
|
Assignment |
readAssignment(java.lang.String file_name)
Reads an assignment from a file and returns the current solution.
|
Assignment |
readAssignmentFromRoutes(long[][] routes,
boolean ignore_inactive_indices)
Restores the routes as the current solution.
|
int |
RegisterCumulDependentTransitCallback(SWIGTYPE_p_std__functionT_FloatSlopePiecewiseLinearFunction_const_pflong_longF_t callback) |
int |
registerTransitCallback(java.util.function.LongBinaryOperator callback) |
int |
registerTransitCallback(java.util.function.LongBinaryOperator callback,
int sign) |
int |
registerTransitMatrix(long[][] values) |
int |
registerUnaryTransitCallback(java.util.function.LongUnaryOperator callback) |
int |
registerUnaryTransitCallback(java.util.function.LongUnaryOperator callback,
int sign) |
int |
registerUnaryTransitVector(long[] values)
Registers 'callback' and returns its index.
|
IntVar |
ResourceVar(int vehicle,
int resource_group)
Returns the resource variable for the given vehicle index in the given
resource group. |
IntVar[] |
ResourceVars(int resource_group)
Returns vehicle resource variables for a given resource group, such that
ResourceVars(r_g)[v] is the resource variable for vehicle 'v' in resource group 'r_g'. |
Assignment |
restoreAssignment(Assignment solution)
Restores an assignment as a solution in the routing model and returns the
new solution. |
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. |
void |
setAllowedVehiclesForIndex(int[] vehicles,
long index)
Sets the vehicles which can visit a given node.
|
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). |
void |
setAmortizedCostFactorsOfVehicle(long linear_cost_factor,
long quadratic_cost_factor,
int vehicle)
Sets the linear and quadratic cost factor of the given vehicle.
|
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' and 'to' is evaluator(from, to), whatever the route or vehicle performing the route. |
void |
setArcCostEvaluatorOfVehicle(int evaluator_index,
int vehicle)
Sets the cost function for a given vehicle route.
|
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 variables (nexts_, and vehicle_vars_ if costs aren't homogeneous across vehicles) of "this" model, with the values set according to those in "other_assignment". |
void |
setFirstSolutionEvaluator(java.util.function.LongBinaryOperator evaluator)
Gets/sets the evaluator used during the search.
|
void |
SetFirstSolutionHint(Assignment hint)
Adds a hint to be used by first solution strategies.
|
void |
setFixedCostOfAllVehicles(long cost)
Sets the fixed cost of all vehicle routes.
|
void |
setFixedCostOfVehicle(long cost,
int vehicle)
Sets the fixed cost of one vehicle route.
|
void |
SetMaximumNumberOfActiveVehicles(int max_active_vehicles)
Constrains the maximum number of active vehicles, aka the number of
vehicles which do not have an empty route. |
void |
SetPathEnergyCostOfVehicle(java.lang.String force,
java.lang.String distance,
long cost_per_unit,
int vehicle) |
void |
SetPathEnergyCostsOfVehicle(java.lang.String force,
java.lang.String distance,
long threshold,
long cost_per_unit_below_threshold,
long cost_per_unit_above_threshold,
int vehicle) |
void |
setPickupAndDeliveryPolicyOfAllVehicles(int policy)
Sets the Pickup and delivery policy of all vehicles.
|
void |
setPickupAndDeliveryPolicyOfVehicle(int policy,
int vehicle) |
void |
setPrimaryConstrainedDimension(java.lang.String dimension_name)
Set the given dimension as "primary constrained".
|
void |
SetVehicleUsedWhenEmpty(boolean is_used,
int vehicle) |
void |
setVisitType(long index,
int type,
int type_policy) |
long |
size()
Returns the number of next variables in the model.
|
Assignment |
solve()
Solves the current routing model; closes the current model.
|
Assignment |
solve(Assignment assignment)
Solves the current routing model; closes the current model.
|
Assignment |
SolveFromAssignmentsWithParameters(SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t assignments,
RoutingSearchParameters search_parameters)
Same as above but will try all assignments in order as first solutions
until one succeeds. |
Assignment |
SolveFromAssignmentsWithParameters(SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t assignments,
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. |
Assignment |
solveFromAssignmentWithParameters(Assignment assignment,
RoutingSearchParameters search_parameters)
Same as above, except that if assignment is not null, it will be used as
the initial solution. |
Solver |
solver()
Returns the underlying constraint solver.
|
Assignment |
SolveWithIteratedLocalSearch(RoutingSearchParameters search_parameters)
Solves the current routing model by using an Iterated Local Search
approach. |
Assignment |
solveWithParameters(RoutingSearchParameters search_parameters)
Solves the current routing model with the given parameters.
|
long |
start(int vehicle)
Model inspection.
|
RoutingSearchStatus.Value |
status()
Returns the current status of the routing model.
|
static long |
swigRelease(RoutingModel obj) |
SWIGTYPE_p_absl__Duration |
TimeBuffer()
Returns the time buffer to safely return a solution.
|
long |
unperformedPenalty(long var_index)
Get the "unperformed" penalty of a node.
|
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 (default value is passed as first argument to simplify the usage of the method in a callback). |
void |
UpdateTimeLimit(SWIGTYPE_p_absl__Duration time_limit)
Updates the time limit of the search limit.
|
int |
VehicleIndex(long index)
Returns the vehicle of the given start/end index, and -1 if the given
index is not a vehicle start/end. |
IntVar |
VehicleRouteConsideredVar(int vehicle)
Returns the variable specifying whether or not the given vehicle route is
considered for costs and constraints. |
int |
vehicles()
Returns the number of vehicle routes in the model.
|
IntVar |
vehicleVar(long index)
Returns the vehicle variable of the node corresponding to index.
|
IntVar[] |
vehicleVars()
Returns all vehicle variables of the model, such that VehicleVars(i) is
the vehicle variable of the node corresponding to i. |
boolean |
writeAssignment(java.lang.String file_name)
Writes the current solution to a file containing an AssignmentProto.
|
protected transient boolean swigCMemOwn
public static final int PICKUP_AND_DELIVERY_NO_ORDER
public static final int PICKUP_AND_DELIVERY_LIFO
public static final int PICKUP_AND_DELIVERY_FIFO
public static final int kTransitEvaluatorSignUnknown
public static final int kTransitEvaluatorSignPositiveOrZero
public static final int kTransitEvaluatorSignNegativeOrZero
public static final int PENALIZE_ONCE
public static final int PENALIZE_PER_INACTIVE
public static final int TYPE_ADDED_TO_VEHICLE
public static final int ADDED_TYPE_REMOVED_FROM_VEHICLE
public static final int TYPE_ON_VEHICLE_UP_TO_VISIT
public static final int TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED
public RoutingModel(long cPtr, boolean cMemoryOwn)
public RoutingModel(RoutingIndexManager index_manager)
public RoutingModel(RoutingIndexManager index_manager, RoutingModelParameters parameters)
public static long getCPtr(RoutingModel obj)
public static long swigRelease(RoutingModel obj)
protected void finalize()
finalize
in class java.lang.Object
public void delete()
public static long getKNoPenalty()
public static int getKNoDisjunction()
public static int getKNoDimension()
public int registerUnaryTransitVector(long[] values)
public int registerUnaryTransitCallback(java.util.function.LongUnaryOperator callback, int sign)
public int registerUnaryTransitCallback(java.util.function.LongUnaryOperator callback)
public int registerTransitMatrix(long[][] values)
public int registerTransitCallback(java.util.function.LongBinaryOperator callback, int sign)
public int registerTransitCallback(java.util.function.LongBinaryOperator callback)
public int RegisterCumulDependentTransitCallback(SWIGTYPE_p_std__functionT_FloatSlopePiecewiseLinearFunction_const_pflong_longF_t callback)
public SWIGTYPE_p_std__functionT_FloatSlopePiecewiseLinearFunction_const_pflong_longF_t CumulDependentTransitCallback(int callback_index)
public boolean addDimension(int evaluator_index, long slack_max, long capacity, boolean fix_start_cumul_to_zero, java.lang.String name)
public boolean addDimensionWithVehicleTransits(int[] evaluator_indices, long slack_max, long capacity, boolean fix_start_cumul_to_zero, java.lang.String name)
public boolean addDimensionWithVehicleCapacity(int evaluator_index, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, java.lang.String name)
public boolean addDimensionWithVehicleTransitAndCapacity(int[] evaluator_indices, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, java.lang.String name)
public boolean AddDimensionWithCumulDependentVehicleTransitAndCapacity(int[] fixed_evaluator_indices, int[] cumul_dependent_evaluator_indices, long slack_max, long[] vehicle_capacities, boolean fix_start_cumul_to_zero, java.lang.String name)
public IntBoolPair addConstantDimensionWithSlack(long value, long capacity, long slack_max, boolean fix_start_cumul_to_zero, java.lang.String name)
public IntBoolPair addConstantDimension(long value, long capacity, boolean fix_start_cumul_to_zero, java.lang.String name)
public IntBoolPair addVectorDimension(long[] values, long capacity, boolean fix_start_cumul_to_zero, java.lang.String name)
public IntBoolPair addMatrixDimension(long[][] values, long capacity, boolean fix_start_cumul_to_zero, java.lang.String name)
public SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_p_t GetUnaryDimensions()
public SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t GetDimensionsWithGlobalCumulOptimizers()
public SWIGTYPE_p_std__vectorT_operations_research__RoutingDimension_const_p_t GetDimensionsWithLocalCumulOptimizers()
public boolean HasGlobalCumulOptimizer(RoutingDimension dimension)
public boolean HasLocalCumulOptimizer(RoutingDimension dimension)
public SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer GetMutableGlobalCumulLPOptimizer(RoutingDimension dimension)
public SWIGTYPE_p_operations_research__GlobalDimensionCumulOptimizer GetMutableGlobalCumulMPOptimizer(RoutingDimension dimension)
public SWIGTYPE_p_operations_research__LocalDimensionCumulOptimizer GetMutableLocalCumulLPOptimizer(RoutingDimension dimension)
public boolean hasDimension(java.lang.String dimension_name)
public RoutingDimension getDimensionOrDie(java.lang.String dimension_name)
public RoutingDimension getMutableDimension(java.lang.String dimension_name)
public void setPrimaryConstrainedDimension(java.lang.String dimension_name)
public java.lang.String getPrimaryConstrainedDimension()
public RoutingModel.ResourceGroup AddResourceGroup()
public SWIGTYPE_p_std__vectorT_std__unique_ptrT_operations_research__RoutingModel__ResourceGroup_t_t GetResourceGroups()
public RoutingModel.ResourceGroup GetResourceGroup(int rg_index)
public int[] GetDimensionResourceGroupIndices(RoutingDimension dimension)
public int GetDimensionResourceGroupIndex(RoutingDimension dimension)
public int addDisjunction(long[] indices, long penalty, long max_cardinality, int penalty_cost_behavior)
public int addDisjunction(long[] indices, long penalty, long max_cardinality)
public int addDisjunction(long[] indices, long penalty)
public int addDisjunction(long[] indices)
public int[] getDisjunctionIndices(long index)
public long[] GetDisjunctionNodeIndices(int index)
public long getDisjunctionPenalty(int index)
public long getDisjunctionMaxCardinality(int index)
public int GetDisjunctionPenaltyCostBehavior(int index)
public int getNumberOfDisjunctions()
public boolean HasMandatoryDisjunctions()
public boolean HasMaxCardinalityConstrainedDisjunctions()
public void ignoreDisjunctionsAlreadyForcedToZero()
public void addSoftSameVehicleConstraint(long[] indices, long cost)
public void setAllowedVehiclesForIndex(int[] vehicles, long index)
public boolean isVehicleAllowedForIndex(int vehicle, long index)
public void addPickupAndDelivery(long pickup, long delivery)
public void addPickupAndDeliverySets(int pickup_disjunction, int delivery_disjunction)
public SWIGTYPE_p_std__optionalT_operations_research__RoutingModel__PickupDeliveryPosition_t GetPickupPosition(long node_index)
public SWIGTYPE_p_std__optionalT_operations_research__RoutingModel__PickupDeliveryPosition_t GetDeliveryPosition(long node_index)
public boolean IsPickup(long node_index)
public boolean IsDelivery(long node_index)
public void setPickupAndDeliveryPolicyOfAllVehicles(int policy)
public void setPickupAndDeliveryPolicyOfVehicle(int policy, int vehicle)
public int getPickupAndDeliveryPolicyOfVehicle(int vehicle)
public int getNumOfSingletonNodes()
public SWIGTYPE_p_std__optionalT_long_t GetFirstMatchingPickupDeliverySibling(long node, SWIGTYPE_p_std__functionT_bool_flongF_t is_match)
public void setVisitType(long index, int type, int type_policy)
public int getVisitType(long index)
public int[] GetSingleNodesOfType(int type)
public int[] GetPairIndicesOfType(int type)
public int GetVisitTypePolicy(long index)
public int getNumberOfVisitTypes()
public void addHardTypeIncompatibility(int type1, int type2)
public void addTemporalTypeIncompatibility(int type1, int type2)
public SWIGTYPE_p_absl__flat_hash_setT_int_t getTemporalTypeIncompatibilitiesOfType(int type)
public boolean hasHardTypeIncompatibilities()
public boolean hasTemporalTypeIncompatibilities()
public void addRequiredTypeAlternativesWhenAddingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives)
public void addRequiredTypeAlternativesWhenRemovingType(int dependent_type, SWIGTYPE_p_absl__flat_hash_setT_int_t required_type_alternatives)
public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenAddingType(int type)
public SWIGTYPE_p_std__vectorT_absl__flat_hash_setT_int_t_t GetRequiredTypeAlternativesWhenRemovingType(int type)
public boolean hasSameVehicleTypeRequirements()
public boolean hasTemporalTypeRequirements()
public long unperformedPenalty(long var_index)
public long unperformedPenaltyOrValue(long default_value, long var_index)
public long getDepot()
public void SetMaximumNumberOfActiveVehicles(int max_active_vehicles)
public int GetMaximumNumberOfActiveVehicles()
public void setArcCostEvaluatorOfAllVehicles(int evaluator_index)
public void setArcCostEvaluatorOfVehicle(int evaluator_index, int vehicle)
public void setFixedCostOfAllVehicles(long cost)
public void setFixedCostOfVehicle(long cost, int vehicle)
public long getFixedCostOfVehicle(int vehicle)
public void SetPathEnergyCostOfVehicle(java.lang.String force, java.lang.String distance, long cost_per_unit, int vehicle)
public void SetPathEnergyCostsOfVehicle(java.lang.String force, java.lang.String distance, long threshold, long cost_per_unit_below_threshold, long cost_per_unit_above_threshold, int vehicle)
public void setAmortizedCostFactorsOfAllVehicles(long linear_cost_factor, long quadratic_cost_factor)
public void setAmortizedCostFactorsOfVehicle(long linear_cost_factor, long quadratic_cost_factor, int vehicle)
public long[] getAmortizedLinearCostFactorOfVehicles()
public long[] getAmortizedQuadraticCostFactorOfVehicles()
public void AddRouteConstraint(SWIGTYPE_p_std__functionT_std__optionalT_long_t_fstd__vectorT_long_t_const_RF_t route_evaluator, boolean costs_are_homogeneous_across_vehicles)
public void AddRouteConstraint(SWIGTYPE_p_std__functionT_std__optionalT_long_t_fstd__vectorT_long_t_const_RF_t route_evaluator)
public SWIGTYPE_p_std__optionalT_long_t GetRouteCost(long[] route)
public void SetVehicleUsedWhenEmpty(boolean is_used, int vehicle)
public boolean IsVehicleUsedWhenEmpty(int vehicle)
public void setFirstSolutionEvaluator(java.util.function.LongBinaryOperator evaluator)
public void SetFirstSolutionHint(Assignment hint)
public Assignment GetFirstSolutionHint()
public void addLocalSearchOperator(LocalSearchOperator ls_operator)
public void addSearchMonitor(SearchMonitor monitor)
public void AddEnterSearchCallback(java.lang.Runnable callback)
public void addAtSolutionCallback(java.lang.Runnable callback, boolean track_unchecked_neighbors)
public void addAtSolutionCallback(java.lang.Runnable callback)
public void AddRestoreDimensionValuesResetCallback(java.lang.Runnable callback)
public void addVariableMinimizedByFinalizer(IntVar var)
public void addVariableMaximizedByFinalizer(IntVar var)
public void AddWeightedVariableMinimizedByFinalizer(IntVar var, long cost)
public void AddWeightedVariableMaximizedByFinalizer(IntVar var, long cost)
public void addVariableTargetToFinalizer(IntVar var, long target)
public void AddWeightedVariableTargetToFinalizer(IntVar var, long target, long cost)
public void closeModel()
public void closeModelWithParameters(RoutingSearchParameters search_parameters)
public Assignment solve(Assignment assignment)
public Assignment solve()
public Assignment solveWithParameters(RoutingSearchParameters search_parameters)
public Assignment solveFromAssignmentWithParameters(Assignment assignment, RoutingSearchParameters search_parameters)
public Assignment FastSolveFromAssignmentWithParameters(Assignment assignment, RoutingSearchParameters search_parameters, boolean check_solution_in_cp, SWIGTYPE_p_absl__flat_hash_setT_operations_research__IntVar_p_t touched)
public Assignment FastSolveFromAssignmentWithParameters(Assignment assignment, RoutingSearchParameters search_parameters, boolean check_solution_in_cp)
public Assignment SolveFromAssignmentsWithParameters(SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t assignments, RoutingSearchParameters search_parameters, SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t solutions)
public Assignment SolveFromAssignmentsWithParameters(SWIGTYPE_p_std__vectorT_operations_research__Assignment_const_p_t assignments, RoutingSearchParameters search_parameters)
public Assignment SolveWithIteratedLocalSearch(RoutingSearchParameters search_parameters)
public void setAssignmentFromOtherModelAssignment(Assignment target_assignment, RoutingModel source_model, Assignment source_assignment)
public long computeLowerBound()
public long objective_lower_bound()
public RoutingSearchStatus.Value status()
public boolean enable_deep_serialization()
public IntVar applyLocks(long[] locks)
public boolean applyLocksToAllVehicles(long[][] locks, boolean close_routes)
public Assignment preAssignment()
public Assignment mutablePreAssignment()
public boolean writeAssignment(java.lang.String file_name)
public Assignment readAssignment(java.lang.String file_name)
public Assignment restoreAssignment(Assignment solution)
public Assignment readAssignmentFromRoutes(long[][] routes, boolean ignore_inactive_indices)
public boolean routesToAssignment(long[][] routes, boolean ignore_inactive_indices, boolean close_routes, Assignment assignment)
public void assignmentToRoutes(Assignment assignment, long[][] routes)
public Assignment compactAssignment(Assignment assignment)
public Assignment compactAndCheckAssignment(Assignment assignment)
public void addToAssignment(IntVar var)
public void addIntervalToAssignment(IntervalVar interval)
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)
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)
public RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio, long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used, boolean add_vehicle_starts_to_neighbors)
public RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(double neighbors_ratio, long min_neighbors, SWIGTYPE_p_double neighbors_ratio_used)
public RoutingModel.NodeNeighborsByCostClass GetOrCreateNodeNeighborsByCostClass(RoutingModel.NodeNeighborsParameters params)
public void addLocalSearchFilter(LocalSearchFilter filter)
public long start(int vehicle)
public long end(int vehicle)
public boolean isStart(long index)
public boolean isEnd(long index)
public int VehicleIndex(long index)
public long next(Assignment assignment, long index)
public boolean isVehicleUsed(Assignment assignment, int vehicle)
public IntVar[] nexts()
public IntVar[] vehicleVars()
public IntVar[] ResourceVars(int resource_group)
public IntVar nextVar(long index)
public IntVar activeVar(long index)
public IntVar activeVehicleVar(int vehicle)
public IntVar VehicleRouteConsideredVar(int vehicle)
public IntVar vehicleVar(long index)
public IntVar ResourceVar(int vehicle, int resource_group)
public IntVar costVar()
public long getArcCostForVehicle(long from_index, long to_index, long vehicle)
public boolean costsAreHomogeneousAcrossVehicles()
public long getHomogeneousCost(long from_index, long to_index)
public long getArcCostForFirstSolution(long from_index, long to_index)
public long getArcCostForClass(long from_index, long to_index, long cost_class_index)
public int getCostClassIndexOfVehicle(long vehicle)
public boolean hasVehicleWithCostClassIndex(int cost_class_index)
public int getCostClassesCount()
public int getNonZeroCostClassesCount()
public int getVehicleClassIndexOfVehicle(long vehicle)
public int GetVehicleOfClass(int vehicle_class)
public int getVehicleClassesCount()
public int[] getSameVehicleIndicesOfIndex(int node)
public int[] GetSameActivityIndicesOfIndex(int node)
public int GetSameActivityGroupOfIndex(int node)
public int GetSameActivityGroupsCount()
public int[] GetSameActivityIndicesOfGroup(int group)
public RoutingModel.VehicleTypeContainer GetVehicleTypeContainer()
public boolean arcIsMoreConstrainedThanArc(long from, long to1, long to2)
public java.lang.String debugOutputAssignment(Assignment solution_assignment, java.lang.String dimension_to_print)
public boolean CheckIfAssignmentIsFeasible(Assignment assignment, boolean call_at_solution_monitors)
public Solver solver()
public boolean checkLimit(SWIGTYPE_p_absl__Duration offset)
public boolean checkLimit()
public void UpdateTimeLimit(SWIGTYPE_p_absl__Duration time_limit)
public SWIGTYPE_p_absl__Duration TimeBuffer()
public SWIGTYPE_p_std__atomicT_bool_t GetMutableCPSatInterrupt()
public SWIGTYPE_p_std__atomicT_bool_t GetMutableCPInterrupt()
public void CancelSearch()
public int nodes()
public int vehicles()
public long size()
public long getNumberOfDecisionsInFirstSolution(RoutingSearchParameters search_parameters)
public long getNumberOfRejectsInFirstSolution(RoutingSearchParameters search_parameters)
public boolean isMatchingModel()
public boolean AreRoutesInterdependent(SWIGTYPE_p_operations_research__RoutingSearchParameters parameters)
public DecisionBuilder makeGuidedSlackFinalizer(RoutingDimension dimension, java.util.function.LongUnaryOperator initializer)
public DecisionBuilder makeSelfDependentDimensionFinalizer(RoutingDimension dimension)
public PathsMetadata GetPathsMetadata()
public SWIGTYPE_p_std__dequeT_int_t GetVehiclesOfSameClass(long start_end_index)
public SWIGTYPE_p_std__vectorT_std__pairT_long_long_t_t GetSameVehicleClassArcs(long from_index, long to_index)
Copyright © 2025. All rights reserved.