bench: add optional CP-SAT reference #22

Merged
mcp merged 1 commits from codex/issue-5-cp-sat-reference into main 2026-07-30 17:41:02 +01:00
Collaborator

Summary

  • add an optional OR-Tools CP-SAT first-solution reference model
  • model NoOverlap2D, exact fill, edge exclusions, and equal-copy ordering
  • validate reports through a dependency-free implementation of the native validation contract
  • report model size, workers, elapsed time, memory, placements, and solver statistics
  • document order-8/order-9 comparisons and keep CP-SAT as a reference only
  • record why DLX is not currently justified

OR-Tools remains outside the native build and default dependency set.

Review

Review strengthened validator parity, subprocess error and model-stability handling, generated-artifact ignores, and the explicit order-9 single-observation limitation. Final review found no outstanding issues.

Testing

  • Release CTest with system Python and no OR-Tools: 9/9 passed
  • optional Python 3.13 / OR-Tools 9.15.6755 reference tests: passed
  • Python compilation checks: passed
  • independent review order-8 CP-SAT solve: valid
  • git diff --check

Results

  • CP-SAT order 8, 8 workers, 3 valid runs: 2.080 s median (2.019–3.046 s), 220–232 MB peak RSS
  • native order 8, 1 worker: 1.854 s median
  • CP-SAT order 9, 8 workers, one valid run: 54.623 s, 364 MB peak RSS
  • native order 9: 1.846 s predecessor-search median plus 0.250 us construction

Closes #5

## Summary - add an optional OR-Tools CP-SAT first-solution reference model - model `NoOverlap2D`, exact fill, edge exclusions, and equal-copy ordering - validate reports through a dependency-free implementation of the native validation contract - report model size, workers, elapsed time, memory, placements, and solver statistics - document order-8/order-9 comparisons and keep CP-SAT as a reference only - record why DLX is not currently justified OR-Tools remains outside the native build and default dependency set. ## Review Review strengthened validator parity, subprocess error and model-stability handling, generated-artifact ignores, and the explicit order-9 single-observation limitation. Final review found no outstanding issues. ## Testing - Release CTest with system Python and no OR-Tools: 9/9 passed - optional Python 3.13 / OR-Tools 9.15.6755 reference tests: passed - Python compilation checks: passed - independent review order-8 CP-SAT solve: valid - `git diff --check` ## Results - CP-SAT order 8, 8 workers, 3 valid runs: 2.080 s median (2.019–3.046 s), 220–232 MB peak RSS - native order 8, 1 worker: 1.854 s median - CP-SAT order 9, 8 workers, one valid run: 54.623 s, 364 MB peak RSS - native order 9: 1.846 s predecessor-search median plus 0.250 us construction Closes #5
mcp added 1 commit 2026-07-30 17:40:46 +01:00
Provide a separately installed OR-Tools model to compare a generic constraint solver with the native first-solution path without adding a production or default-test dependency.

Use no-overlap, exact-fill, edge and equal-copy symmetry constraints, validate placements independently, and record model size, memory, worker count and timings for orders 8 and 9. Keep the tool only as a reference and defer DLX absent new evidence.

Tests: Release CTest (9 passed)

Tests: Python reference tests and compilation checks

Tests: independently validated CP-SAT orders 8 and 9

Refs: #5
mcp merged commit 0a7ce1e49e into main 2026-07-30 17:41:02 +01:00
mcp deleted branch codex/issue-5-cp-sat-reference 2026-07-30 17:41:02 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mgrettondann/partridge-cpp#22