Skip to content

Cloning Components in PowerElectronics Module - #552

Open
abdourahmanbarry wants to merge 10 commits into
abdou/microgrid_refactorfrom
abdou/clone
Open

Cloning Components in PowerElectronics Module#552
abdourahmanbarry wants to merge 10 commits into
abdou/microgrid_refactorfrom
abdou/clone

Conversation

@abdourahmanbarry

Copy link
Copy Markdown
Collaborator

Description

This pull request implements clone functionality for components in the PowerElectronics module. This gives us the ability to create independent copies of components such that modifications to one do not affect the other.

Proposed changes

Each component implements the isCloneable and clone methods. The isCloneable method returns true if the component is cloneable and false otherwise. The clone method returns a pointer to a new object with the same state as the component from which it was cloned. After cloning a component, the user should set the data pointers for the clone.

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.

Further Comments

This functionality is useful for the partitioning implementation.

@abdourahmanbarry abdourahmanbarry self-assigned this Aug 27, 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.

2 participants