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

Quadratic solve structure #511

Merged
merged 20 commits into from
Oct 24, 2024

Conversation

matbesancon
Copy link
Member

No description provided.

Copy link

codecov bot commented Oct 14, 2024

Codecov Report

Attention: Patch coverage is 60.73059% with 86 lines in your changes missing coverage. Please review.

Please upload report for BASE (BPCG-with-direct-solve@cb40f20). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/active_set_sparsifier.jl 0.00% 42 Missing ⚠️
src/active_set_quadratic_direct_solve.jl 76.80% 29 Missing ⚠️
src/utils.jl 73.91% 12 Missing ⚠️
src/active_set_quadratic.jl 50.00% 3 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                    @@
##             BPCG-with-direct-solve     #511   +/-   ##
=========================================================
  Coverage                          ?   78.90%           
=========================================================
  Files                             ?       24           
  Lines                             ?     3598           
  Branches                          ?        0           
=========================================================
  Hits                              ?     2839           
  Misses                            ?      759           
  Partials                          ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matbesancon
Copy link
Member Author

image
Almost everything is working except the interplay with ActiveSetQuadratic, which can be very brittle in some cases.
I'd suspect the deletion of elements of the active set but cannot confirm. Will investigate with @sebastiendesignolle

@sebastiendesignolle
Copy link
Collaborator

The problem was not really in the deletion (although I fixed things there as well as the indices to be deleted should be passed to the generic function in active_set.jl which assumes the Vector{Int} to be sorted), but setting the new weights afterwards. When doing so, the field weights_prev should be updated and all entries of modified set to true so that the different stored scalar products are updated properly in the next call of argminmax. I've created a function update_weights! to do this automatically depending on the active set used.

@matbesancon matbesancon merged commit 8815185 into BPCG-with-direct-solve Oct 24, 2024
12 checks passed
@matbesancon matbesancon deleted the quadratic-solve-structure branch October 24, 2024 20:30
matbesancon added a commit that referenced this pull request Oct 25, 2024
* added direct solve feature BPCG via LP solver

* adjusted for arbitrary LP solver

* fixed deps

* cleanup and comment

* minor

* added reporting of direct solve step

* chose highs as standard solver

* added sparsification

* added sparsification code

* cleanup

* minor cleanup

* minor

* added generalized direct_solve

* clean up, docu, additional direct_solve

* docstrings fixed?

* sparsifier active set (#508)

* sparsifier active set

* fix typo

* added sparsifying tests

* generic tolerane

* remove sparsification

* format

* HiGHS dep

* Quadratic solve structure (#511)

* sparsifier active set

* start working on LP AS

* first working quadratic

* remove quadratic LP from current

* cleanup

* HiGHS in test deps

* working reworked LP quadratic

* working version generic quadratic

* slow version generic quadratic

* faster term manipulation

* copy sufficient

* remove comment

* added test for quadratic

* minor

* simplify example

* clean up code, verify error with ASQuad

* Add update_weights! to fix direct solve with active_set_quadratic

* remove direct solve from BPCG

* rng changed

---------

Co-authored-by: Sébastien Designolle <[email protected]>

* update example

* format

* clean up example

* fix callback

---------

Co-authored-by: Mathieu Besançon <[email protected]>
Co-authored-by: Sébastien Designolle <[email protected]>
dhendryc pushed a commit that referenced this pull request Jan 17, 2025
* added direct solve feature BPCG via LP solver

* adjusted for arbitrary LP solver

* fixed deps

* cleanup and comment

* minor

* added reporting of direct solve step

* chose highs as standard solver

* added sparsification

* added sparsification code

* cleanup

* minor cleanup

* minor

* added generalized direct_solve

* clean up, docu, additional direct_solve

* docstrings fixed?

* sparsifier active set (#508)

* sparsifier active set

* fix typo

* added sparsifying tests

* generic tolerane

* remove sparsification

* format

* HiGHS dep

* Quadratic solve structure (#511)

* sparsifier active set

* start working on LP AS

* first working quadratic

* remove quadratic LP from current

* cleanup

* HiGHS in test deps

* working reworked LP quadratic

* working version generic quadratic

* slow version generic quadratic

* faster term manipulation

* copy sufficient

* remove comment

* added test for quadratic

* minor

* simplify example

* clean up code, verify error with ASQuad

* Add update_weights! to fix direct solve with active_set_quadratic

* remove direct solve from BPCG

* rng changed

---------

Co-authored-by: Sébastien Designolle <[email protected]>

* update example

* format

* clean up example

* fix callback

---------

Co-authored-by: Mathieu Besançon <[email protected]>
Co-authored-by: Sébastien Designolle <[email protected]>
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.

2 participants