Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setStringParameter and expose initial_guess parameter in proxqp #15

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

traversaro
Copy link
Contributor

Fix #14 .

The setStringParameter was added to the interface, and implemented in the proxqp plugin to expose the initial_guess parameter. As that parameter is an Enum in the proxqp settings, to expose it easily with the solver-agnostic interface we expose it as a string parameter.

As adding a new method in the interface breaks any plugin not maintained in this repo, it is a breaking change and so we bump the minor version to 0.1.0 (see https://github.com/ami-iit/qpsolvers-eigen?tab=readme-ov-file#versioning-policy).

@traversaro
Copy link
Contributor Author

traversaro commented Nov 12, 2024

As a first super non-scientific test, on Windows there is a ~10x speedup in the MPCUpdateMatricesTest (i.e. ctest -VV -R MPCUpdateMatricesTest) by setting the initial_guess setting to WARM_START_WITH_PREVIOUS_RESULT instead of the default, see:

Before setting initial_guess to WARM_START_WITH_PREVIOUS_RESULT:

4: [     cout ] Testing solver osqp
4: [     cout ] Average time = 0.00024 seconds.
4: [     cout ] Testing solver proxqp
4: QpSolversEigen::ProxqpSolver::setStringParameter: unknown value << THIS_IS_NOT_A_VALID_INITIAL_GUESS_VALUE for parameter with name: initial_guess
4: QpSolversEigen::ProxqpSolver::setStringParameter: unknown setting name: this_is_not_a_valid_proqp_parameter_name
4: [     cout ] Average time = 0.00202 seconds.

After setting initial_guess to WARM_START_WITH_PREVIOUS_RESULT:

4: [     cout ] Testing solver osqp
4: [     cout ] Average time = 0.00022 seconds.
4: [     cout ] Testing solver proxqp
4: QpSolversEigen::ProxqpSolver::setStringParameter: unknown value << THIS_IS_NOT_A_VALID_INITIAL_GUESS_VALUE for parameter with name: initial_guess
4: QpSolversEigen::ProxqpSolver::setStringParameter: unknown setting name: this_is_not_a_valid_proqp_parameter_name
4: [     cout ] Average time = 0.00028 seconds.

@traversaro traversaro merged commit 8c1b68c into main Nov 12, 2024
3 checks passed
@traversaro traversaro deleted the exposeinitialguessproxqp branch November 20, 2024 07:41
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.

Expose initial_guess option in proxqp
2 participants