Open
Conversation
…ol#206) Add a `warm_start_skip` boolean setting (default false) that skips default variable initialization in `solve()`, enabling warm-starting from a previous solution. When enabled, the solver uses whatever values are in `solver.variables` instead of calling `default_start()`. Internal-form variables are cached into `solver.prev_vars` before post-process unscaling, so users can restore them for a subsequent warm-started solve. - Add `warm_start_skip` to DefaultSettings, FFI settings, and Python bindings - Add `set_warm_start_skip()` convenience method on Solver - Cache pre-unscale variables into `prev_vars` for warm-start restoration - Add integration tests verifying correctness, convergence, and toggle behavior - Update CHANGELOG Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d83c556 to
e2740a9
Compare
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.
Hello!
I noticed that by default it is not possible to do warm start, and since the change was relatively limited I decided to try it out here. Issue #206 is directly related.
The results are relatively good, especially when the previous solution is quite close to the new one. If the new one is far from the old, the internal state is no longer valid and it needs a cold start anyway. This can be managed from the outside of this crate depending on how people use it.
The table below gives an idea of improvements for a
3 * Nproblem. The "perturbation" is to check what happens when the input parameters are slightly different. Note that in general the larger the perturbation, the lower the speedup. This is because I'm doing ~6 iterations in warm startup, seeing that it does not converge or any other issue, then starting all over from cold.The difference between "warm" and "persistent" is that in the latter the solver is constructed once and then
update_q()andupdate_b()are used.It's the first time contributing to this repository, so please let me know if you would like anything done differently! Happy to follow your preferences.