Solver Phases

Construction heuristic, local search, exhaustive search, partitioned search, and VND.

The solver runs phases in sequence. Each phase uses a different strategy to improve the solution.

Construction Heuristic

Builds an initial solution by assigning values to all planning variables. Runs first — local search then improves the result.

Construction Heuristic Types

TypeDescription
first_fitAssigns the first feasible value found. Fast.
first_fit_decreasingFirst fit, processing entities by difficulty.
weakest_fitAssigns the value that leaves the most room for future assignments.
weakest_fit_decreasingWeakest fit, processing entities by difficulty.
strongest_fitAssigns the value that uses resources most aggressively.
strongest_fit_decreasingStrongest fit, processing entities by difficulty.
cheapest_insertionGreedy insertion for basic variables.
list_round_robinDistributes elements evenly across entities (list variables).
list_cheapest_insertionInserts each element at the score-minimizing position (list variables).
list_regret_insertionInserts elements in order of highest placement regret (list variables).
list_clarke_wrightGreedy route merging by savings value (list variables).
list_k_optPer-route k-opt polishing (list variables).
[[phases]]
type = "construction_heuristic"
construction_heuristic_type = "first_fit"

Iteratively improves the solution by applying moves and accepting improvements (and sometimes worse moves to escape local optima).

Acceptors

Local search uses an acceptor to decide whether to keep a move. The acceptor is configured as a nested object:

AcceptorDescription
hill_climbingOnly accepts improving moves. Fast but gets stuck in local optima.
simulated_annealingAccepts worse moves with decreasing probability. Good exploration.
tabu_searchRemembers recent moves and forbids reversing them. Strong for many problems.
late_acceptanceAccepts moves better than N steps ago. Simple and effective.
great_delugeAccepts moves above a rising water level. Steady improvement.
[[phases]]
type = "local_search"
[phases.acceptor]
type = "late_acceptance"
late_acceptance_size = 400

[phases.termination]
unimproved_step_count_limit = 10000

Acceptor-Specific Configuration

Simulated Annealing:

[phases.acceptor]
type = "simulated_annealing"
starting_temperature = "0hard/500soft"

Tabu Search:

[phases.acceptor]
type = "tabu_search"
entity_tabu_size = 7
# or value_tabu_size, move_tabu_size

Late Acceptance:

[phases.acceptor]
type = "late_acceptance"
late_acceptance_size = 400

Explores the entire search space systematically. Only practical for small problems.

Branch and Bound

[[phases]]
type = "exhaustive_search"
exhaustive_search_type = "branch_and_bound"
TypeDescription
branch_and_boundPrunes branches that can’t improve — memory efficient, finds solutions quickly
brute_forceExplores every possibility

Score Bounder

Use a ScoreBounder to prune branches that can’t improve on the best known solution, dramatically reducing the search space.

Splits the problem into independent partitions and solves them in parallel on separate threads.

[[phases]]
type = "partitioned_search"

Requires implementing the SolutionPartitioner trait to define how the problem is split.

Typical Phase Configuration

Most problems work well with construction heuristic + local search:

[[phases]]
type = "construction_heuristic"
construction_heuristic_type = "first_fit"

[[phases]]
type = "local_search"
[phases.acceptor]
type = "late_acceptance"
late_acceptance_size = 400

For better results, try tabu search or simulated annealing as the acceptor.

See Also