|
| 1 | +# Rewrite: Clp-faithful engine core |
| 2 | + |
| 3 | +Goal: reach CBC/Clp wall-clock and pivot-count parity. The existing feature |
| 4 | +ports (reliability branching, DSE `updateWeights`, warm cut re-solves, TwoMir) |
| 5 | +are matched to source and active, but KPI/time parity is blocked: CBC wins |
| 6 | +because its engine is **co-designed** on a reduced model where no vertex is a |
| 7 | +razor edge. Retrofitting single features onto cbcgo's full-size model perturbs |
| 8 | +the fragile 020 optimum (proven: DSE-everywhere, D1, Markowitz LU, warm cut |
| 9 | +re-solves each regress 020 in isolation). |
| 10 | + |
| 11 | +So the parity path is a coordinated core rewrite, not more feature flags. |
| 12 | + |
| 13 | +References (local): `../Clp` (ClpSimplexDual, ClpFactorization, |
| 14 | +ClpDualRowSteepest), `../CoinUtils` (CoinFactorization = Forrest-Tomlin LU), |
| 15 | +`../cbc` (CbcNode, CglPreProcess wiring). |
| 16 | + |
| 17 | +## Components, in dependency order |
| 18 | + |
| 19 | +1. **Forrest-Tomlin factorization** (`CoinFactorization`) — replace cbcgo's |
| 20 | + product-form eta updates with FT (`replaceColumn` / `updateColumnFT`). |
| 21 | + Cheaper, more stable updates; enables sparse two-column FTRAN so the DSE |
| 22 | + `tau` solve is nearly free. This is the per-pivot cost lever. |
| 23 | +2. **Full Markowitz + threshold pivoting** in the LU — sparser kernel, but only |
| 24 | + safe once (1) gives FT stability; on the current engine it perturbs 020. |
| 25 | +3. **`CglPreProcess` model reduction** — coefficient strengthening + forcing/ |
| 26 | + redundant-row removal to the ~1375-row model CBC solves. Requires (4) so the |
| 27 | + reduced model keeps its cut strength. |
| 28 | +4. **Full `Cgl` suite** — Gomory, Probing, Knapsack, Clique, MixedIntegerRound2, |
| 29 | + FlowCover, TwoMir, ZeroHalf run every node (CBC frequency), so the reduced |
| 30 | + model's bound holds. |
| 31 | +5. **`ClpSimplexDual` dual loop** — incremental infeasibility list + partial |
| 32 | + pricing (`numberWanted`), Harris ratio, proper degeneracy/perturbation. |
| 33 | + |
| 34 | +Parity is expected only once 1+3+4 land together (the co-design). Each lands |
| 35 | +behind a measurement gate and is benchmarked against `../optimizer` golden + |
| 36 | +real CBC (`cbc_run.py`) before activation. |
| 37 | + |
| 38 | +## Status |
| 39 | + |
| 40 | +- [x] 1. Forrest-Tomlin factorization — sparse L-col/U-row LU + O(nnz) solves, |
| 41 | + alloc-free pooled `replaceColumn`, WIRED behind `CBC_FT` (clone-safe). |
| 42 | + NUMERICALLY STABLE: trailing-block Bartels-Golub with PARTIAL PIVOTING, |
| 43 | + expressed as a general R-file (interleaved swap + elimination ops), |
| 44 | + property-tested; |mult|<=1. Correct end-to-end on the golden suite. |
| 45 | + TRUE FT: the trailing-block re-triangularization is now sparse Hessenberg |
| 46 | + elimination on the U rows (O(spike + fill), no dense block, no block cap), |
| 47 | + with an `ftFillCap` bail to refactorize on pathological fill. ~10x faster |
| 48 | + per update than the dense block; PuLP suite under `CBC_FT` matches the |
| 49 | + default engine and is no slower. Stays active on large trailing blocks. |
| 50 | +- [~] 2. Sparse factorize — shortest-row + largest-entry pivoting, sparse |
| 51 | + L-columns + U-rows, no dense work matrix, property-tested. Not yet fast: |
| 52 | + needs a singleton pre-pass and bucketed pivot search (currently O(m^2) |
| 53 | + scans), and full Markowitz; not yet faster than the tuned dense path. |
| 54 | +- [ ] 3. CglPreProcess (large subsystem — not started) |
| 55 | +- [x] 4. Cgl generators — 9 of 9: GMI, probing, single-row MIR, TwoMir (active); |
| 56 | + knapsack-cover, clique, zero-half, flow-cover (PVRW), lift-and-project |
| 57 | + (lifted cover cuts) behind CBC_CGL. All sound (soundness-tested + |
| 58 | + golden 13/13 objectives correct with CBC_CGL=1). |
| 59 | +- [~] 5. Dual loop — `dual2.go` DSE dual is built and active via the mixed |
| 60 | + engine (shipped); Clp partial-pricing / infeasibility-list not ported. |
0 commit comments