Skip to content

Speed up simplex via pricing rules and leaner phase-1#2

Merged
adelaett merged 1 commit into
mainfrom
simplex-speed-pricing-phase1
Jul 2, 2026
Merged

Speed up simplex via pricing rules and leaner phase-1#2
adelaett merged 1 commit into
mainfrom
simplex-speed-pricing-phase1

Conversation

@adelaett

@adelaett adelaett commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Two algorithmic improvements to the exact fraction-free simplex, both preserving the exact optimal answers on every test instance.

Pricing (solver/tableau.ml, bin/simplex.ml):

  • Add --rule dantzig (most-positive reduced cost) and --rule steepest (steepest-edge approximation, maximising c^2 / ||col||^2 via exact integer cross-multiplication). Both use a Bland index tie-break for anti-cycling.
    Bland stays the default. On the 100x100 instance: bland 3034 pivots/4.7s ->
    dantzig 478/1.3s -> steepest 237/0.37s.

Phase-1 restructure (solver/tableau.ml):

  • Build negative-RHS constraints already in artificial-basic form (negate the row so the artificial has coefficient +1 and RHS >= 0) and repair the phase-1 objective in a single construction pass. This removes the forced setup pivots that previously brought each artificial into the basis one by one (~21% of all pivots; large steepest 237 -> 186). Final answers verified identical across all 61 test problems.

The pricing/phase-1 changes alter pivot sequences (and counts) on problems with artificial variables, so the affected golden .out files are regenerated; only pivot counts change, the solutions and objective values are unchanged.

Investigated but deliberately not pursued (measured, documented in commit history): GCD content removal is a no-op (Edmonds/Bareiss already leaves no removable common content, 1-3 bits out of ~430), and sparse CSC storage loses at the ~45-50% mid-solve density of these instances.

Two algorithmic improvements to the exact fraction-free simplex, both
preserving the exact optimal answers on every test instance.

Pricing (solver/tableau.ml, bin/simplex.ml):
- Add --rule dantzig (most-positive reduced cost) and --rule steepest
  (steepest-edge approximation, maximising c^2 / ||col||^2 via exact integer
  cross-multiplication). Both use a Bland index tie-break for anti-cycling.
  Bland stays the default. On the 100x100 instance: bland 3034 pivots/4.7s ->
  dantzig 478/1.3s -> steepest 237/0.37s.

Phase-1 restructure (solver/tableau.ml):
- Build negative-RHS constraints already in artificial-basic form (negate the
  row so the artificial has coefficient +1 and RHS >= 0) and repair the
  phase-1 objective in a single construction pass. This removes the forced
  setup pivots that previously brought each artificial into the basis one by
  one (~21% of all pivots; large steepest 237 -> 186). Final answers verified
  identical across all 61 test problems.

The pricing/phase-1 changes alter pivot sequences (and counts) on problems
with artificial variables, so the affected golden .out files are regenerated;
only pivot counts change, the solutions and objective values are unchanged.

Investigated but deliberately not pursued (measured, documented in commit
history): GCD content removal is a no-op (Edmonds/Bareiss already leaves no
removable common content, 1-3 bits out of ~430), and sparse CSC storage loses
at the ~45-50% mid-solve density of these instances.
@adelaett adelaett merged commit dfb0df8 into main Jul 2, 2026
12 checks passed
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