Skip to content

Refactor Microgrid Examples to Facilitate Code Reuse - #551

Open
abdourahmanbarry wants to merge 2 commits into
developfrom
abdou/microgrid_refactor
Open

Refactor Microgrid Examples to Facilitate Code Reuse#551
abdourahmanbarry wants to merge 2 commits into
developfrom
abdou/microgrid_refactor

Conversation

@abdourahmanbarry

@abdourahmanbarry abdourahmanbarry commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Description

In this pull request, we separated the construction of the microgrid network from the examples to improve code reuse.

This is the first of four stacked pull requests that split PR #492 into smaller, more manageable chunks.

Proposed changes

Two functions, buildScaleMicrogridNetwork and assembleSystem, were introduced to build the microgrid network and add the components of the network to SystemPowerElectronicsModel, respectively. These functions are then used to replace the network construction and the system model assembly code in all examples. This helps facilitate code reuse as more examples rely on this model.

Checklist

  • All tests pass.
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows GridKit™ 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.
  • The CHANGELOG.md has been updated to reflect the changes. If this is a minor PR that is part of a larger fix already included in the file, state so.

@abdourahmanbarry abdourahmanbarry self-assigned this Aug 26, 2026
@abdourahmanbarry abdourahmanbarry changed the title Abdou/microgrid refactor Refactor Microgrid Examples to Facilitate Code Reuse Aug 26, 2026
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