Skip to content

Use qpOASES' own defaults for Configuration - #5

Draft
mmmarinho wants to merge 1 commit into
mainfrom
qpOASES-default-configs
Draft

Use qpOASES' own defaults for Configuration#5
mmmarinho wants to merge 1 commit into
mainfrom
qpOASES-default-configs

Conversation

@mmmarinho

Copy link
Copy Markdown
Contributor

This PR was created by an AI agent (OpenHands) on behalf of @mmmarinho.

Summary

Follow-up to #4. As requested, the solver's Configuration now uses qpOASES' own default parameters, and each example only sets the option it genuinely needs.

Changes

The three Configuration fields that previously deviated from qpOASES' Options::setToDefault() (double-precision) are now set to qpOASES' defaults:

Field Before Now (qpOASES default)
print_level PL_LOW PL_MEDIUM
enableFlippingBounds BT_FALSE BT_TRUE
enableNZCTests BT_FALSE BT_TRUE

enableRegularisation was already BT_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() sets hessian_type = HST_SEMIDEF (its Hessian is rank-deficient, so this is required); the previously-redundant enableRegularisation line and the two commented lines were removed.
  • All other examples (positivedefinite, termination_tolerance, nones, active_set) run on the pure defaults with no configuration.

Verified

  • Rebuilt the wheel and installed it; all five example.py solves converge with identical solutions under the new defaults.
  • example_kinematics.py runs to completion (its per-solve qpOASES output is C-level printf and so isn't captured in-process, but the final plt.show() runs).
  • pyright remains 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.h docstring and the print_level pybind11 docstring updated to PL_MEDIUM.

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>
@mmmarinho mmmarinho self-assigned this Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant