Repository navigation
Conversation
zayenz
added this pull request to stack #254
October 10, 2026 18:20
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several MiniZinc relations use decompositions even though Gecode has matching propagators. This PR connects them through the standard solver hooks and exposes the remaining Gecode-specific constraints through
gecode.mznoverloads and typed FlatZinc declarations.Standard syntax selects native propagators for count inequalities, conditionals, n-ary integer products, nondeterministic regular constraints, optional scheduling, and extrema. Gecode-specific predicates cover task types, successor paths, singleton set comparisons, reified products, and minimum distance from a distance matrix. Annotations select basic, advanced, or combined algorithms and single or pairwise minimum-distance propagators.
Fixed-base float power and inverse logarithm use explicitly rounded MPFR bounds to preserve exact solutions. The implementation handles base-one powers and shared variables. Divmod result bounds reach FlatZinc before dependent linear constraints are posted. Compiler rounding flags match the parent branch.
Predicate documentation describes the relations, index conventions, empty inputs, and caller-supplied scheduling equalities. The new MiniZinc declarations and predicates use Zincite formatting, with manual corrections for multiline bodies and assertion chains. Gecode set ordering is documented explicitly. General variable-base/variable-exponent float power remains unsupported.
GitHub stack #254: #249 → #247 → #253. This PR is based on #247 (
feature/inter-distance).Validation:
fzn-gecodeandgecode-test.The Challenge measurements below preceded restoration of the parent compiler flags and the local MPFR correction. They do not isolate those changes or establish performance of the final float implementation.
MiniZinc Challenge validation (corpus
a8448864fc56162583f24aaf9c25653d93f83765, MiniZinc 2.10.1):Compiled 350 of 363 distinct model/include groups against both parent and PR libraries after recorded historical compatibility repairs. The remaining 13 have missing inputs or old source incompatibilities; none fails only on the PR.
Tested one structurally small official instance for each of 48 models whose flattened constraints select modified routes, plus five conservative controls, using a five-second search limit. No automatic-route solver errors or invalid final assignments were observed. Some cases reach the time limit without an incumbent.
Eight models received three paired follow-up runs with a ten-second search limit and six solver threads. Median completed solve times improved for compression (4.427 to 4.000 s), valve-network (5.703 to 5.178 s), and 2014 liner fm3_11 (4.455 to 4.093 s). 2019 liner fm3_3 increased from 2.645 to 2.917 s, with overlapping ranges. All completed pairs proved the same optimum. These small, parallel samples do not establish a general speedup.
Tested six explicit native formulations: nvalues in physician scheduling, steel-mill slabs and peaceable queens; set at-most-one in Steiner systems; set-target count in Unison; joint divmod in rotating workforce. They exposed the divmod bound issue, now fixed; all six original/native workforce follow-up runs returned checked solutions. No clear formulation speedup was established, and steel-mill nvalues produced worse incumbents.
The divmod MiniZinc facade also passed exhaustive checking of all 66 signed dividend/divisor tuples in the selected small domains. Final assignments were pinned as equality constraints in fresh compilations of the original models, preserving declared domains and ub/lb semantics.
Formatting: all 27 edited MiniZinc files parse with Zincite and preserve comments and code tokens (apart from optional trailing commas). Documentation generation, 55 automatic-route cases, 35 native API cases, and 91 current facade cases passed. The 67 obsolete cases in an earlier scratch suite produce the same compile errors before formatting.