feat: active-set stepsize boosting - #108
Open
ZedongPeng wants to merge 1 commit into
Open
Conversation
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.
Summary
Late in a solve most variables sit clamped at a bound and most rows are inactive. The operator restricted to the remaining free variables and binding rows has a smaller maximum singular value than the full constraint matrix, so the stepsize can be raised above the global
1/‖A‖bound. This PR adds that boost, enabled by default.src/active_set_boost.cu: tracks which variables stayed clamped and which rows stayed binding over a sliding window ofasb_window_iteriterations. Once the worst relative residual falls belowasb_activation_tol, it estimates the maximum singular value of the masked operator by power iteration and raises the step toasb_safety_factor / sv, provided the increase is at leastasb_min_raise_ratio.(1 + asb_divergence_margin)xits value at the raise, the anchor is restored, the solver restarts and the step is capped. Afterasb_max_revertsreverts the boost turns off for the rest of the solve.--asb_*CLI flags and matching Python parameters, documented inREADME.mdandpython/README.md.--no_active_set_boostdisables it. The result reportsASB Step Raise Count,ASB Revert CountandASB Power Iterations.Also in this PR
sv_estimator_create/_run/_free) instead of a one-shot call, since the boost re-estimates repeatedly and needs to keep its buffers, pass a mask and warm-start.compute_infeasibility_information()usedstate->dual_slackas scratch. That was safe before, but the window kernel reads that vector to tell clamped variables from free ones, so the ray certificate now writes to its owninfeasibility_dual_scratch.cupdlpx_validate_parameters(). The duplicated rules inpython/cupdlpx/model.pyand_core_bindings.cppare removed, andoptimize()calls it too, so the CLI and C API get the full range checks for the first time. Side effects:setParamvalidates the whole set and commits only on success, an unknown key now raises instead of being ignored, and error messages include the offending value.--debugflag (implies verbose) addingprimal_weightand, with the boost on,step_sizeand the free/binding counts to the iteration log.display_iteration_stats(),display_iteration_header()is split out, and the residuals are now computed before the first row so iteration 0 no longer prints0.0e+00.sync_step_sizes_to_gpu()exported for the revert path, three missing HIP mappings, andtest/test_interface.cTest 9 passes theobjective_senseargument that Fix: handle MPS OBJSENSE MAXIMIZE in reader #93 added.