You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Using subsystems capability to export a sub set of the data
The text was updated successfully, but these errors were encountered: