Skip to content

Change scaling in HiPO#2934

Merged
filikat merged 13 commits intolatestfrom
hipo-norm-scaling
Mar 30, 2026
Merged

Change scaling in HiPO#2934
filikat merged 13 commits intolatestfrom
hipo-norm-scaling

Conversation

@filikat
Copy link
Copy Markdown
Collaborator

@filikat filikat commented Mar 24, 2026

  • Currently, HiPO uses Curtis-Reid scaling to scale the problem before solving it.
    This PR changes the scaling to infinity-norm equilibration of the rows and columns of the matrix. The scaling procedure takes into account also the magnitude of the diagonal of matrix Q and the width of the bounds interval.
    Changing the scaling significantly reduces the number of iterations on some instances, including some of the PyPSA problems, and improves robustness in general.
  • Some small pathological tests on infeasible problems occasionally fail with HiPO, due to numerical inaccuracies. These tests are not very useful, since they are not representative of real problems, and their failure is not symptomatic of an error in a commit, but rather of a random numerical perturbation that pushes the test to fail. They have been removed and substituted with tests on more realistic infeasible instances.
  • Printing of the ranges of A, b, c and bounds has been slightly changed and made less verbose. Dev printing now shows the ranges of inf and one norms of rows and columns of A.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.22%. Comparing base (e3e7bf2) to head (544ac5e).
⚠️ Report is 168 commits behind head on latest.

Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #2934      +/-   ##
==========================================
- Coverage   81.54%   81.22%   -0.33%     
==========================================
  Files         347      358      +11     
  Lines       86942    88576    +1634     
==========================================
+ Hits        70901    71943    +1042     
- Misses      16041    16633     +592     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@filikat filikat marked this pull request as ready for review March 25, 2026 13:32
@filikat filikat requested a review from jajhall March 25, 2026 13:33
Copy link
Copy Markdown
Member

@jajhall jajhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, you're doing ten rounds of scaling, and then moving the factors to the nearest power-of-2. Maybe they should be moved to the nearest power-of-2 after each scaling round, so that convergence is "over the allowable values"

Otherwise, this looks fine

@filikat
Copy link
Copy Markdown
Collaborator Author

filikat commented Mar 30, 2026

I thought about this, but the results are actually a bit worse that way.
My intuition is that by pushing the values to the nearest power of 2 after each iteration, some scaling coefficients may be prevented from reaching a better value that would take many small steps.

@filikat filikat merged commit 4839033 into latest Mar 30, 2026
371 of 372 checks passed
@filikat filikat deleted the hipo-norm-scaling branch March 30, 2026 11:10
@jajhall
Copy link
Copy Markdown
Member

jajhall commented Mar 30, 2026

I thought about this, but the results are actually a bit worse that way.
My intuition is that by pushing the values to the nearest power of 2 after each iteration, some scaling coefficients may be prevented from reaching a better value that would take many small steps.

Fair point

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