Bounded single-source pricing ablation (gh #41, manuscript section 3.3)¶
Bounded pricing (mcfcg_cli --bounded-pricing) stops a source’s A* once
the frontier proves no negative-reduced-cost column remains, instead of running
until every sink is settled. It is exact: the column set it emits is
identical bit-for-bit — cost, reduced cost, full arc list / arc-flow vector —
pinned by FeatureTests.BoundedPricingShadow{Tree,Path,IntermodalTree}. So the
only open question was whether it is faster.
The answer is family-dependent, and on one family backend-dependent too. It
always saves pricing time — t_PR falls in every group of both rounds — but
pricing share is the ceiling on converting that into wall clock, and on three of
the four families that share is 0.2–4.3%, so the saving disappears into the
noise. On intermodal, where pricing is 75–85% of the clock, it is worth −2 to
−6% on the backends whose LP is not the bottleneck (COPT, MOSEK). On the ones
whose LP is a large share, the trajectory shift the bound causes is larger than
the pricing saving and decides the sign in either direction — see round (b).
The flag ships off as the library default, because that default is global and
most families have nothing to win. That is not the same as the flag being
useless, and this file is the argument for both halves — so the benchmark driver
acts on the other half: scripts/benchmark_solvers.py enables --bounded-pricing
for intermodal and no other family, which is why the intermodal rows of
results/cg_benchmark.csv are not configuration-identical to the rest of that
table. PROVENANCE.txt section 1 records the split. The bound is exact, so this
changes those rows’ timings and iteration counts, never their optima.
The measurement is split into rounds, each a directory named for the axis it varies. This file carries the argument — mechanism, gain model, traps — and each round’s own README carries what that round measured and which of its numbers are quotable:
round |
dir |
varies |
status |
|---|---|---|---|
(a) |
four families at one backend, 3 reps |
landed (gh #43) |
|
(b) |
five backends on one family, HiGHS at 3 off reps |
landed (gh #44) |
Every number below comes from round (a) unless it says otherwise, and every one of them is re-derivable from that round’s logs.
Scope: every number in this file and in the two round READMEs derives from those rounds’ logs, with one exception — the rejected stale-arc fix, whose measurement is transcribed in full in the appendix below. That one measured a code change that was then reverted, so no log can carry it and re-deriving it means re-applying the change; the table is the record.
Nothing from the flag’s development survives as an artifact: the pre-rename passes, the implementation variants that preceded the shipped bound, and the all-backend on-arm pass whose banner the analyzer refuses by policy were all deleted rather than archived (gh #45). Rounds (a) and (b) re-measured the shipped implementation from scratch, and nothing here cites any of it.
How it works¶
CGParams::bounded_pricing (CLI --bounded-pricing) bounds the best reduced cost
still reachable from the frontier and stops once that bound clears
neg_rc_tol. The bound differs by formulation:
path —
max πover the unsettled sinks.tree — the residual convexity budget over the sum of the remaining demands.
Both add an allowance so the bound need only prove rc ≥ neg_rc_tol rather than
rc ≥ 0, and that allowance is what makes it fire at all. The reason is that
at a master optimum every structural row has a basic column at reduced cost 0, so
the frontier reaches the sink at almost exactly the dual: an exact-zero test lands
just short of the proof it needs and almost never triggers, while the same test
with the tolerance folded in fires on most searches. Measured fire rates across
round (a)’s logs, median per family: intermodal 72%, grid 61–64%, planar
23–47%, transportation 35%.
The result¶
Pricing share is the ceiling on anything the bound can deliver, and it is known
up front from results/cg_benchmark.csv. Under COPT, per family:
family |
pricing share |
verdict |
|---|---|---|
planar |
0.2% |
no gain possible; run as the null |
grid |
1.4–3.1% |
the decisive test — see below |
transportation |
4.3% |
settled by grid; not tested on its own merits |
intermodal |
78–80% |
the only family worth investigating |
What round (a) measured against that:
family (formulation, backend) |
pricing share |
Δ pricing time |
wall clock |
|---|---|---|---|
intermodal (tree, copt-cpu) |
85.1% |
−4.5% |
−3.7% |
intermodal (tree, copt-gpu) |
80.5% |
−4.5% |
−3.6% |
transportation (tree, copt-gpu) |
26.3% † |
−8.7% |
−1.9% † |
grid (tree) |
3.2% |
−22.4% |
+1.95% |
grid (path) |
1.7% |
+0.3% |
+0.10% |
planar (tree) |
1.6% |
−8.9% |
−1.50% |
planar (path) |
1.0% |
−0.8% |
+0.09% |
grid tree is the argument in one row: the bound removes better than a fifth of the pricing time and the clock does not follow — it drifts the wrong way, because pricing is 3.2% of it and the 0.31 s of real saving sits under 1.13 s of LP noise. A mechanism that cannot pay at 3% share cannot pay at 4.3% either, which is why transportation is settled by grid rather than by its own cells.
† The transportation row covers 6 of 9 instances — 9% of the family’s wall
clock. The 3 excluded on cost are the other 91% and price for 2.5%. Family-wide
the share is 4.3%; see families/README.md before quoting this row.
Intermodal is where the saving is mechanistically attributable, on both
executors: −5.20 s of a −5.06 s wall-clock gain is pricing under copt-cpu, and
−5.14 s of −5.11 s under copt-gpu, with LP flat to a twentieth of a second in
both. The conservative estimate is 85.1% × −2.4% ≈ −2.1% (the cheaper-per-price
term alone); the measured −3.7% also includes a trajectory that shortened 159 →
154 iterations, which is real here but not predictable per instance — round (b)
shows the same term running the other way on a backend with a larger LP share.
The wall-clock column is not the effect. Where the trajectory moves, that
column is ±Δiterations: intermodal’s family total covers cells from −25%
(SBT-18765-0, 9 → 7 iterations) to +19% (BUS-23688-0, 13 → 20). The effect is
pricing_share × per-price, which on the one family where both are measurable is
85.1% × −2.4% ≈ −2.1%.
A per-price saving is quotable on a cell where traj_moved=0 — the arms’ median
iteration and column counts agree, so both arms priced the same mix of sources.
That is the only exclusion. traj_stable (did the repetitions within each arm
agree?) is reported alongside but does not gate: reps that disagree make the
estimate noisier, not biased, and the estimate is pooled over an arm’s reps
(Σt_PR over Σpriced) precisely so that noise stays an error bar. Read
spread_per_price_off_pct — the baseline arm’s own rep-to-rep spread — next to
every per-price number. On intermodal it is 1.1–1.3% against a ~2.4% effect; on
grid and planar it is 5–21%, which is why those cells are quotable and useless.
The mechanism does show on the 9 grid/planar cells whose pricing time is large
enough to measure at all (the other 39 price for under 0.1 s total, where the
log’s 3-digit timing is pure quantization): tree saves a median 24.5% per
price (range −27.1 to −6.1%) because its bound tightens on every settle, while
path reads +1.1 to +3.4% because its max π bound waits on the most expensive
remaining commodity, which settles last.
The gain is bounded by
wall gain ~ pricing_share x per-price saving - LP_share x Delta-iterations
and the two factors of the first term are anticorrelated across families. The bound prunes the tail of a multi-target search, so its per-price saving grows with commodities per source: grid/planar tree, at 1.2–26 commodities per source, saves up to 30% on every price. But those families spend 1.0–1.5% of wall clock pricing, so none of it reaches the clock. Intermodal is the mirror image — exactly one commodity per source, so −2.4% per price, but 80–85% of wall clock spent pricing. The product never exceeds ~2.1% on any family, and it is that only on instances that finish in under a minute: across the committed benchmark the pricing share collapses as instances get harder (planar2500 0.1%, Philadelphia 1.1%, Birmingham 1.6%, Austin 4.3%), while one extra CG iteration there costs 0.4–1.5% of wall clock. Scaling intermodal up does not open this up: it has one commodity per source by construction — each request is its own source — so the small per-price saving is structural, not a size effect.
Two caveats that the raw wall-clock column will mislead you about:
t_PRalone is not a pricing measurement. The bound shifts the CG trajectory (two channels, both under “Trajectory channels” below; neither is a correctness bug), so an arm can price fewer sources and post a lowert_PRwith every individual price costing the same. Theper_price_uscolumn (t_PR / priced_sources) is the trajectory-immune metric — computable from each run’s[bounded-pricing] fired=… priced=…log line — and thetraj_moved/traj_stablepair flags the cells where it can be read.Family totals inside the noise floor are noise. transportation’s −1.9% is not a gain: 5 of its 6 cells moved the trajectory, ChicagoRegional posts +1.2% wall clock while its pricing time falls, and Barcelona posts +6.9% on 1.7% pricing share — a number the pricer cannot have caused in either direction. The
spread_off_pctcolumn carries the rep-to-rep noise floor per cell.
Where the trajectory holds still the model is accurate. On the four qualifying
copt-cpu intermodal cells (SBT-31275-0, SBT-43785-0, SBT-56295-0, SBT-6255-0),
predicted −2.46/−1.97/−1.77/−2.14% vs measured −2.02/−2.11/−2.14/−2.37% — within
0.44pp everywhere (compare the pred_wall_pct and d_t_tot_pct columns).
Quote the copt-cpu arm, whose per-price spread is half copt-gpu’s (± 0.51 pp
against ± 1.10 pp) on a ~2.4% effect. The two executors run identical
trajectories, so they are a control on the measurement rather than two results;
families/README.md works through what that control caught
in one session and not the other.
The second term is why a single-backend measurement of this flag is worthless.
Intermodal LP/pricing split by backend, computed from results/cg_benchmark.csv
(path and tree, the committed unbounded configuration):
backend |
LP share |
pricing share |
|---|---|---|
copt-cpu |
3–4% |
81–83% |
copt-gpu |
8–10% |
75–78% |
mosek |
6–7% |
80% |
cuopt |
15% |
73–74% |
highs (HiPO) |
49–53% |
40–43% |
Where the LP is 3% of runtime the trajectory shift is nearly free; where it is half the clock it dominates. Round (b) measures exactly that: on HiGHS three BUS path cells move from 20 iterations to 34, 43 and 44, and the family total swings +39% on a pricing time that fell 2%. (These shares are of the whole family; per instance HiGHS ranges wider still. Round (a)’s own sweeps show slightly different shares — 85.1% for copt-cpu, 80.5% for copt-gpu — because they cover tree only and a different session; the table above is the one an outside reader can recompute from the release.)
Implementation traps¶
Three traps the implementation must respect, each a live bug caught in review.
All three are pinned by FeatureTests.BoundedPricing* in
test/integration_test.cpp; read them before touching the bounded-pricing code.
MAX_BOUNDis overloaded. It is bothscale_dual’s saturation value andcompute_lower_bounds_to_targets’UNREACHEDsentinel, so a frontier at or above it means dead ends, not a dual proof. Cutting there salvages ~4.6e9 intobest_lband suppresses the tree’s partial column.Zero-demand commodities. One drives the tree’s remaining demand to 0 with budget left; stopping there suppresses a strictly improving column on every iteration and CG reports the result as optimal. CommaLab keeps zero-demand rows — only TNTP filters them — so this is reachable on real instances.
The tree budget must stay
+infthrough the warm start’s+infduals. It divides by remaining demand, so a saturated finite budget becomes a reachable threshold and a source goes unseeded — fatal inEdgeRows, which has no demand slack to absorb it.
The column set is pinned bit-for-bit — cost, reduced cost, and the full arc list
/ arc-flow vector — by
FeatureTests.BoundedPricingShadow{Tree,Path,IntermodalTree}, which run the real
solve_cg with the bound off while shadowing every dual vector with a
second bounded-on pricer (25k fires / 3.2k columns compared on BUS-2632-0 alone).
Trajectory channels¶
The bound is column-identical but not trajectory-neutral. Switching it on
moves intermodal iteration counts by up to ±10 and changes column counts. That is
expected and is not a dropped column. Two channels cause it, neither a
correctness bug — and note the pricing-exhausted final_round re-prices every
source regardless of postponement:
Stale arc sets. A bounded search does not refresh
_source_arcs[s](should_record_arcs: a partial set would understate the routing and postpone a source that a new capacity row does affect), sofilter_for_new_capsdecides postponement from the routing that source had at its last complete price. Different sources priced → different columns that iteration → a different LP → a different lazily separated capacity set. Live only when the filter is on (pricer_heavy || pricing_filter).Do not “fix” this by treating a bounded source as affected —
_source_bound_fired[s]is already that flag. Measured +31% wall clock on intermodal, because a 65–77% fire rate makes nearly every source affected and the filter stops filtering; SBT-56295 alone paid +68% at an unchanged iteration count. The full table is in the appendix below — it is the one measurement here with no logs behind it.A weaker lower bound.
salvage_lagr_termsubstitutesd_k·(bound_f/SCALE − margin)for thesp_ka truncated search never computed. Valid but weaker, sobest_lbdiffers and the gap exit fires on a different iteration. Live in every configuration; moves the iteration count with an identical column set.
Files¶
Each round owns its artifacts; nothing sits at this level but this file.
path |
what |
|---|---|
|
round (a): scope, sweep commands, what it measured, what is quotable |
|
one row per run log: timings, iterations, columns, bound fire counts, |
|
one row per cell, off and on arms paired and reduced to medians, with deltas |
|
the raw run logs both CSVs are derived from |
|
round (b): the five-backend result, and why HiGHS’s wall-clock total is not a stable quantity |
|
as above, for round (b): 240 runs |
|
as above, for round (b): 100 cells, wall clock decomposed into |
|
round (b)’s raw run logs |
Derive every round’s CSVs from its logs — this re-parses and never
re-solves. Add --round families|backends to do just one:
python3 scripts/analyze_bounded_pricing_ablation.py
These logs are not in the repository. They were tracked up to v0.1.0 and are now gitignored like every other per-run log: the published artifact carries consolidated CSVs and documentation, not raw runs. They are kept on disk in a working checkout so the analyzer above still re-derives both rounds’ CSVs locally, byte-identically, with no re-solve.
Two consequences worth stating plainly. A fresh clone does not have them, so
the analyzer has nothing to read and
analyze_bounded_pricing_ablation_test.py’s committed-round tests skip rather
than fail. And unlike the main benchmark — whose bench_runs/ logs are
regenerable by re-running benchmark_solvers.py — these are not regenerable
in the sense that matters: the ablation’s claims are wall-clock deltas, and
re-running produces different ones (see “Two things not to redo”). For anyone who
needs the raw runs, they remain in git history:
git log --diff-filter=D -- 'results/ablation/*/logs' | head
git checkout <commit-before-removal> -- results/ablation
Sanitisation is exactly one substitution: the absolute repo prefix, wherever it
appears — the # cmd: header, the instance field of the embedded result-CSV row,
and transportation’s TNTP: net=/trips= line. Nothing else is altered, so each
log is byte-identical to its original once that one string is removed.
See each round’s README for its sweep commands. Both arms of a comparison must
run in the same session on the same build, alternating off and on per
repetition.
Two things not to redo¶
Do not read per-instance cells off a copt-gpu grid/planar or transportation sweep. Re-running the same config differs on 25 of 48 grid/planar cells and on all 6 transportation cells (
traj_stable=0), because the GPU barrier’s interior point shifts and lazy separation then picks a different violated-capacity set. Concretely: grid10 tree diverges at iteration 13 on#row1032 vs 1033, with identical#colandLP_obj. That is why 5 of 6 transportation cells readtraj_moved=1. Those cells are not excluded from the per-price table any more — instability is noise, not bias — but their baseline spread is 5–21%, which is the same statement in a column: read the family totals, not the per-instance cells. Intermodal is near-deterministic on both executors — 15 of its 20 cells repeat their iteration and column counts across reps in both arms, and the failures are the same three instances on each — so the instability there is the instance, not the backend.Do not compare an arm against
results/cg_benchmark.csv. Those cells are a valid unbounded configuration — no log behind them carries the flag, and the feature postdates them entirely — but they are from other sessions, and on cells where the bound provably changed nothing (identical iterations and columns) wall clock still moves several percent between sessions. The +18…+32% HiGHS penalty that opened round (b) was exactly this: an on arm compared against those committed cells.Round (b) has since put a number on how bad it is. That round has been measured twice, each time with both arms in one session, on the same box: HiGHS read path −9.8% / tree +7.7% the first time and path +39.0% / tree −9.3% the second. Same 100 cells, same build recipe, opposite signs. Where the LP is a large share of the clock, a family wall-clock total is not a stable quantity at all — not merely uncomparable across sessions. What is stable is
t_PR, which fell on every backend in both measurements, and the cells whose iteration count did not move, which are flat in wall clock in both.
Backends¶
Every sweep here ran on COPT 8.0.1, matching PROVENANCE.txt section 1, with the
pinned barrier regime (presolve off, crossover off, tol 1e-4) that each log’s
[lp-config] banner records.
The HiGHS row of the LP/pricing table is the one figure the argument leans on
that these sweeps did not produce — it comes from results/cg_benchmark.csv. It
is genuinely HiPO and not a silent dual-simplex fallback, which is worth stating
because the [lp-config] banner cannot distinguish the two (it echoes the
requested method). Re-checked directly on this build:
mcfcg_cli data/intermodal/BUS-2632-0.txt.gz --solver highs --formulation tree \
--strategy pricer-heavy --verbose-solver
logs Running HiPO for all 17 LP solves, with no Using dual simplex solver and
no features unavailable line. The benchmark runs themselves were not made with
--verbose-solver, so that banner is absent from their logs.
Appendix: the rejected stale-arc fix¶
The one measurement cited here with no logs behind it, transcribed because the code it justifies is still in the tree and the run directory is not (gh #45). It measured a reverted change, so no log of the shipped build could carry it; reproducing it means re-applying the change below.
A bounded source does not refresh _source_arcs[s], so filter_for_new_caps decides
postponement from that source’s last complete price. _source_bound_fired[s] is
already a sticky “this arc set is stale” flag, so making the filter respect it is
a one-line change:
// in filter_for_new_caps — measured, rejected, NOT in the tree
affected = _source_bound_fired[s] || std::any_of(...);
Collected 2026-08-14 on the section 3 host: intermodal, tree, PricerHeavy,
COPT 8.0.1 GPUMode 0 (copt-cpu), --time-limit 7200, median of 2 reps per arm,
both arms in one session, bounded pricing on in both — the arms differ only
in the line above. Both arms hit all 10 reference optima.
instance |
iters before |
iters after |
t before (s) |
t after (s) |
Δ |
|---|---|---|---|---|---|
BUS-13160-0 |
21 |
19 |
4.8 |
5.3 |
+12% |
BUS-18424-0 |
32 |
34 |
8.6 |
9.7 |
+12% |
BUS-23688-0 |
20 |
27 |
9.6 |
15.5 |
+61% |
BUS-2632-0 |
24 |
18 |
1.6 |
1.3 |
−22% |
BUS-7896-0 |
20 |
24 |
2.9 |
3.4 |
+17% |
SBT-18765-0 |
7 |
7 |
8.6 |
8.1 |
−5% |
SBT-31275-0 |
6 |
6 |
24.6 |
25.6 |
+4% |
SBT-43785-0 |
6 |
6 |
35.9 |
36.4 |
+1% |
SBT-56295-0 |
10 |
10 |
54.9 |
92.2 |
+68% |
SBT-6255-0 |
8 |
10 |
2.2 |
3.2 |
+47% |
total |
153.7 |
200.7 |
+31% |
Rejected. At a 65–77% fire rate nearly every source reads as affected, so the
filter stops filtering: SBT-56295-0 paid +68% at an unchanged iteration
count, which is pure extra pricing and not a trajectory effect. Only the
comments explaining the choice were kept, plus
FeatureTests.BoundedPricingFilterUsesStaleArcsForCutSources, which pins the
shipped behaviour.
Two caveats on the numbers. They are same-session wall clocks and are not comparable to any other sweep in this file. And this run is where intermodal’s near-determinism was first measured across sessions rather than within one: the off arm moved on BUS-18424-0 (42 → 33 iterations at an identical column count) and the on arm on BUS-13160-0 (15,008 → 14,990 columns at 21 iterations). The +31% is far larger than that residual, which is why the rejection stands on 2 reps.