Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support export of subsystem to a new system #1086

Closed
jd-lara opened this issue Apr 1, 2024 · 1 comment
Closed

Support export of subsystem to a new system #1086

jd-lara opened this issue Apr 1, 2024 · 1 comment
Assignees

Comments

@jd-lara
Copy link
Member

jd-lara commented Apr 1, 2024

Using subsystems capability to export a sub set of the data

@daniel-thom
Copy link
Contributor

I want to rely on deepcopy + JSON serialization/de-serialization to solve this problem. It is not optimal performance-wise, but is far and away the simplest and least error-prone way of providing and maintaining this feature.

The result of deepcopy(sys) is a new system and components with identical UUIDs as the original. Is that the desired outcome for this feature? I can see it both ways. It could be confusing if someone has the two systems in memory at the same time. It wouldn't be hard to assign new UUIDs. We could also provide a flag to control it.

If we wanted to make the fastest possible implementation, we would need to create a copy_component function. It would need to perform a deepcopy with proper handling of shared references to system-owned objects. That feature may be beneficial by itself. I would be open to going that route instead, but it would take more time. There is other complexity as well. We would have to copy/add components to the new system in the correct order or otherwise implement handling of situations with composed components. That could introduce complexity in future maintenance.

daniel-thom added a commit to daniel-thom/PowerSystems.jl that referenced this issue Apr 10, 2024
daniel-thom added a commit to daniel-thom/PowerSystems.jl that referenced this issue Apr 10, 2024
@github-project-automation github-project-automation bot moved this to Done in v4 Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants