Conversation
Introduce Gecode::Optimize owning sparse models, explicit result guarantees, starts, exchange, sessions and reusable optimization workflows. Supply numerical LP/MILP and bounded weighted-square continuous QP through HiGHS, plus an exact native integer bridge retaining supported globals and documented C/Python APIs. Select compatible checked LP, cover cuts and branching automatically. Compose bounded exact presolve, independent components and identical-column symmetry. Restore original witnesses, offsets and proofs under one shared solve budget. Use rolling knapsack value rows and packed traceback with work/memory/time caps. Add opt-in sequential strategy racing in C++, with configurable exploration. Probe automatic and ordinary native search, select from checked incumbents and bounds, and restart under the remaining shared time/node/cancellation budget. Preserve the best probe result. Explicitly document increased CPU/solve-time costs and the possibility of discovering a much better strategy for longer solves. Do not expose the new racing option through MiniZinc yet; add no conflict learning. Validation: complete isolated Release build and 75/75 CTest entries pass; focused racing checks pass without checked LP and without native backends. Exhaustive original-oracle, shared-budget and larger-generator checks pass. Preserve historical observations and add the final three-cohort comparison: original pre-algorithm native runtime, current automatic racing and frozen family presets. Expand to observed failed upper inputs without study ceilings, then refine and confirm sampled brackets. Charge exploration to the same ten seconds and retain all witnesses, outcomes, settings and provenance. State nonmonotonicity, backend-reported optimality and combined-policy attribution.
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.
Add
Gecode::Optimizefor applications that need owning optimization models,explicit result guarantees and reusable solve workflows. Native integer solving
now chooses suitable strengthening automatically. An opt-in race can compare
that policy with ordinary Gecode search before committing the remaining budget.
Existing Gecode modeling, propagation and search interfaces remain available.
Changes
diagnostics, repair, pools, scenarios and documented C/Python bindings.
HiGHS supplies numerical LP/MILP and bounded weighted-square continuous QP;
the native bridge retains its exact integer subset and supported globals.
branching and bounded binary neighborhoods. Structural native selection uses
compatible mechanisms without problem-family labels or reference objectives.
for identical columns. Restore original coordinates and objective offsets;
incomplete component solutions never become full-model incumbents or proofs.
and packed traceback. Separate work, memory and local time caps provide a
fallback to native search, with independently checked original witnesses.
NativeRaceOptionsandsolve_native_racein C++. Two bounded sequentialprobes compare the automatic policy and ordinary BAB. Selection uses validated
incumbents and valid bounds; the chosen strategy restarts under the same global
time, node and cancellation budget. Keep the best original incumbent and bound
even if restarting makes no progress.
Racing is opt-in: the ordinary automatic dispatcher does not silently enable it.
Exploration and restarting can increase total CPU work or solve time. Configurable
trials of several seconds or longer may pay off by finding a much better strategy
for the remaining solve. Early progress is a heuristic, not a speedup guarantee.
The new racing option is not exposed through MiniZinc/FlatZinc yet. No conflict
learning or parallel racing is added.
Validation and measured limits
The complete isolated Release build passes 75/75 CTest entries, including
FAST. Focused racing checks also pass without checked LP and without native
backends. Exhaustive min/max oracle checks cover strategy selection, shared node
limits, retained exact results, starts and interruption. Generator checks preserve
every historical input's JSON and text bytes and independently validate larger
feasible witnesses. Earlier sanitizer validation remains separately documented;
this racing change does not claim a new sanitizer run.
The final benchmark compares the
preserved pre-algorithm Gecode runtime, current automatic racing and frozen
family presets. Ten seconds includes all exploration and restarting. Each
configuration expands until an observed failed upper size, then refines the
bracket to adjacent sizes or approximately 2% for larger inputs. Both repetitions
and every knapsack variant must pass at the reported lower size. All initial
observations remain in the amended, uncapped study.
These are seeded-instance brackets, not mathematical maximum-size guarantees.
Original witnesses are independently checked; large-instance exact optimality is
backend-reported. The same families informed development and preset selection.
The comparison measures combined policies, not an ablation establishing that
racing alone caused the gains. Historical studies remain separate.
General MIQP/QCP/nonlinear optimization and production learning remain outside
scope. Remote platform CI and a rebuild of the older wheel are still pending.
Review base
This draft targets
codex/solver-parity-base(e10562fd9), the preserved pre-project source snapshot. The review branch matches the fullcodex/solver-parityintegration tree in one commit. MiniZinc controls are layered in a separate follow-up PR.