Use qpOASES' own defaults for Configuration - #5
Draft
mmmarinho wants to merge 1 commit into
Draft
Conversation
Set the remaining non-default `Configuration` fields to qpOASES'
`Options::setToDefault()` values (double precision):
- `print_level`: PL_LOW -> PL_MEDIUM
- `enableFlippingBounds`: BT_FALSE -> BT_TRUE
- `enableNZCTests`: BT_FALSE -> BT_TRUE
(`enableRegularisation` was already BT_FALSE, which is qpOASES' default.)
Examples now set only the options they genuinely need: `example.py`'s
`semidefinite()` sets `hessian_type = HST_SEMIDEF` (its Hessian is
rank-deficient); all other examples run on the pure defaults. All five
example solves and `example_kinematics` still converge with identical
solutions.
Docs updated to state that defaults match qpOASES' own defaults:
- `README.md` configuration reference and defaults table.
- `AGENTS.md` conventions ("Defaults match qpOASES").
- header docstring and the `print_level` pybind11 docstring.
Co-authored-by: openhands <openhands@all-hands.dev>
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.
This PR was created by an AI agent (OpenHands) on behalf of @mmmarinho.
Summary
Follow-up to #4. As requested, the solver's
Configurationnow uses qpOASES' own default parameters, and each example only sets the option it genuinely needs.Changes
The three
Configurationfields that previously deviated from qpOASES'Options::setToDefault()(double-precision) are now set to qpOASES' defaults:print_levelPL_LOWPL_MEDIUMenableFlippingBoundsBT_FALSEBT_TRUEenableNZCTestsBT_FALSEBT_TRUEenableRegularisationwas alreadyBT_FALSE, which is qpOASES' own default, so it is unchanged.Examples
Each example now sets only the parameters it needs to work:
example.py:semidefinite()setshessian_type = HST_SEMIDEF(its Hessian is rank-deficient, so this is required); the previously-redundantenableRegularisationline and the two commented lines were removed.positivedefinite,termination_tolerance,nones,active_set) run on the pure defaults with no configuration.Verified
example.pysolves converge with identical solutions under the new defaults.example_kinematics.pyruns to completion (its per-solve qpOASES output is C-levelprintfand so isn't captured in-process, but the finalplt.show()runs).pyrightremains clean: 0 errors / 0 warnings.Documentation
README.md: configuration reference and defaults table now reflect the qpOASES defaults (removed the "deliberate exceptions" wording).AGENTS.md: conventions now state "Defaults match qpOASES" — non-default options are set in the caller, not baked into the wrapper.include/qpOASES_solver.hdocstring and theprint_levelpybind11 docstring updated toPL_MEDIUM.