Skip to content

fix(simplex): support zero objectives after phase one - #18

Merged
rasheedja merged 3 commits into
masterfrom
fix/zero-objective
Oct 4, 2026
Merged

rasheedja merged 3 commits into
masterfrom
fix/zero-objective

Conversation

@rasheedja

Copy link
Copy Markdown
Owner

Summary

  • Fix empty Max and Min objectives after phase one introduces artificial variables. For example, optimizing a zero objective subject to x >= 1 previously raised the empty-list exception in foldVarLitMap.
  • Use Data.Map.unionsWith (+) to sum coefficient maps with the empty map as the zero expression. Replace the related custom two-map merge with Data.Map.unionWith (+), using the existing dependency.
  • Add solver regressions that check the zero optimum and feasibility of the returned assignment, and update the empty-fold unit test.

This PR targets master and has no dependency on the other review fixes.

Validation

  • Both new solver regressions failed before the fix.
  • stack test --no-terminal: 273 examples, 0 failures.
  • cabal check: no errors or warnings.
  • Fourmolu 0.15.0.0 check of all tracked Haskell files passed.
  • stack haddock --no-haddock-deps and git diff --check passed.

@rasheedja
rasheedja merged commit 590c40f into master Oct 4, 2026
23 checks passed
@rasheedja
rasheedja deleted the fix/zero-objective branch October 4, 2026 10:38
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