Skip to content

feat: report basis dimension alongside LU fill and density - #2007

Merged
rasros merged 1 commit into
mainfrom
lp-basis-size-instrumentation
Sep 14, 2026
Merged

rasros merged 1 commit into
mainfrom
lp-basis-size-instrumentation

Conversation

@rasros

@rasros rasros commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds lpLuMaxDim, the basis dimension at which lpLuMaxDensity was last observed, alongside the existing lpLuMaxFill/lpLuMaxDensity LP stats. Density alone hides whether a dense basis was tiny or large.
  • Threads through RevisedSimplex.maxLuDim -> FloatLpResult.luMaxDim -> ComponentLpSolver -> LpBounding.observeLuFill -> LpStats/LpStatsSink, and is printed by CliStats (-s) the same way the other two already are.
  • Tracked as its own running max (LpStats.luMaxDim), independent of luMaxDensity — a single running max can't also report the dimension at which the density max occurred across a whole search, so size and density are separate signals rather than a pinned pair.

Why

Motivated by #2006: before building a dense-basis LU fallback, we need to know whether the corpus ever produces small-and-still-hard bases (many repeated factorizations, unresolved search) versus large-and-sparse ones. Run over real MIPLIB2017/MiniZinc/XCSP3 samples, this already found the motivating shape (gr4x6: dimension 34, 10,340 solves, unproved) and confirmed large bases stay sparse regardless of difficulty (nag: dimension 5,796, 0.02% density).

Test plan

  • ./gradlew check lintDocs
  • :klause:updateKotlinAbi run to reflect the new public LpStats.luMaxDim field
  • Manually verified via klause-cli -s and klause-bench solve against real MIPLIB2017/mzn-bench/xcsp3-cop samples

@rasros
rasros merged commit 462dc39 into main Sep 14, 2026
3 checks passed
@rasros
rasros deleted the lp-basis-size-instrumentation branch September 14, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant