Skip to content

Global Views in PhasorDynamics SystemModel using new Vector#452

Draft
lukelowry wants to merge 2 commits into
developfrom
lukel/perf-sys-dev
Draft

Global Views in PhasorDynamics SystemModel using new Vector#452
lukelowry wants to merge 2 commits into
developfrom
lukel/perf-sys-dev

Conversation

@lukelowry

Copy link
Copy Markdown
Collaborator

Description

This PR updates PhasorDynamics so buses and components use their slices of the SystemModel state vectors directly. This removes the local state copy path and keeps component accessors consistent with the integrator-updated system state.

Partially addresses #96. Related to #145.

Proposed changes

  • Added StateVector support so GridElement can own standalone state or alias SystemModel state.
  • Updated SystemModel allocation to bind each bus/component to global state and verify element sizes remain fixed.
  • Updated Enzyme call sites to use the explicit yData() accessor for live state pointers.
  • Added a PhasorDynamics system test for element/system state aliasing.

Performance was measured with application/PhasorDynamics/PDSim using the app-reported Complete in time. Each row reports the median of 3 trials after rebuilding PDSim on the corresponding branch.

Case develop (s) This branch (s) Improvement
Hawaii 0.201302 0.165187 17.9%
NewEngland 0.272596 0.220406 19.1%
Illinois 0.664262 0.592922 10.7%
WECC 1.203380 1.045540 13.1%
Texas 9.063860 7.515690 17.1%

Checklist

  • All tests pass. (except the known PE failure)
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows GridKit(TM) style guidelines.
  • There are unit tests for the new code.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.
  • N/A: no CHANGELOG.md update is needed for this internal PhasorDynamics state-storage change.

Further comments

This work was motivated by the addition of IEEEST stabilizers: adding 333 stabilizers to the Texas case dramatically reduced performance, and this change removes avoidable state-copy overhead in PhasorDynamics system evaluation.

NOTE: I had to make a new PR but this is revival of #411

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