Skip to content

Fix GCC solution loss during recomputation#226

Merged
zayenz merged 2 commits into
mainfrom
feature/gcc-recomputation-fix
Jul 13, 2026
Merged

Fix GCC solution loss during recomputation#226
zayenz merged 2 commits into
mainfrom
feature/gcc-recomputation-fix

Conversation

@zayenz

@zayenz zayenz commented Jul 13, 2026

Copy link
Copy Markdown
Member

Domain-level global cardinality propagation could lose solutions in two related matching-state paths.

First, assigned variables were counted in both the upper- and lower-bound narrowing passes when recomputation replayed several choices before propagation. Second, when a variable cardinality maximum shrank by more than the number of currently matched edges, the propagator retained an impossible conflict count. That stale conflict mark could remove supported value edges.

Count assigned variables only in the upper-bound pass, and cap conflict bookkeeping by the number of genuinely matched edges (excluding already-counted assigned occurrences). This retains the existing rematching strength without leaving stale conflicts.

The FlatZinc regression now covers both the original deterministic issue model (26 solutions, including a formerly missing assignment) and the minimized random-search model (11 solutions, including its formerly missing assignment).

Verified with:

  • both focused FlatZinc regressions;
  • the original model at recomputation distances 1, 2, 4, 8, and 16;
  • the minimized model across those five distances and seeds 0 through 9;
  • all 24 integer GCC test families at five randomized iterations;
  • the exact variable-cardinality domain-propagation seed used to check fixpoint equivalence after cloning.

Closes #166.

@zayenz zayenz force-pushed the feature/gcc-recomputation-fix branch from 8582771 to 5bc62fb Compare July 13, 2026 14:31
@zayenz zayenz force-pushed the feature/gcc-recomputation-fix branch from 5bc62fb to b5c2782 Compare July 13, 2026 14:56
@zayenz zayenz marked this pull request as ready for review July 13, 2026 21:18
@zayenz zayenz merged commit 372c660 into main Jul 13, 2026
14 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