Skip to content

Add staged inter-distance propagation with variable separation - #247

Merged
zayenz merged 13 commits into
mainfrom
feature/inter-distance
Oct 13, 2026
Merged

zayenz merged 13 commits into
mainfrom
feature/inter-distance

Conversation

@zayenz

@zayenz zayenz commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Add inter-distance constraints enforcing |x[i] - x[j]| >= p for a constant or variable separation.

IPL_BASIC uses an O(n log n), linear-space feasibility algorithm and tightens a variable separation's upper bound. Other propagation levels add staged quadratic bounds(Z) filtering. Separation one uses the existing bounds-consistent distinct propagator; domains with holes use interval supports.

The implementation follows Garey et al., Quimper et al., and the variable-distance extension.

Use the standard Gecode integer test harness for assignment, search, cloning, and consistency checks. Larger tests alternate arbitrary assignments with valid separated values constructed in sorted order with bounded total slack, then shuffled. Small hole, residue, and limit examples exhaustively enumerate their individual domains. Posting exception checks use the existing test space; no custom model remains.

Based on main after #249 merged. #253 remains stacked on this PR.

Validation: Release build passed; all 74 inter-distance tests passed with five iterations. The updated #253 stack also passed the combined selection of these tests and 12 fixed-base power tests. Whitespace checks passed.

@zayenz
zayenz marked this pull request as ready for review October 4, 2026 11:48

@zayenz zayenz left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Combined filter preparation and pruning. The sole caller no longer has to perform a separate initialization step.
  • Documented the dual links encoding and the adjustment cursor owned by each live bound-group representative.

@zayenz
zayenz force-pushed the feature/inter-distance branch 2 times, most recently from 6f15b91 to b83ab14 Compare October 9, 2026 13:51
@zayenz
zayenz changed the base branch from main to feature/min-distance October 9, 2026 13:51
@zayenz
zayenz added this pull request to stack #254 October 10, 2026 18:20
Base automatically changed from feature/min-distance to main October 12, 2026 16:22
@zayenz
zayenz force-pushed the feature/inter-distance branch from a0c39e8 to aa53003 Compare October 12, 2026 16:22
@zayenz
zayenz merged commit 456e96d into main Oct 13, 2026
14 checks passed
@zayenz
zayenz deleted the feature/inter-distance branch October 13, 2026 21:18
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