Method

cbls is a local search over complete assignments: every variable always has a value, and the search changes values until every row holds and the objective is as low as it can get. How far an assignment is from feasible is the weighted violation \(V_w\) of its rows. It follows ViolationLS [1], which combines:

  • Feasibility Jump (FJ): pick a variable and move it to the value that lowers \(V_w\) most, its jump value;

  • guided local search (GLS) weights: at a local minimum, where no such move lowers \(V_w\), the rows still violated gain weight, so that satisfying them becomes worth more and the search leaves the minimum;

  • Novelty Jump: compound moves, a short sequence of jumps kept when together they lower \(V_w\);

  • the objective as one more row, \(f(x) \leq F\): after each feasible point \(F\) drops below its objective, so the objective row is violated again until the search finds a better one.

New here:

  • Float, List and Set variables in a nonlinear expression DAG;

  • structural moves for List and Set;

  • an adaptive objective step;

  • an inner solver for Floats, and hooks for a problem’s own inner solver;

  • large neighbourhood search (LNS): on every few kicks, randomise part of the variables and repair with FJ, keeping the result if it is better;

  • a portfolio of workers sharing incumbents and the objective bound.

Two deviations: the batch kind is drawn every batch, and a kick starts from the incumbent. The algorithms below leave out guards, tolerances and caps.

Name

Default

Options

threads

0 (one per core)

--threads, threads=; 1 = one search

time limit, seed

10 s, 42

--time-limit, --seed; time_limit=, seed=

iteration cap

0 (none)

max_iterations

Novelty Jump

on, 0.5 of scalar batches

use_compound_moves, novelty_jump_probability

structural batch

auto: 0.33 with List/Set, 1 with no scalar work, else 0

structural_batch_probability

structural selection

Auto

structural_selection, structural_sample_size (8), structural_neighbours; C++: move_generators, default_structural_generators

objective tie-break

on

fj_objective_tie_break

feasibility tolerance

\(10^{-6}\)

feasibility_tolerance

inner solver

off

--intensify, intensify=True; C++: FloatIntensifyHook fields

LNS

off

--lns φ, lns=φ; --lns-interval, lns_interval (3)

FPR

0; repair off

fpr_batch_probability, fpr_dag_propagation, lns_repair_fpr

kick cadence

100 batches, \(p = 0.1\), 300

C++: perturbation_period, perturbation_probability, unproductive_iterations, batch_iterations (1000)

worker variants, Float jitter

off, 0

diversify_workers, float_start_jitter \(\in [0, 1]\)

shared bound, pool size

on, \(\max(10, 2N)\)

C++: ParallelConfig::share_objective_bound, pool_capacity

Plain names are cbls.SearchConfig fields (C++ SearchConfig); flags are both CLIs’; keywords are cbls.solve’s; C++ marks what only C++ reaches.

Model and evaluation

The model, \(\min f(x)\) s.t. \(g_i(x) \le 0\), \(h_j(x) = 0\), \(x_k \in D_k\), is a DAG: variables are leaves, nodes are operations, each row is a comparison node. Moving \(x_v\) changes only its cone \(C(v)\), the nodes reachable from \(v\). A row affine in \(x_v\) is scored in closed form from its cached slope instead. Commit is Probe without the log.

Violation and weights

\[v_i(x) = \min\bigl(10^{30}, \max(0, g_i(x))\bigr), \qquad v_j(x) = \min\bigl(10^{30}, \lvert h_j(x) \rvert\bigr)\]
  • \(V_w(x) = \sum_r w_r\, v_r(x)\) over every row, the objective row \(v_0 = \max(0, f(x) - F)\) included; NaN reads as \(10^{30}\).

  • A row holds at \(v_r \le \tau = 10^{-6}\) (absolute); the implicit domain rows (\(\log\) argument \(\ge 10^{-9}\), \(\sqrt{\cdot}\) and fractional-power arguments \(\ge 0\)) only at \(v_r = 0\). Feasible: every row but the objective row holds.

  • Weights start at 1 and reset to 1 at each new best and each kick. At a local minimum, \(w_r \leftarrow \rho\, w_r + [\, v_r(x) > \tau \,]\) for every row, with \(\rho \in \lbrace 0.95, 1 \rbrace\) drawn uniformly at the start, at each new best and at each kick.

Feasibility Jump

\[\Delta_v(a) = V_w(x[v{:=}a]) - V_w(x), \qquad a_v^* = \arg\min_{a \in K_v} \Delta_v(a), \qquad s_v = -\Delta_v(a_v^*),\]

ties going to the first candidate in the order below.

Type

Candidates \(K_v\)

Bool

\(1 - x_v\)

Int, window \(\le 256\) wide

every integer in the domain window

Int, wider

the window’s ends, \(x_v \pm 1\), a 32-point grid

Float

\(x_v - v_c / \partial_v v_c\) for up to 4 violated rows \(c\) of \(v\) (Newton, clamped), the midpoint, the bounds

  • A variable that reaches a Ceil, Floor, Round or Element node also gets that node’s breakpoints.

  • Once the search stalls, a Float at a stationary point of its violated rows also gets \(x_v \pm \lbrace 10^{-6}, 10^{-2} \rbrace (\lvert x_v \rvert + 1)\).

  • A violated objective row gives a Newton candidate onto \(f = F\): this is how the search descends \(f\).

  • Objective tie-break: before the first feasible point the objective row is inert; for an affine \(f\), an exact tie in \(\Delta_v\) goes to the candidate that lowers \(f\) most, and a jump that only lowers \(f\) scores the smallest positive double.

\(Q\): the variables in a violated row; \(J\): the cached jumps. A batch also ends after 300 iterations without a new low of the unweighted real-row violation (an unproductive batch, see Diversification).

Novelty Jump

A Novelty batch searches compound moves under \(w'_r = w_r\) for rows violated at entry and \(w'_r = w_r / 1024\) otherwise; a move that breaks a satisfied row lifts it to \(w_r\). With \(s'_v\) the jump score under \(w'\), \(s_v\) that jump’s score under \(w\), \(s_m\) the summed \(s\) of the moves on the stack \(T\) and \(s_c\) the best \(s\) tried at this level, a variable passes the filter

\[F(v):\quad s_m + s'_v > 0 \ \ \lor\ \ s_v > s_c .\]

Search and ApplyNoveltyJump are [1]’s Algorithms 5 and 4. A Novelty batch is GLS over ApplyNoveltyJump (a local minimum updates the weights as in FJ), charged 3 iterations per move and 1 per weight update against the same 1000.

Structural moves

List and Set variables move only in structural batches, LNS and kicks. Every move keeps its variable in its domain (distinct elements, size in \([\text{min}, \text{max}]\), a partition’s cover). A move \(m\) is scored over the rows \(R(m)\) it can change, \(\Delta(m) = \sum_{r \in R(m)} w_r \bigl(v_r(m(x)) - v_r(x)\bigr)\).

Variable

Moves

List

swap, 2-opt, relocate, or-opt (2, 3), insert, exchange, remove

Set

add, remove, swap

ListPartition

relocate, swap, 2-opt*, and insert/remove under an at-most-once cover, between member lists

Each \(m\) is an edit of \(x\). Selection (structural_selection):

  • FirstImprovingSample: the algorithm above.

  • BestOfSample: commits the best of at least structural_sample_size candidates.

  • ViolationGuided: the same, only for generators whose variables reach a violated row.

  • GranularBest: offers, per partition element, every move pairing it with one of its \(k\) nearest neighbours [3].

  • Auto: GranularBest with a neighbour list, else FirstImprovingSample.

Objective bound

\[\begin{split}F = \begin{cases} +\infty & \text{before the first feasible point,} \\ f^* - 1 & f \text{ integer-valued,} \\ f^* - \delta\,(\lvert f^* \rvert + 1) & \text{otherwise,} \end{cases}\end{split}\]

with \(f^*\) the best feasible objective. \(\delta\) starts at \(10^{-3}\), becomes \(\min(10^{-3}, 2\delta)\) at each recorded incumbent and \(\max(10^{-6}, \delta/10)\) at a full-period stall, where \(F\) is recomputed; it is both the smallest improvement asked for and, through the Newton candidate onto \(F\), the descent step. A model without an objective stops at its first feasible point.

Inner solver

With intensify, the Floats are polished after each feasible batch on \(A(x) = f(x) + V_w(x)\), and the point is recorded again if it stays feasible. Candidates for one Float, each clamped to its bounds, skipping \(\lvert \partial \rvert \le 10^{-12}\):

\[x_v - \frac{v_c}{\partial_v v_c} \ \text{(first 3 violated rows } c \text{ of } v\text{)}, \qquad x_v - 0.1 \cdot 2^{-k}\, \partial_v f \ \ (k = 0, \dots, 4).\]

The minimum-norm Newton step on row \(c\) moves every Float with \(\lvert \partial_v v_c \rvert > 10^{-12}\) (at least two) by \(\Delta x = -v_c \nabla v_c / \lVert \nabla v_c \rVert^2\).

This polish is one InnerSolverHook, the generic one. In C++ a hook of your own takes its place: problem-specific code the search calls after each feasible batch, and after every batch if it asks, which may change any value and is recorded only if the point is feasible and improves. That is how cbls specialises to a problem without changing the engine; the UC-CHPED page shows one, and the C++ reference the contract.

Diversification

  • Perturb: each scalar takes a uniform value in its domain window with probability \(p\), each List/Set \(\max(1, \operatorname{round}(p\,\lvert e \rvert))\) random moves; if nothing moved, one scalar is forced to a new value.

  • LNS (lns \(= \phi\)): due every lns_interval-th kick that may run it (after the first feasible point, only full-period kicks may). It ruins and recreates each ListPartition (SISR [2]), randomises \(\max(1, \lfloor \phi n \rfloor)\) other variables (whole registered sequences where given), repairs with FJ (2000 iterations, at most 2 s), and keeps the result only if \((\text{real violation}, f)\) is lexicographically smaller.

  • FPR [4]: a batch fixes integer variables one at a time under propagation of the linear rows (with fpr_dag_propagation, also monotone nonlinear rows) and repairs with FJ; lns_repair_fpr runs one such dive on LNS’s destroyed scalars before its FJ repair.

  • Pool: feasible first, then by \(f\); capacity \(\max(10, 2N)\); each worker submits every incumbent at once. Adopt draws uniformly from the better half; it adopts nothing from an empty pool and never the current point.

  • Portfolio: \(N\) workers, each a search on a copy sharing the model’s structure. At each batch boundary a worker lowers its \(F\) to the bound of the pool’s best feasible objective; one whose search ends with time left restarts from its own point with a new seed. One thread is reproducible per seed; more are not.

  • Worker variants: diversify_workers gives workers 1–7 (mod 8) fixed variants of the Novelty probability, kick cadence, FPR, LNS interval and tie-break. float_start_jitter \(J\) moves each Float’s start by a uniform draw in \(\pm J \min(\max(1, \lvert x \rvert), \text{half its width})\), in a direct solve and on odd portfolio workers.

Limits

  • No lower bound and no proof of optimality or infeasibility: a run ends at its budget, and “infeasible” means no feasible point was found.

  • Tightly coupled equality rows are slow: a one-variable jump that fixes one row breaks the others, and only weights and compound moves get through.

References

  1. T. O. Davies, F. Didier, L. Perron. ViolationLS: Constraint-Based Local Search in CP-SAT. CPAIOR 2024. https://doi.org/10.1007/978-3-031-60597-0_16

  2. J. Christiaens, G. Vanden Berghe. Slack Induction by String Removals for Vehicle Routing Problems. Transportation Science 54(2), 2020.

  3. P. Toth, D. Vigo. The Granular Tabu Search and Its Application to the Vehicle-Routing Problem. INFORMS Journal on Computing 15(4), 2003.

  4. D. Salvagnin, R. Roberti, M. Fischetti. A fix-propagate-repair heuristic for mixed integer programming. Mathematical Programming Computation, 2024.