Skip to content

Update NRPF for better memory optimization#1433

Merged
TonyXiang8787 merged 12 commits into
PowerGridModel:mainfrom
akshatowl:fix/nrpf-update
Jun 17, 2026
Merged

Update NRPF for better memory optimization#1433
TonyXiang8787 merged 12 commits into
PowerGridModel:mainfrom
akshatowl:fix/nrpf-update

Conversation

@akshatowl

@akshatowl akshatowl commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

removing the linear allocations and splitting computation into real and imaginary components, attempting to address #1422

@nitbharambe

Copy link
Copy Markdown
Member

Thanks for the contribution @akshatowl ! We shall conduct a review soon. Meanwhile there are some build failures which you can address. I see the DCO action can be resolved as well.

@figueroa1395 figueroa1395 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Additional comments and remarks:

  • Please take a look at the CI and resolve those complains. I believe I mentioned them in the in-code comments , but double check in case I missed anything.
  • CI is complaining about formatting. In order to resolve easily, you can run uv run pre-commit run and this will re-format for you, among other things. Moreover, if you build from source, uv sync and then uv run pre-commit run you will also locally check that the tests pass at the python side; this way you will make sure that your changes in the core make sense throughout the whole pipeline locally.
  • DCO check is failing and I see you attempted to fix it by looking at the commit history. Unfortunately, in order to fix it, you must amend all the previous commits and add a sign-off to those as well; having one commit signed off is not enough. This means you need to force push (danger mode). I can't do this for you but if you need a hand just ping me.

Finally, this looks very good! And the (unit and validation) tests all passed on the first try. Great job and thank you for the contribution!

Don't hesitate to ping us if you need or want a hand. We'll take another look once you have resolved our initial comments.

Signed-off-by: Akshat Pandey <akshatpandeyplus41@gmail.com>
Signed-off-by: Akshat Pandey <akshatpandeyplus41@gmail.com>
I, akshatowl <akshatpandeyplus41@gmail.com>, hereby add my Signed-off-by to this commit: 052f791

Signed-off-by: Akshat Pandey <akshatpandeyplus41@gmail.com>
Signed-off-by: Akshat Pandey <akshatpandeyplus41@gmail.com>
Signed-off-by: Akshat Pandey <akshatpandeyplus41@gmail.com>
Signed-off-by: Akshat Pandey <akshatpandeyplus41@gmail.com>
akshatowl and others added 3 commits June 12, 2026 18:08
Signed-off-by: Akshat Pandey <akshatpandeyplus41@gmail.com>
Signed-off-by: Akshat Pandey <akshatpandeyplus41@gmail.com>
Signed-off-by: Akshat Pandey <akshatpandeyplus41@gmail.com>
@TonyXiang8787

Copy link
Copy Markdown
Member

Hi @akshatowl,

The PR is in good shape. Please fix the last CI build errors. Then we can consider to merge.

Signed-off-by: Akshat Pandey <akshatpandeyplus41@gmail.com>
Signed-off-by: Akshat Pandey <akshatpandeyplus41@gmail.com>

@TonyXiang8787 TonyXiang8787 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @akshatowl,

Thanks again for your great contribution. The PR is ready to go into the merge queue.

@TonyXiang8787 TonyXiang8787 enabled auto-merge June 17, 2026 13:09
@TonyXiang8787 TonyXiang8787 added this pull request to the merge queue Jun 17, 2026
Merged via the queue into PowerGridModel:main with commit 2a0b1ae Jun 17, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement on internal implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[IMPROVEMENT] Memory improvement in Newton Raphson Power Flow: Reuse Jacobian memory

4 participants