Routing Options

This section describes options for the routing solver.

Many of these options are available only from C++.

Search limits

Name Type Default Description
routing_solution_limit int64 kint64max Number of solutions limit.
routing_time_limit int64 kint64max Time limit, in milliseconds.
routing_lns_time_limit int64 100 Time limit in ms for LNS sub-decisionbuilder.

Search control

Name Type Default Description
routing_first_solution string First solution heuristic. See FirstSolutionStrategy() for a list of options.
routing_optimization_step int64 1 Optimization step.

First solution heuristics

Name Type Default Description
savings_route_shape_parameter double 1.0 Coefficient of the added arc in the savings definition. Varying this parameter may provide heuristic solutions which are closer to the optimal solution than otherwise obtained via the traditional algorithm where it is equal to 1.
savings_filter_neighbors int64 0 Limit the number of neighbors considered for each node in the savings first solution heuristic.
savings_filter_radius int64 0 Limit the distance up to which a neighbor is considered for each node in the savings first solution heuristic.
sweep_sectors int64 1 The number of sectors the space is divided before it is sweeped by the ray.

Local search options

The following options set local search strategies. See the description of LocalSearchMetaheuristic() in routing_enums.proto for details.

Name Type Default Description
routing_guided_local_search bool false Use guided local search.
routing_guided_local_search_lambda_coefficient double 0.1 Lambda coefficient for guided local search.
routing_simulated_annealing bool false Use simulated annealing.
routing_tabu_search bool false Use tabu search.

Propagation control

Name Type Default Description
routing_use_light_propagation bool true Use Constraints with light propagation in routing model.

Neighborhood deactivation

Name Type Default Description
routing_no_lns bool false Forbids use of Large Neighborhood Search.
routing_no_fullpathlns bool true Forbids use of Full-path Large Neighborhood Search.
routing_no_relocate bool false Forbids use of Relocate neighborhood.
routing_no_relocate_neighbors bool true Forbids use of RelocateNeighbors neighborhood.
routing_no_exchange bool false Forbids use of Exchange neighborhood.
routing_no_cross bool false Forbids use of Cross neighborhood.
routing_no_2opt bool false Forbids use of 2Opt neighborhood.
routing_no_oropt bool false Forbids use of OrOpt neighborhood.
routing_no_make_active bool false Forbids use of MakeActive/SwapActive/MakeInactive neighborhoods.
routing_no_lkh bool false Forbids use of LKH neighborhood.
routing_no_tsp bool true Forbids use of TSPOpt neighborhood.
routing_no_tsplns bool true Forbids use of TSPLNS neighborhood.
routing_use_chain_make_inactive bool false Use chain version of MakeInactive neighborhood.
routing_use_extended_swap_active bool false Use extended version of SwapActive neighborhood.

Other options

Name Type Default Description
routing_cache_callbacks bool false Cache callback calls.
routing_max_cache_size int64 1000 Maximum cache size when callback caching is on.
routing_trace bool false Trace search.
routing_search_trace bool false Use SearchTrace for monitoring search.

Enviar comentarios sobre…