Java Reference

Java Reference

RoutingSearchParameters.Builder

Detailed Description

Parameters defining the search used to solve vehicle routing problems.
If a parameter is unset (or, equivalently, set to its default value),
then the routing library will pick its preferred value for that parameter
automatically: this should be the case for most parameters.
To see those "default" parameters, call GetDefaultRoutingSearchParameters().
Next ID: 35

Protobuf type

operations_research.RoutingSearchParameters

Definition at line 7875 of file RoutingSearchParameters.java.

Public Member Functions

.lang.Override Builder clear ()
 
.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
 
.lang.Override com.google.ortools.constraintsolver.RoutingSearchParameters getDefaultInstanceForType ()
 
.lang.Override com.google.ortools.constraintsolver.RoutingSearchParameters build ()
 
.lang.Override com.google.ortools.constraintsolver.RoutingSearchParameters buildPartial ()
 
.lang.Override Builder clone ()
 
.lang.Override Builder setField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
.lang.Override Builder clearField (com.google.protobuf.Descriptors.FieldDescriptor field)
 
.lang.Override Builder clearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof)
 
.lang.Override Builder setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
 
.lang.Override Builder addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
.lang.Override Builder mergeFrom (com.google.protobuf.Message other)
 
Builder mergeFrom (com.google.ortools.constraintsolver.RoutingSearchParameters other)
 
.lang.Override final boolean isInitialized ()
 
.lang.Override Builder mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
.lang.Override int getFirstSolutionStrategyValue ()
 
Builder setFirstSolutionStrategyValue (int value)
 
.lang.Override com.google.ortools.constraintsolver.FirstSolutionStrategy.Value getFirstSolutionStrategy ()
 
Builder setFirstSolutionStrategy (com.google.ortools.constraintsolver.FirstSolutionStrategy.Value value)
 
Builder clearFirstSolutionStrategy ()
 
.lang.Override boolean getUseUnfilteredFirstSolutionStrategy ()
 
Builder setUseUnfilteredFirstSolutionStrategy (boolean value)
 
Builder clearUseUnfilteredFirstSolutionStrategy ()
 
.lang.Override double getSavingsNeighborsRatio ()
 
Builder setSavingsNeighborsRatio (double value)
 
Builder clearSavingsNeighborsRatio ()
 
.lang.Override double getSavingsMaxMemoryUsageBytes ()
 
Builder setSavingsMaxMemoryUsageBytes (double value)
 
Builder clearSavingsMaxMemoryUsageBytes ()
 
.lang.Override boolean getSavingsAddReverseArcs ()
 
Builder setSavingsAddReverseArcs (boolean value)
 
Builder clearSavingsAddReverseArcs ()
 
.lang.Override double getSavingsArcCoefficient ()
 
Builder setSavingsArcCoefficient (double value)
 
Builder clearSavingsArcCoefficient ()
 
.lang.Override boolean getSavingsParallelRoutes ()
 
Builder setSavingsParallelRoutes (boolean value)
 
Builder clearSavingsParallelRoutes ()
 
.lang.Override double getCheapestInsertionFarthestSeedsRatio ()
 
Builder setCheapestInsertionFarthestSeedsRatio (double value)
 
Builder clearCheapestInsertionFarthestSeedsRatio ()
 
.lang.Override double getCheapestInsertionFirstSolutionNeighborsRatio ()
 
Builder setCheapestInsertionFirstSolutionNeighborsRatio (double value)
 
Builder clearCheapestInsertionFirstSolutionNeighborsRatio ()
 
.lang.Override double getCheapestInsertionLsOperatorNeighborsRatio ()
 
Builder setCheapestInsertionLsOperatorNeighborsRatio (double value)
 
Builder clearCheapestInsertionLsOperatorNeighborsRatio ()
 
.lang.Override boolean getChristofidesUseMinimumMatching ()
 
Builder setChristofidesUseMinimumMatching (boolean value)
 
Builder clearChristofidesUseMinimumMatching ()
 
boolean hasLocalSearchOperators ()
 .operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3; More...
 
com.google.ortools.constraintsolver.RoutingSearchParameters.LocalSearchNeighborhoodOperators getLocalSearchOperators ()
 .operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3; More...
 
Builder setLocalSearchOperators (com.google.ortools.constraintsolver.RoutingSearchParameters.LocalSearchNeighborhoodOperators value)
 .operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3; More...
 
Builder setLocalSearchOperators (com.google.ortools.constraintsolver.RoutingSearchParameters.LocalSearchNeighborhoodOperators.Builder builderForValue)
 .operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3; More...
 
Builder mergeLocalSearchOperators (com.google.ortools.constraintsolver.RoutingSearchParameters.LocalSearchNeighborhoodOperators value)
 .operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3; More...
 
Builder clearLocalSearchOperators ()
 .operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3; More...
 
com.google.ortools.constraintsolver.RoutingSearchParameters.LocalSearchNeighborhoodOperators.Builder getLocalSearchOperatorsBuilder ()
 .operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3; More...
 
com.google.ortools.constraintsolver.RoutingSearchParameters.LocalSearchNeighborhoodOperatorsOrBuilder getLocalSearchOperatorsOrBuilder ()
 .operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3; More...
 
.lang.Override int getRelocateExpensiveChainNumArcsToConsider ()
 
Builder setRelocateExpensiveChainNumArcsToConsider (int value)
 
Builder clearRelocateExpensiveChainNumArcsToConsider ()
 
.lang.Override int getHeuristicExpensiveChainLnsNumArcsToConsider ()
 
Builder setHeuristicExpensiveChainLnsNumArcsToConsider (int value)
 
Builder clearHeuristicExpensiveChainLnsNumArcsToConsider ()
 
.lang.Override int getLocalSearchMetaheuristicValue ()
 
Builder setLocalSearchMetaheuristicValue (int value)
 
.lang.Override com.google.ortools.constraintsolver.LocalSearchMetaheuristic.Value getLocalSearchMetaheuristic ()
 
Builder setLocalSearchMetaheuristic (com.google.ortools.constraintsolver.LocalSearchMetaheuristic.Value value)
 
Builder clearLocalSearchMetaheuristic ()
 
.lang.Override double getGuidedLocalSearchLambdaCoefficient ()
 
Builder setGuidedLocalSearchLambdaCoefficient (double value)
 
Builder clearGuidedLocalSearchLambdaCoefficient ()
 
.lang.Override boolean getUseDepthFirstSearch ()
 
Builder setUseDepthFirstSearch (boolean value)
 
Builder clearUseDepthFirstSearch ()
 
.lang.Override int getUseCpValue ()
 
Builder setUseCpValue (int value)
 
.lang.Override com.google.ortools.util.OptionalBoolean getUseCp ()
 
Builder setUseCp (com.google.ortools.util.OptionalBoolean value)
 
Builder clearUseCp ()
 
.lang.Override int getUseCpSatValue ()
 
Builder setUseCpSatValue (int value)
 
.lang.Override com.google.ortools.util.OptionalBoolean getUseCpSat ()
 
Builder setUseCpSat (com.google.ortools.util.OptionalBoolean value)
 
Builder clearUseCpSat ()
 
.lang.Override int getContinuousSchedulingSolverValue ()
 .operations_research.RoutingSearchParameters.SchedulingSolver continuous_scheduling_solver = 33; More...
 
Builder setContinuousSchedulingSolverValue (int value)
 .operations_research.RoutingSearchParameters.SchedulingSolver continuous_scheduling_solver = 33; More...
 
.lang.Override com.google.ortools.constraintsolver.RoutingSearchParameters.SchedulingSolver getContinuousSchedulingSolver ()
 .operations_research.RoutingSearchParameters.SchedulingSolver continuous_scheduling_solver = 33; More...
 
Builder setContinuousSchedulingSolver (com.google.ortools.constraintsolver.RoutingSearchParameters.SchedulingSolver value)
 .operations_research.RoutingSearchParameters.SchedulingSolver continuous_scheduling_solver = 33; More...
 
Builder clearContinuousSchedulingSolver ()
 .operations_research.RoutingSearchParameters.SchedulingSolver continuous_scheduling_solver = 33; More...
 
.lang.Override int getMixedIntegerSchedulingSolverValue ()
 .operations_research.RoutingSearchParameters.SchedulingSolver mixed_integer_scheduling_solver = 34; More...
 
Builder setMixedIntegerSchedulingSolverValue (int value)
 .operations_research.RoutingSearchParameters.SchedulingSolver mixed_integer_scheduling_solver = 34; More...
 
.lang.Override com.google.ortools.constraintsolver.RoutingSearchParameters.SchedulingSolver getMixedIntegerSchedulingSolver ()
 .operations_research.RoutingSearchParameters.SchedulingSolver mixed_integer_scheduling_solver = 34; More...
 
Builder setMixedIntegerSchedulingSolver (com.google.ortools.constraintsolver.RoutingSearchParameters.SchedulingSolver value)
 .operations_research.RoutingSearchParameters.SchedulingSolver mixed_integer_scheduling_solver = 34; More...
 
Builder clearMixedIntegerSchedulingSolver ()
 .operations_research.RoutingSearchParameters.SchedulingSolver mixed_integer_scheduling_solver = 34; More...
 
.lang.Override double getOptimizationStep ()
 
Builder setOptimizationStep (double value)
 
Builder clearOptimizationStep ()
 
.lang.Override int getNumberOfSolutionsToCollect ()
 
Builder setNumberOfSolutionsToCollect (int value)
 
Builder clearNumberOfSolutionsToCollect ()
 
.lang.Override long getSolutionLimit ()
 
Builder setSolutionLimit (long value)
 
Builder clearSolutionLimit ()
 
boolean hasTimeLimit ()
 
com.google.protobuf.Duration getTimeLimit ()
 
Builder setTimeLimit (com.google.protobuf.Duration value)
 
Builder setTimeLimit (com.google.protobuf.Duration.Builder builderForValue)
 
Builder mergeTimeLimit (com.google.protobuf.Duration value)
 
Builder clearTimeLimit ()
 
com.google.protobuf.Duration.Builder getTimeLimitBuilder ()
 
com.google.protobuf.DurationOrBuilder getTimeLimitOrBuilder ()
 
boolean hasLnsTimeLimit ()
 
com.google.protobuf.Duration getLnsTimeLimit ()
 
Builder setLnsTimeLimit (com.google.protobuf.Duration value)
 
Builder setLnsTimeLimit (com.google.protobuf.Duration.Builder builderForValue)
 
Builder mergeLnsTimeLimit (com.google.protobuf.Duration value)
 
Builder clearLnsTimeLimit ()
 
com.google.protobuf.Duration.Builder getLnsTimeLimitBuilder ()
 
com.google.protobuf.DurationOrBuilder getLnsTimeLimitOrBuilder ()
 
.lang.Override boolean getUseFullPropagation ()
 
Builder setUseFullPropagation (boolean value)
 
Builder clearUseFullPropagation ()
 
.lang.Override boolean getLogSearch ()
 
Builder setLogSearch (boolean value)
 
Builder clearLogSearch ()
 
.lang.Override double getLogCostScalingFactor ()
 
Builder setLogCostScalingFactor (double value)
 
Builder clearLogCostScalingFactor ()
 
.lang.Override double getLogCostOffset ()
 double log_cost_offset = 29; More...
 
Builder setLogCostOffset (double value)
 double log_cost_offset = 29; More...
 
Builder clearLogCostOffset ()
 double log_cost_offset = 29; More...
 
.lang.Override final Builder setUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 
.lang.Override final Builder mergeUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 

Static Public Member Functions

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ()
 

Protected Member Functions

.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ()
 

Member Function Documentation

◆ addRepeatedField()

.lang.Override Builder addRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor  field,
java.lang.Object  value 
)
inline

Definition at line 8081 of file RoutingSearchParameters.java.

◆ build()

Definition at line 7997 of file RoutingSearchParameters.java.

◆ buildPartial()

.lang.Override com.google.ortools.constraintsolver.RoutingSearchParameters buildPartial ( )
inline

Definition at line 8006 of file RoutingSearchParameters.java.

◆ clear()

.lang.Override Builder clear ( )
inline

Definition at line 7908 of file RoutingSearchParameters.java.

◆ clearCheapestInsertionFarthestSeedsRatio()

Builder clearCheapestInsertionFarthestSeedsRatio ( )
inline
Ratio (between 0 and 1) of available vehicles in the model on which
farthest nodes of the model are inserted as seeds in the
GlobalCheapestInsertion first solution heuristic.

double cheapest_insertion_farthest_seeds_ratio = 16;

Returns
This builder for chaining.

Definition at line 8633 of file RoutingSearchParameters.java.

◆ clearCheapestInsertionFirstSolutionNeighborsRatio()

Builder clearCheapestInsertionFirstSolutionNeighborsRatio ( )
inline
Ratio (in ]0, 1]) of neighbors to consider for each node when creating
new insertions in the parallel/sequential cheapest insertion heuristic.
If not overridden, its default value is 1, meaning all neighbors will be
considered.
Neighbors ratio for the first solution heuristic.

double cheapest_insertion_first_solution_neighbors_ratio = 21;

Returns
This builder for chaining.

Definition at line 8688 of file RoutingSearchParameters.java.

◆ clearCheapestInsertionLsOperatorNeighborsRatio()

Builder clearCheapestInsertionLsOperatorNeighborsRatio ( )
inline
Neighbors ratio for the heuristic when used in a local search operator (see
local_search_operators.use_global_cheapest_insertion_path_lns and
local_search_operators.use_global_cheapest_insertion_chain_lns below).

double cheapest_insertion_ls_operator_neighbors_ratio = 31;

Returns
This builder for chaining.

Definition at line 8737 of file RoutingSearchParameters.java.

◆ clearChristofidesUseMinimumMatching()

Builder clearChristofidesUseMinimumMatching ( )
inline
If true use minimum matching instead of minimal matching in the
Christofides algorithm.

bool christofides_use_minimum_matching = 30;

Returns
This builder for chaining.

Definition at line 8783 of file RoutingSearchParameters.java.

◆ clearContinuousSchedulingSolver()

Builder clearContinuousSchedulingSolver ( )
inline

.operations_research.RoutingSearchParameters.SchedulingSolver continuous_scheduling_solver = 33;

Returns
This builder for chaining.

Definition at line 9411 of file RoutingSearchParameters.java.

◆ clearField()

.lang.Override Builder clearField ( com.google.protobuf.Descriptors.FieldDescriptor  field)
inline

Definition at line 8065 of file RoutingSearchParameters.java.

◆ clearFirstSolutionStrategy()

Builder clearFirstSolutionStrategy ( )
inline
First solution strategies, used as starting point of local search.

.operations_research.FirstSolutionStrategy.Value first_solution_strategy = 1;

Returns
This builder for chaining.

Definition at line 8284 of file RoutingSearchParameters.java.

◆ clearGuidedLocalSearchLambdaCoefficient()

Builder clearGuidedLocalSearchLambdaCoefficient ( )
inline
These are advanced settings which should not be modified unless you know
what you are doing.
Lambda coefficient used to penalize arc costs when GUIDED_LOCAL_SEARCH is
used. Must be positive.

double guided_local_search_lambda_coefficient = 5;

Returns
This builder for chaining.

Definition at line 9135 of file RoutingSearchParameters.java.

◆ clearHeuristicExpensiveChainLnsNumArcsToConsider()

Builder clearHeuristicExpensiveChainLnsNumArcsToConsider ( )
inline
Number of expensive arcs to consider cutting in the
FilteredHeuristicExpensiveChainLNSOperator operator.

int32 heuristic_expensive_chain_lns_num_arcs_to_consider = 32;

Returns
This builder for chaining.

Definition at line 9009 of file RoutingSearchParameters.java.

◆ clearLnsTimeLimit()

Builder clearLnsTimeLimit ( )
inline
Limit to the time spent in the completion search for each local search
neighbor.

.google.protobuf.Duration lns_time_limit = 10;

Definition at line 9873 of file RoutingSearchParameters.java.

◆ clearLocalSearchMetaheuristic()

Builder clearLocalSearchMetaheuristic ( )
inline
Local search metaheuristics used to guide the search.

.operations_research.LocalSearchMetaheuristic.Value local_search_metaheuristic = 4;

Returns
This builder for chaining.

Definition at line 9083 of file RoutingSearchParameters.java.

◆ clearLocalSearchOperators()

Builder clearLocalSearchOperators ( )
inline

.operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3;

Definition at line 8862 of file RoutingSearchParameters.java.

◆ clearLogCostOffset()

Builder clearLogCostOffset ( )
inline

double log_cost_offset = 29;

Returns
This builder for chaining.

Definition at line 10148 of file RoutingSearchParameters.java.

◆ clearLogCostScalingFactor()

Builder clearLogCostScalingFactor ( )
inline
In logs, cost values will be scaled and offset by the given values in the
following way: log_cost_scaling_factor * (cost + log_cost_offset)

double log_cost_scaling_factor = 22;

Returns
This builder for chaining.

Definition at line 10117 of file RoutingSearchParameters.java.

◆ clearLogSearch()

Builder clearLogSearch ( )
inline
--- Miscellaneous ---
Some of these are advanced settings which should not be modified unless you
know what you are doing.
Activates search logging. For each solution found during the search, the
following will be displayed: its objective value, the maximum objective
value since the beginning of the search, the elapsed time since the
beginning of the search, the number of branches explored in the search
tree, the number of failures in the search tree, the depth of the search
tree, the number of local search neighbors explored, the number of local
search neighbors filtered by local search filters, the number of local
search neighbors accepted, the total memory used and the percentage of the
search done.

bool log_search = 13;

Returns
This builder for chaining.

Definition at line 10071 of file RoutingSearchParameters.java.

◆ clearMixedIntegerSchedulingSolver()

Builder clearMixedIntegerSchedulingSolver ( )
inline

.operations_research.RoutingSearchParameters.SchedulingSolver mixed_integer_scheduling_solver = 34;

Returns
This builder for chaining.

Definition at line 9465 of file RoutingSearchParameters.java.

◆ clearNumberOfSolutionsToCollect()

Builder clearNumberOfSolutionsToCollect ( )
inline
Number of solutions to collect during the search. Corresponds to the best
solutions found during the search. 0 means "unspecified".

int32 number_of_solutions_to_collect = 17;

Returns
This builder for chaining.

Definition at line 9560 of file RoutingSearchParameters.java.

◆ clearOneof()

.lang.Override Builder clearOneof ( com.google.protobuf.Descriptors.OneofDescriptor  oneof)
inline

Definition at line 8070 of file RoutingSearchParameters.java.

◆ clearOptimizationStep()

Builder clearOptimizationStep ( )
inline
Minimum step by which the solution must be improved in local search. 0
means "unspecified". If this value is fractional, it will get rounded to
the nearest integer.

double optimization_step = 7;

Returns
This builder for chaining.

Definition at line 9514 of file RoutingSearchParameters.java.

◆ clearRelocateExpensiveChainNumArcsToConsider()

Builder clearRelocateExpensiveChainNumArcsToConsider ( )
inline
Number of expensive arcs to consider cutting in the RelocateExpensiveChain
neighborhood operator (see
LocalSearchNeighborhoodOperators.use_relocate_expensive_chain()).
This parameter must be greater than 2.
NOTE(user): The number of neighbors generated by the operator for
relocate_expensive_chain_num_arcs_to_consider = K is around
K*(K-1)/2 * number_of_routes * number_of_nodes.

int32 relocate_expensive_chain_num_arcs_to_consider = 20;

Returns
This builder for chaining.

Definition at line 8963 of file RoutingSearchParameters.java.

◆ clearSavingsAddReverseArcs()

Builder clearSavingsAddReverseArcs ( )
inline
Add savings related to reverse arcs when finding the nearest neighbors
of the nodes.

bool savings_add_reverse_arcs = 15;

Returns
This builder for chaining.

Definition at line 8486 of file RoutingSearchParameters.java.

◆ clearSavingsArcCoefficient()

Builder clearSavingsArcCoefficient ( )
inline
Coefficient of the cost of the arc for which the saving value is being
computed:
Saving(a-->b) = Cost(a-->end) + Cost(start-->b)
  • savings_arc_coefficient * Cost(a-->b) This parameter must be greater than 0, and its default value is 1.
double savings_arc_coefficient = 18;
Returns
This builder for chaining.

Definition at line 8541 of file RoutingSearchParameters.java.

◆ clearSavingsMaxMemoryUsageBytes()

Builder clearSavingsMaxMemoryUsageBytes ( )
inline
The number of neighbors considered for each node in the Savings heuristic
is chosen so that the space used to store the savings doesn't exceed
savings_max_memory_usage_bytes, which must be in ]0, 1e10].
NOTE: If both savings_neighbors_ratio and savings_max_memory_usage_bytes
are specified, the number of neighbors considered for each node will be the
minimum of the two numbers determined by these parameters.

double savings_max_memory_usage_bytes = 23;

Returns
This builder for chaining.

Definition at line 8440 of file RoutingSearchParameters.java.

◆ clearSavingsNeighborsRatio()

Builder clearSavingsNeighborsRatio ( )
inline
Parameters specific to the Savings first solution heuristic.
Ratio (in ]0, 1]) of neighbors to consider for each node when constructing
the savings. If unspecified, its value is considered to be 1.0.

double savings_neighbors_ratio = 14;

Returns
This builder for chaining.

Definition at line 8382 of file RoutingSearchParameters.java.

◆ clearSavingsParallelRoutes()

Builder clearSavingsParallelRoutes ( )
inline
When true, the routes are built in parallel, sequentially otherwise.

bool savings_parallel_routes = 19;

Returns
This builder for chaining.

Definition at line 8584 of file RoutingSearchParameters.java.

◆ clearSolutionLimit()

Builder clearSolutionLimit ( )
inline
-- Search limits --
Limit to the number of solutions generated during the search. 0 means
"unspecified".

int64 solution_limit = 8;

Returns
This builder for chaining.

Definition at line 9609 of file RoutingSearchParameters.java.

◆ clearTimeLimit()

Builder clearTimeLimit ( )
inline
Limit to the time spent in the search.

.google.protobuf.Duration time_limit = 9;

Definition at line 9712 of file RoutingSearchParameters.java.

◆ clearUseCp()

Builder clearUseCp ( )
inline
If true, use the CP solver to find a solution. Either local or depth-first
search will be used depending on the value of use_depth_first_search. Will
be run before the CP-SAT solver (cf. use_cp_sat).

.operations_research.OptionalBoolean use_cp = 28;

Returns
This builder for chaining.

Definition at line 9268 of file RoutingSearchParameters.java.

◆ clearUseCpSat()

Builder clearUseCpSat ( )
inline
If true, use the CP-SAT solver to find a solution. If use_cp is also true,
the CP-SAT solver will be run after the CP solver if there is time
remaining and will use the CP solution as a hint for the CP-SAT search.
As of 5/2019, only TSP models can be solved.

.operations_research.OptionalBoolean use_cp_sat = 27;

Returns
This builder for chaining.

Definition at line 9357 of file RoutingSearchParameters.java.

◆ clearUseDepthFirstSearch()

Builder clearUseDepthFirstSearch ( )
inline
--- Search control ---
If true, the solver should use depth-first search rather than local search
to solve the problem.

bool use_depth_first_search = 6;

Returns
This builder for chaining.

Definition at line 9184 of file RoutingSearchParameters.java.

◆ clearUseFullPropagation()

Builder clearUseFullPropagation ( )
inline
--- Propagation control ---
These are advanced settings which should not be modified unless you know
what you are doing.
Use constraints with full propagation in routing model (instead of 'light'
propagation only). Full propagation is only necessary when using
depth-first search or for models which require strong propagation to
finalize the value of secondary variables.
Changing this setting to true will slow down the search in most cases and
increase memory consumption in all cases.

bool use_full_propagation = 11;

Returns
This builder for chaining.

Definition at line 9995 of file RoutingSearchParameters.java.

◆ clearUseUnfilteredFirstSolutionStrategy()

Builder clearUseUnfilteredFirstSolutionStrategy ( )
inline
--- Advanced first solutions strategy settings ---
Don't touch these unless you know what you are doing.
Use filtered version of first solution strategy if available.

bool use_unfiltered_first_solution_strategy = 2;

Returns
This builder for chaining.

Definition at line 8333 of file RoutingSearchParameters.java.

◆ clone()

.lang.Override Builder clone ( )
inline

Definition at line 8055 of file RoutingSearchParameters.java.

◆ getCheapestInsertionFarthestSeedsRatio()

.lang.Override double getCheapestInsertionFarthestSeedsRatio ( )
inline
Ratio (between 0 and 1) of available vehicles in the model on which
farthest nodes of the model are inserted as seeds in the
GlobalCheapestInsertion first solution heuristic.

double cheapest_insertion_farthest_seeds_ratio = 16;

Returns
The cheapestInsertionFarthestSeedsRatio.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8603 of file RoutingSearchParameters.java.

◆ getCheapestInsertionFirstSolutionNeighborsRatio()

.lang.Override double getCheapestInsertionFirstSolutionNeighborsRatio ( )
inline
Ratio (in ]0, 1]) of neighbors to consider for each node when creating
new insertions in the parallel/sequential cheapest insertion heuristic.
If not overridden, its default value is 1, meaning all neighbors will be
considered.
Neighbors ratio for the first solution heuristic.

double cheapest_insertion_first_solution_neighbors_ratio = 21;

Returns
The cheapestInsertionFirstSolutionNeighborsRatio.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8654 of file RoutingSearchParameters.java.

◆ getCheapestInsertionLsOperatorNeighborsRatio()

.lang.Override double getCheapestInsertionLsOperatorNeighborsRatio ( )
inline
Neighbors ratio for the heuristic when used in a local search operator (see
local_search_operators.use_global_cheapest_insertion_path_lns and
local_search_operators.use_global_cheapest_insertion_chain_lns below).

double cheapest_insertion_ls_operator_neighbors_ratio = 31;

Returns
The cheapestInsertionLsOperatorNeighborsRatio.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8707 of file RoutingSearchParameters.java.

◆ getChristofidesUseMinimumMatching()

.lang.Override boolean getChristofidesUseMinimumMatching ( )
inline
If true use minimum matching instead of minimal matching in the
Christofides algorithm.

bool christofides_use_minimum_matching = 30;

Returns
The christofidesUseMinimumMatching.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8755 of file RoutingSearchParameters.java.

◆ getContinuousSchedulingSolver()

.lang.Override com.google.ortools.constraintsolver.RoutingSearchParameters.SchedulingSolver getContinuousSchedulingSolver ( )
inline

.operations_research.RoutingSearchParameters.SchedulingSolver continuous_scheduling_solver = 33;

Returns
The continuousSchedulingSolver.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9388 of file RoutingSearchParameters.java.

◆ getContinuousSchedulingSolverValue()

.lang.Override int getContinuousSchedulingSolverValue ( )
inline

.operations_research.RoutingSearchParameters.SchedulingSolver continuous_scheduling_solver = 33;

Returns
The enum numeric value on the wire for continuousSchedulingSolver.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9369 of file RoutingSearchParameters.java.

◆ getDefaultInstanceForType()

.lang.Override com.google.ortools.constraintsolver.RoutingSearchParameters getDefaultInstanceForType ( )
inline

Definition at line 7992 of file RoutingSearchParameters.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ( )
inlinestatic

Definition at line 7880 of file RoutingSearchParameters.java.

◆ getDescriptorForType()

.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType ( )
inline

Definition at line 7987 of file RoutingSearchParameters.java.

◆ getFirstSolutionStrategy()

.lang.Override com.google.ortools.constraintsolver.FirstSolutionStrategy.Value getFirstSolutionStrategy ( )
inline
First solution strategies, used as starting point of local search.

.operations_research.FirstSolutionStrategy.Value first_solution_strategy = 1;

Returns
The firstSolutionStrategy.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8253 of file RoutingSearchParameters.java.

◆ getFirstSolutionStrategyValue()

.lang.Override int getFirstSolutionStrategyValue ( )
inline
First solution strategies, used as starting point of local search.

.operations_research.FirstSolutionStrategy.Value first_solution_strategy = 1;

Returns
The enum numeric value on the wire for firstSolutionStrategy.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8226 of file RoutingSearchParameters.java.

◆ getGuidedLocalSearchLambdaCoefficient()

.lang.Override double getGuidedLocalSearchLambdaCoefficient ( )
inline
These are advanced settings which should not be modified unless you know
what you are doing.
Lambda coefficient used to penalize arc costs when GUIDED_LOCAL_SEARCH is
used. Must be positive.

double guided_local_search_lambda_coefficient = 5;

Returns
The guidedLocalSearchLambdaCoefficient.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9103 of file RoutingSearchParameters.java.

◆ getHeuristicExpensiveChainLnsNumArcsToConsider()

.lang.Override int getHeuristicExpensiveChainLnsNumArcsToConsider ( )
inline
Number of expensive arcs to consider cutting in the
FilteredHeuristicExpensiveChainLNSOperator operator.

int32 heuristic_expensive_chain_lns_num_arcs_to_consider = 32;

Returns
The heuristicExpensiveChainLnsNumArcsToConsider.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8981 of file RoutingSearchParameters.java.

◆ getLnsTimeLimit()

com.google.protobuf.Duration getLnsTimeLimit ( )
inline
Limit to the time spent in the completion search for each local search
neighbor.

.google.protobuf.Duration lns_time_limit = 10;

Returns
The lnsTimeLimit.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9795 of file RoutingSearchParameters.java.

◆ getLnsTimeLimitBuilder()

com.google.protobuf.Duration.Builder getLnsTimeLimitBuilder ( )
inline
Limit to the time spent in the completion search for each local search
neighbor.

.google.protobuf.Duration lns_time_limit = 10;

Definition at line 9892 of file RoutingSearchParameters.java.

◆ getLnsTimeLimitOrBuilder()

com.google.protobuf.DurationOrBuilder getLnsTimeLimitOrBuilder ( )
inline
Limit to the time spent in the completion search for each local search
neighbor.

.google.protobuf.Duration lns_time_limit = 10;

Implements RoutingSearchParametersOrBuilder.

Definition at line 9905 of file RoutingSearchParameters.java.

◆ getLocalSearchMetaheuristic()

.lang.Override com.google.ortools.constraintsolver.LocalSearchMetaheuristic.Value getLocalSearchMetaheuristic ( )
inline
Local search metaheuristics used to guide the search.

.operations_research.LocalSearchMetaheuristic.Value local_search_metaheuristic = 4;

Returns
The localSearchMetaheuristic.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9052 of file RoutingSearchParameters.java.

◆ getLocalSearchMetaheuristicValue()

.lang.Override int getLocalSearchMetaheuristicValue ( )
inline
Local search metaheuristics used to guide the search.

.operations_research.LocalSearchMetaheuristic.Value local_search_metaheuristic = 4;

Returns
The enum numeric value on the wire for localSearchMetaheuristic.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9025 of file RoutingSearchParameters.java.

◆ getLocalSearchOperators()

.operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3;

Returns
The localSearchOperators.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8804 of file RoutingSearchParameters.java.

◆ getLocalSearchOperatorsBuilder()

.operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3;

Definition at line 8876 of file RoutingSearchParameters.java.

◆ getLocalSearchOperatorsOrBuilder()

.operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3;

Implements RoutingSearchParametersOrBuilder.

Definition at line 8884 of file RoutingSearchParameters.java.

◆ getLogCostOffset()

.lang.Override double getLogCostOffset ( )
inline

double log_cost_offset = 29;

Returns
The logCostOffset.

Implements RoutingSearchParametersOrBuilder.

Definition at line 10130 of file RoutingSearchParameters.java.

◆ getLogCostScalingFactor()

.lang.Override double getLogCostScalingFactor ( )
inline
In logs, cost values will be scaled and offset by the given values in the
following way: log_cost_scaling_factor * (cost + log_cost_offset)

double log_cost_scaling_factor = 22;

Returns
The logCostScalingFactor.

Implements RoutingSearchParametersOrBuilder.

Definition at line 10089 of file RoutingSearchParameters.java.

◆ getLogSearch()

.lang.Override boolean getLogSearch ( )
inline
--- Miscellaneous ---
Some of these are advanced settings which should not be modified unless you
know what you are doing.
Activates search logging. For each solution found during the search, the
following will be displayed: its objective value, the maximum objective
value since the beginning of the search, the elapsed time since the
beginning of the search, the number of branches explored in the search
tree, the number of failures in the search tree, the depth of the search
tree, the number of local search neighbors explored, the number of local
search neighbors filtered by local search filters, the number of local
search neighbors accepted, the total memory used and the percentage of the
search done.

bool log_search = 13;

Returns
The logSearch.

Implements RoutingSearchParametersOrBuilder.

Definition at line 10023 of file RoutingSearchParameters.java.

◆ getMixedIntegerSchedulingSolver()

.lang.Override com.google.ortools.constraintsolver.RoutingSearchParameters.SchedulingSolver getMixedIntegerSchedulingSolver ( )
inline

.operations_research.RoutingSearchParameters.SchedulingSolver mixed_integer_scheduling_solver = 34;

Returns
The mixedIntegerSchedulingSolver.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9442 of file RoutingSearchParameters.java.

◆ getMixedIntegerSchedulingSolverValue()

.lang.Override int getMixedIntegerSchedulingSolverValue ( )
inline

.operations_research.RoutingSearchParameters.SchedulingSolver mixed_integer_scheduling_solver = 34;

Returns
The enum numeric value on the wire for mixedIntegerSchedulingSolver.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9423 of file RoutingSearchParameters.java.

◆ getNumberOfSolutionsToCollect()

.lang.Override int getNumberOfSolutionsToCollect ( )
inline
Number of solutions to collect during the search. Corresponds to the best
solutions found during the search. 0 means "unspecified".

int32 number_of_solutions_to_collect = 17;

Returns
The numberOfSolutionsToCollect.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9532 of file RoutingSearchParameters.java.

◆ getOptimizationStep()

.lang.Override double getOptimizationStep ( )
inline
Minimum step by which the solution must be improved in local search. 0
means "unspecified". If this value is fractional, it will get rounded to
the nearest integer.

double optimization_step = 7;

Returns
The optimizationStep.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9484 of file RoutingSearchParameters.java.

◆ getRelocateExpensiveChainNumArcsToConsider()

.lang.Override int getRelocateExpensiveChainNumArcsToConsider ( )
inline
Number of expensive arcs to consider cutting in the RelocateExpensiveChain
neighborhood operator (see
LocalSearchNeighborhoodOperators.use_relocate_expensive_chain()).
This parameter must be greater than 2.
NOTE(user): The number of neighbors generated by the operator for
relocate_expensive_chain_num_arcs_to_consider = K is around
K*(K-1)/2 * number_of_routes * number_of_nodes.

int32 relocate_expensive_chain_num_arcs_to_consider = 20;

Returns
The relocateExpensiveChainNumArcsToConsider.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8925 of file RoutingSearchParameters.java.

◆ getSavingsAddReverseArcs()

.lang.Override boolean getSavingsAddReverseArcs ( )
inline
Add savings related to reverse arcs when finding the nearest neighbors
of the nodes.

bool savings_add_reverse_arcs = 15;

Returns
The savingsAddReverseArcs.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8458 of file RoutingSearchParameters.java.

◆ getSavingsArcCoefficient()

.lang.Override double getSavingsArcCoefficient ( )
inline
Coefficient of the cost of the arc for which the saving value is being
computed:
Saving(a-->b) = Cost(a-->end) + Cost(start-->b)
  • savings_arc_coefficient * Cost(a-->b) This parameter must be greater than 0, and its default value is 1.
double savings_arc_coefficient = 18;
Returns
The savingsArcCoefficient.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8507 of file RoutingSearchParameters.java.

◆ getSavingsMaxMemoryUsageBytes()

.lang.Override double getSavingsMaxMemoryUsageBytes ( )
inline
The number of neighbors considered for each node in the Savings heuristic
is chosen so that the space used to store the savings doesn't exceed
savings_max_memory_usage_bytes, which must be in ]0, 1e10].
NOTE: If both savings_neighbors_ratio and savings_max_memory_usage_bytes
are specified, the number of neighbors considered for each node will be the
minimum of the two numbers determined by these parameters.

double savings_max_memory_usage_bytes = 23;

Returns
The savingsMaxMemoryUsageBytes.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8404 of file RoutingSearchParameters.java.

◆ getSavingsNeighborsRatio()

.lang.Override double getSavingsNeighborsRatio ( )
inline
Parameters specific to the Savings first solution heuristic.
Ratio (in ]0, 1]) of neighbors to consider for each node when constructing
the savings. If unspecified, its value is considered to be 1.0.

double savings_neighbors_ratio = 14;

Returns
The savingsNeighborsRatio.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8352 of file RoutingSearchParameters.java.

◆ getSavingsParallelRoutes()

.lang.Override boolean getSavingsParallelRoutes ( )
inline
When true, the routes are built in parallel, sequentially otherwise.

bool savings_parallel_routes = 19;

Returns
The savingsParallelRoutes.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8558 of file RoutingSearchParameters.java.

◆ getSolutionLimit()

.lang.Override long getSolutionLimit ( )
inline
-- Search limits --
Limit to the number of solutions generated during the search. 0 means
"unspecified".

int64 solution_limit = 8;

Returns
The solutionLimit.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9579 of file RoutingSearchParameters.java.

◆ getTimeLimit()

com.google.protobuf.Duration getTimeLimit ( )
inline
Limit to the time spent in the search.

.google.protobuf.Duration time_limit = 9;

Returns
The timeLimit.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9638 of file RoutingSearchParameters.java.

◆ getTimeLimitBuilder()

com.google.protobuf.Duration.Builder getTimeLimitBuilder ( )
inline
Limit to the time spent in the search.

.google.protobuf.Duration time_limit = 9;

Definition at line 9730 of file RoutingSearchParameters.java.

◆ getTimeLimitOrBuilder()

com.google.protobuf.DurationOrBuilder getTimeLimitOrBuilder ( )
inline
Limit to the time spent in the search.

.google.protobuf.Duration time_limit = 9;

Implements RoutingSearchParametersOrBuilder.

Definition at line 9742 of file RoutingSearchParameters.java.

◆ getUseCp()

.lang.Override com.google.ortools.util.OptionalBoolean getUseCp ( )
inline
If true, use the CP solver to find a solution. Either local or depth-first
search will be used depending on the value of use_depth_first_search. Will
be run before the CP-SAT solver (cf. use_cp_sat).

.operations_research.OptionalBoolean use_cp = 28;

Returns
The useCp.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9233 of file RoutingSearchParameters.java.

◆ getUseCpSat()

.lang.Override com.google.ortools.util.OptionalBoolean getUseCpSat ( )
inline
If true, use the CP-SAT solver to find a solution. If use_cp is also true,
the CP-SAT solver will be run after the CP solver if there is time
remaining and will use the CP solution as a hint for the CP-SAT search.
As of 5/2019, only TSP models can be solved.

.operations_research.OptionalBoolean use_cp_sat = 27;

Returns
The useCpSat.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9320 of file RoutingSearchParameters.java.

◆ getUseCpSatValue()

.lang.Override int getUseCpSatValue ( )
inline
If true, use the CP-SAT solver to find a solution. If use_cp is also true,
the CP-SAT solver will be run after the CP solver if there is time
remaining and will use the CP solution as a hint for the CP-SAT search.
As of 5/2019, only TSP models can be solved.

.operations_research.OptionalBoolean use_cp_sat = 27;

Returns
The enum numeric value on the wire for useCpSat.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9287 of file RoutingSearchParameters.java.

◆ getUseCpValue()

.lang.Override int getUseCpValue ( )
inline
If true, use the CP solver to find a solution. Either local or depth-first
search will be used depending on the value of use_depth_first_search. Will
be run before the CP-SAT solver (cf. use_cp_sat).

.operations_research.OptionalBoolean use_cp = 28;

Returns
The enum numeric value on the wire for useCp.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9202 of file RoutingSearchParameters.java.

◆ getUseDepthFirstSearch()

.lang.Override boolean getUseDepthFirstSearch ( )
inline
--- Search control ---
If true, the solver should use depth-first search rather than local search
to solve the problem.

bool use_depth_first_search = 6;

Returns
The useDepthFirstSearch.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9154 of file RoutingSearchParameters.java.

◆ getUseFullPropagation()

.lang.Override boolean getUseFullPropagation ( )
inline
--- Propagation control ---
These are advanced settings which should not be modified unless you know
what you are doing.
Use constraints with full propagation in routing model (instead of 'light'
propagation only). Full propagation is only necessary when using
depth-first search or for models which require strong propagation to
finalize the value of secondary variables.
Changing this setting to true will slow down the search in most cases and
increase memory consumption in all cases.

bool use_full_propagation = 11;

Returns
The useFullPropagation.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9953 of file RoutingSearchParameters.java.

◆ getUseUnfilteredFirstSolutionStrategy()

.lang.Override boolean getUseUnfilteredFirstSolutionStrategy ( )
inline
--- Advanced first solutions strategy settings ---
Don't touch these unless you know what you are doing.
Use filtered version of first solution strategy if available.

bool use_unfiltered_first_solution_strategy = 2;

Returns
The useUnfilteredFirstSolutionStrategy.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8303 of file RoutingSearchParameters.java.

◆ hasLnsTimeLimit()

boolean hasLnsTimeLimit ( )
inline
Limit to the time spent in the completion search for each local search
neighbor.

.google.protobuf.Duration lns_time_limit = 10;

Returns
Whether the lnsTimeLimit field is set.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9783 of file RoutingSearchParameters.java.

◆ hasLocalSearchOperators()

boolean hasLocalSearchOperators ( )
inline

.operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3;

Returns
Whether the localSearchOperators field is set.

Implements RoutingSearchParametersOrBuilder.

Definition at line 8797 of file RoutingSearchParameters.java.

◆ hasTimeLimit()

boolean hasTimeLimit ( )
inline
Limit to the time spent in the search.

.google.protobuf.Duration time_limit = 9;

Returns
Whether the timeLimit field is set.

Implements RoutingSearchParametersOrBuilder.

Definition at line 9627 of file RoutingSearchParameters.java.

◆ internalGetFieldAccessorTable()

.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ( )
inlineprotected

Definition at line 7886 of file RoutingSearchParameters.java.

◆ isInitialized()

.lang.Override final boolean isInitialized ( )
inline

Definition at line 8194 of file RoutingSearchParameters.java.

◆ mergeFrom() [1/3]

◆ mergeFrom() [2/3]

.lang.Override Builder mergeFrom ( com.google.protobuf.CodedInputStream  input,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws java.io.IOException
inline

Definition at line 8199 of file RoutingSearchParameters.java.

◆ mergeFrom() [3/3]

.lang.Override Builder mergeFrom ( com.google.protobuf.Message  other)
inline

Definition at line 8087 of file RoutingSearchParameters.java.

◆ mergeLnsTimeLimit()

Builder mergeLnsTimeLimit ( com.google.protobuf.Duration  value)
inline
Limit to the time spent in the completion search for each local search
neighbor.

.google.protobuf.Duration lns_time_limit = 10;

Definition at line 9850 of file RoutingSearchParameters.java.

◆ mergeLocalSearchOperators()

.operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3;

Definition at line 8844 of file RoutingSearchParameters.java.

◆ mergeTimeLimit()

Builder mergeTimeLimit ( com.google.protobuf.Duration  value)
inline
Limit to the time spent in the search.

.google.protobuf.Duration time_limit = 9;

Definition at line 9690 of file RoutingSearchParameters.java.

◆ mergeUnknownFields()

.lang.Override final Builder mergeUnknownFields ( final com.google.protobuf.UnknownFieldSet  unknownFields)
inline

Definition at line 10161 of file RoutingSearchParameters.java.

◆ setCheapestInsertionFarthestSeedsRatio()

Builder setCheapestInsertionFarthestSeedsRatio ( double  value)
inline
Ratio (between 0 and 1) of available vehicles in the model on which
farthest nodes of the model are inserted as seeds in the
GlobalCheapestInsertion first solution heuristic.

double cheapest_insertion_farthest_seeds_ratio = 16;

Parameters
valueThe cheapestInsertionFarthestSeedsRatio to set.
Returns
This builder for chaining.

Definition at line 8617 of file RoutingSearchParameters.java.

◆ setCheapestInsertionFirstSolutionNeighborsRatio()

Builder setCheapestInsertionFirstSolutionNeighborsRatio ( double  value)
inline
Ratio (in ]0, 1]) of neighbors to consider for each node when creating
new insertions in the parallel/sequential cheapest insertion heuristic.
If not overridden, its default value is 1, meaning all neighbors will be
considered.
Neighbors ratio for the first solution heuristic.

double cheapest_insertion_first_solution_neighbors_ratio = 21;

Parameters
valueThe cheapestInsertionFirstSolutionNeighborsRatio to set.
Returns
This builder for chaining.

Definition at line 8670 of file RoutingSearchParameters.java.

◆ setCheapestInsertionLsOperatorNeighborsRatio()

Builder setCheapestInsertionLsOperatorNeighborsRatio ( double  value)
inline
Neighbors ratio for the heuristic when used in a local search operator (see
local_search_operators.use_global_cheapest_insertion_path_lns and
local_search_operators.use_global_cheapest_insertion_chain_lns below).

double cheapest_insertion_ls_operator_neighbors_ratio = 31;

Parameters
valueThe cheapestInsertionLsOperatorNeighborsRatio to set.
Returns
This builder for chaining.

Definition at line 8721 of file RoutingSearchParameters.java.

◆ setChristofidesUseMinimumMatching()

Builder setChristofidesUseMinimumMatching ( boolean  value)
inline
If true use minimum matching instead of minimal matching in the
Christofides algorithm.

bool christofides_use_minimum_matching = 30;

Parameters
valueThe christofidesUseMinimumMatching to set.
Returns
This builder for chaining.

Definition at line 8768 of file RoutingSearchParameters.java.

◆ setContinuousSchedulingSolver()

.operations_research.RoutingSearchParameters.SchedulingSolver continuous_scheduling_solver = 33;

Parameters
valueThe continuousSchedulingSolver to set.
Returns
This builder for chaining.

Definition at line 9398 of file RoutingSearchParameters.java.

◆ setContinuousSchedulingSolverValue()

Builder setContinuousSchedulingSolverValue ( int  value)
inline

.operations_research.RoutingSearchParameters.SchedulingSolver continuous_scheduling_solver = 33;

Parameters
valueThe enum numeric value on the wire for continuousSchedulingSolver to set.
Returns
This builder for chaining.

Definition at line 9377 of file RoutingSearchParameters.java.

◆ setField()

.lang.Override Builder setField ( com.google.protobuf.Descriptors.FieldDescriptor  field,
java.lang.Object  value 
)
inline

Definition at line 8059 of file RoutingSearchParameters.java.

◆ setFirstSolutionStrategy()

First solution strategies, used as starting point of local search.

.operations_research.FirstSolutionStrategy.Value first_solution_strategy = 1;

Parameters
valueThe firstSolutionStrategy to set.
Returns
This builder for chaining.

Definition at line 8267 of file RoutingSearchParameters.java.

◆ setFirstSolutionStrategyValue()

Builder setFirstSolutionStrategyValue ( int  value)
inline
First solution strategies, used as starting point of local search.

.operations_research.FirstSolutionStrategy.Value first_solution_strategy = 1;

Parameters
valueThe enum numeric value on the wire for firstSolutionStrategy to set.
Returns
This builder for chaining.

Definition at line 8238 of file RoutingSearchParameters.java.

◆ setGuidedLocalSearchLambdaCoefficient()

Builder setGuidedLocalSearchLambdaCoefficient ( double  value)
inline
These are advanced settings which should not be modified unless you know
what you are doing.
Lambda coefficient used to penalize arc costs when GUIDED_LOCAL_SEARCH is
used. Must be positive.

double guided_local_search_lambda_coefficient = 5;

Parameters
valueThe guidedLocalSearchLambdaCoefficient to set.
Returns
This builder for chaining.

Definition at line 9118 of file RoutingSearchParameters.java.

◆ setHeuristicExpensiveChainLnsNumArcsToConsider()

Builder setHeuristicExpensiveChainLnsNumArcsToConsider ( int  value)
inline
Number of expensive arcs to consider cutting in the
FilteredHeuristicExpensiveChainLNSOperator operator.

int32 heuristic_expensive_chain_lns_num_arcs_to_consider = 32;

Parameters
valueThe heuristicExpensiveChainLnsNumArcsToConsider to set.
Returns
This builder for chaining.

Definition at line 8994 of file RoutingSearchParameters.java.

◆ setLnsTimeLimit() [1/2]

Builder setLnsTimeLimit ( com.google.protobuf.Duration  value)
inline
Limit to the time spent in the completion search for each local search
neighbor.

.google.protobuf.Duration lns_time_limit = 10;

Definition at line 9810 of file RoutingSearchParameters.java.

◆ setLnsTimeLimit() [2/2]

Builder setLnsTimeLimit ( com.google.protobuf.Duration.Builder  builderForValue)
inline
Limit to the time spent in the completion search for each local search
neighbor.

.google.protobuf.Duration lns_time_limit = 10;

Definition at line 9831 of file RoutingSearchParameters.java.

◆ setLocalSearchMetaheuristic()

Builder setLocalSearchMetaheuristic ( com.google.ortools.constraintsolver.LocalSearchMetaheuristic.Value  value)
inline
Local search metaheuristics used to guide the search.

.operations_research.LocalSearchMetaheuristic.Value local_search_metaheuristic = 4;

Parameters
valueThe localSearchMetaheuristic to set.
Returns
This builder for chaining.

Definition at line 9066 of file RoutingSearchParameters.java.

◆ setLocalSearchMetaheuristicValue()

Builder setLocalSearchMetaheuristicValue ( int  value)
inline
Local search metaheuristics used to guide the search.

.operations_research.LocalSearchMetaheuristic.Value local_search_metaheuristic = 4;

Parameters
valueThe enum numeric value on the wire for localSearchMetaheuristic to set.
Returns
This builder for chaining.

Definition at line 9037 of file RoutingSearchParameters.java.

◆ setLocalSearchOperators() [1/2]

.operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3;

Definition at line 8814 of file RoutingSearchParameters.java.

◆ setLocalSearchOperators() [2/2]

.operations_research.RoutingSearchParameters.LocalSearchNeighborhoodOperators local_search_operators = 3;

Definition at line 8830 of file RoutingSearchParameters.java.

◆ setLogCostOffset()

Builder setLogCostOffset ( double  value)
inline

double log_cost_offset = 29;

Parameters
valueThe logCostOffset to set.
Returns
This builder for chaining.

Definition at line 10138 of file RoutingSearchParameters.java.

◆ setLogCostScalingFactor()

Builder setLogCostScalingFactor ( double  value)
inline
In logs, cost values will be scaled and offset by the given values in the
following way: log_cost_scaling_factor * (cost + log_cost_offset)

double log_cost_scaling_factor = 22;

Parameters
valueThe logCostScalingFactor to set.
Returns
This builder for chaining.

Definition at line 10102 of file RoutingSearchParameters.java.

◆ setLogSearch()

Builder setLogSearch ( boolean  value)
inline
--- Miscellaneous ---
Some of these are advanced settings which should not be modified unless you
know what you are doing.
Activates search logging. For each solution found during the search, the
following will be displayed: its objective value, the maximum objective
value since the beginning of the search, the elapsed time since the
beginning of the search, the number of branches explored in the search
tree, the number of failures in the search tree, the depth of the search
tree, the number of local search neighbors explored, the number of local
search neighbors filtered by local search filters, the number of local
search neighbors accepted, the total memory used and the percentage of the
search done.

bool log_search = 13;

Parameters
valueThe logSearch to set.
Returns
This builder for chaining.

Definition at line 10046 of file RoutingSearchParameters.java.

◆ setMixedIntegerSchedulingSolver()

.operations_research.RoutingSearchParameters.SchedulingSolver mixed_integer_scheduling_solver = 34;

Parameters
valueThe mixedIntegerSchedulingSolver to set.
Returns
This builder for chaining.

Definition at line 9452 of file RoutingSearchParameters.java.

◆ setMixedIntegerSchedulingSolverValue()

Builder setMixedIntegerSchedulingSolverValue ( int  value)
inline

.operations_research.RoutingSearchParameters.SchedulingSolver mixed_integer_scheduling_solver = 34;

Parameters
valueThe enum numeric value on the wire for mixedIntegerSchedulingSolver to set.
Returns
This builder for chaining.

Definition at line 9431 of file RoutingSearchParameters.java.

◆ setNumberOfSolutionsToCollect()

Builder setNumberOfSolutionsToCollect ( int  value)
inline
Number of solutions to collect during the search. Corresponds to the best
solutions found during the search. 0 means "unspecified".

int32 number_of_solutions_to_collect = 17;

Parameters
valueThe numberOfSolutionsToCollect to set.
Returns
This builder for chaining.

Definition at line 9545 of file RoutingSearchParameters.java.

◆ setOptimizationStep()

Builder setOptimizationStep ( double  value)
inline
Minimum step by which the solution must be improved in local search. 0
means "unspecified". If this value is fractional, it will get rounded to
the nearest integer.

double optimization_step = 7;

Parameters
valueThe optimizationStep to set.
Returns
This builder for chaining.

Definition at line 9498 of file RoutingSearchParameters.java.

◆ setRelocateExpensiveChainNumArcsToConsider()

Builder setRelocateExpensiveChainNumArcsToConsider ( int  value)
inline
Number of expensive arcs to consider cutting in the RelocateExpensiveChain
neighborhood operator (see
LocalSearchNeighborhoodOperators.use_relocate_expensive_chain()).
This parameter must be greater than 2.
NOTE(user): The number of neighbors generated by the operator for
relocate_expensive_chain_num_arcs_to_consider = K is around
K*(K-1)/2 * number_of_routes * number_of_nodes.

int32 relocate_expensive_chain_num_arcs_to_consider = 20;

Parameters
valueThe relocateExpensiveChainNumArcsToConsider to set.
Returns
This builder for chaining.

Definition at line 8943 of file RoutingSearchParameters.java.

◆ setRepeatedField()

.lang.Override Builder setRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor  field,
int  index,
java.lang.Object  value 
)
inline

Definition at line 8075 of file RoutingSearchParameters.java.

◆ setSavingsAddReverseArcs()

Builder setSavingsAddReverseArcs ( boolean  value)
inline
Add savings related to reverse arcs when finding the nearest neighbors
of the nodes.

bool savings_add_reverse_arcs = 15;

Parameters
valueThe savingsAddReverseArcs to set.
Returns
This builder for chaining.

Definition at line 8471 of file RoutingSearchParameters.java.

◆ setSavingsArcCoefficient()

Builder setSavingsArcCoefficient ( double  value)
inline
Coefficient of the cost of the arc for which the saving value is being
computed:
Saving(a-->b) = Cost(a-->end) + Cost(start-->b)
  • savings_arc_coefficient * Cost(a-->b) This parameter must be greater than 0, and its default value is 1.
double savings_arc_coefficient = 18;
Parameters
valueThe savingsArcCoefficient to set.
Returns
This builder for chaining.

Definition at line 8523 of file RoutingSearchParameters.java.

◆ setSavingsMaxMemoryUsageBytes()

Builder setSavingsMaxMemoryUsageBytes ( double  value)
inline
The number of neighbors considered for each node in the Savings heuristic
is chosen so that the space used to store the savings doesn't exceed
savings_max_memory_usage_bytes, which must be in ]0, 1e10].
NOTE: If both savings_neighbors_ratio and savings_max_memory_usage_bytes
are specified, the number of neighbors considered for each node will be the
minimum of the two numbers determined by these parameters.

double savings_max_memory_usage_bytes = 23;

Parameters
valueThe savingsMaxMemoryUsageBytes to set.
Returns
This builder for chaining.

Definition at line 8421 of file RoutingSearchParameters.java.

◆ setSavingsNeighborsRatio()

Builder setSavingsNeighborsRatio ( double  value)
inline
Parameters specific to the Savings first solution heuristic.
Ratio (in ]0, 1]) of neighbors to consider for each node when constructing
the savings. If unspecified, its value is considered to be 1.0.

double savings_neighbors_ratio = 14;

Parameters
valueThe savingsNeighborsRatio to set.
Returns
This builder for chaining.

Definition at line 8366 of file RoutingSearchParameters.java.

◆ setSavingsParallelRoutes()

Builder setSavingsParallelRoutes ( boolean  value)
inline
When true, the routes are built in parallel, sequentially otherwise.

bool savings_parallel_routes = 19;

Parameters
valueThe savingsParallelRoutes to set.
Returns
This builder for chaining.

Definition at line 8570 of file RoutingSearchParameters.java.

◆ setSolutionLimit()

Builder setSolutionLimit ( long  value)
inline
-- Search limits --
Limit to the number of solutions generated during the search. 0 means
"unspecified".

int64 solution_limit = 8;

Parameters
valueThe solutionLimit to set.
Returns
This builder for chaining.

Definition at line 9593 of file RoutingSearchParameters.java.

◆ setTimeLimit() [1/2]

Builder setTimeLimit ( com.google.protobuf.Duration  value)
inline
Limit to the time spent in the search.

.google.protobuf.Duration time_limit = 9;

Definition at line 9652 of file RoutingSearchParameters.java.

◆ setTimeLimit() [2/2]

Builder setTimeLimit ( com.google.protobuf.Duration.Builder  builderForValue)
inline
Limit to the time spent in the search.

.google.protobuf.Duration time_limit = 9;

Definition at line 9672 of file RoutingSearchParameters.java.

◆ setUnknownFields()

.lang.Override final Builder setUnknownFields ( final com.google.protobuf.UnknownFieldSet  unknownFields)
inline

Definition at line 10155 of file RoutingSearchParameters.java.

◆ setUseCp()

If true, use the CP solver to find a solution. Either local or depth-first
search will be used depending on the value of use_depth_first_search. Will
be run before the CP-SAT solver (cf. use_cp_sat).

.operations_research.OptionalBoolean use_cp = 28;

Parameters
valueThe useCp to set.
Returns
This builder for chaining.

Definition at line 9249 of file RoutingSearchParameters.java.

◆ setUseCpSat()

Builder setUseCpSat ( com.google.ortools.util.OptionalBoolean  value)
inline
If true, use the CP-SAT solver to find a solution. If use_cp is also true,
the CP-SAT solver will be run after the CP solver if there is time
remaining and will use the CP solution as a hint for the CP-SAT search.
As of 5/2019, only TSP models can be solved.

.operations_research.OptionalBoolean use_cp_sat = 27;

Parameters
valueThe useCpSat to set.
Returns
This builder for chaining.

Definition at line 9337 of file RoutingSearchParameters.java.

◆ setUseCpSatValue()

Builder setUseCpSatValue ( int  value)
inline
If true, use the CP-SAT solver to find a solution. If use_cp is also true,
the CP-SAT solver will be run after the CP solver if there is time
remaining and will use the CP solution as a hint for the CP-SAT search.
As of 5/2019, only TSP models can be solved.

.operations_research.OptionalBoolean use_cp_sat = 27;

Parameters
valueThe enum numeric value on the wire for useCpSat to set.
Returns
This builder for chaining.

Definition at line 9302 of file RoutingSearchParameters.java.

◆ setUseCpValue()

Builder setUseCpValue ( int  value)
inline
If true, use the CP solver to find a solution. Either local or depth-first
search will be used depending on the value of use_depth_first_search. Will
be run before the CP-SAT solver (cf. use_cp_sat).

.operations_research.OptionalBoolean use_cp = 28;

Parameters
valueThe enum numeric value on the wire for useCp to set.
Returns
This builder for chaining.

Definition at line 9216 of file RoutingSearchParameters.java.

◆ setUseDepthFirstSearch()

Builder setUseDepthFirstSearch ( boolean  value)
inline
--- Search control ---
If true, the solver should use depth-first search rather than local search
to solve the problem.

bool use_depth_first_search = 6;

Parameters
valueThe useDepthFirstSearch to set.
Returns
This builder for chaining.

Definition at line 9168 of file RoutingSearchParameters.java.

◆ setUseFullPropagation()

Builder setUseFullPropagation ( boolean  value)
inline
--- Propagation control ---
These are advanced settings which should not be modified unless you know
what you are doing.
Use constraints with full propagation in routing model (instead of 'light'
propagation only). Full propagation is only necessary when using
depth-first search or for models which require strong propagation to
finalize the value of secondary variables.
Changing this setting to true will slow down the search in most cases and
increase memory consumption in all cases.

bool use_full_propagation = 11;

Parameters
valueThe useFullPropagation to set.
Returns
This builder for chaining.

Definition at line 9973 of file RoutingSearchParameters.java.

◆ setUseUnfilteredFirstSolutionStrategy()

Builder setUseUnfilteredFirstSolutionStrategy ( boolean  value)
inline
--- Advanced first solutions strategy settings ---
Don't touch these unless you know what you are doing.
Use filtered version of first solution strategy if available.

bool use_unfiltered_first_solution_strategy = 2;

Parameters
valueThe useUnfilteredFirstSolutionStrategy to set.
Returns
This builder for chaining.

Definition at line 8317 of file RoutingSearchParameters.java.


The documentation for this class was generated from the following file: