Skip to content

Conversation

nitbharambe
Copy link
Member

@nitbharambe nitbharambe commented Aug 19, 2025

In the large effort of refactoring main model, one part is to move the topology and y bus related construction to a different place.

  • Moved topology logic to main_core/topology.hpp
  • Changed topology's dependency from state to component container.
  • Refactored ComponentConnections construction in similar way as ComponentTopology in 1ab7ee8
  • Moved all small individual topology functions in main_core/topology.hpp to detail namespace.
  • Edited component_container_c to include more container functionality and applicable for 1+ component type. Moved it to power_grid_model::common namespace

Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
@nitbharambe nitbharambe changed the title move construct topology Refactor topology/ybus: move topology related construction Aug 19, 2025
@nitbharambe nitbharambe self-assigned this Aug 19, 2025
@nitbharambe nitbharambe added the improvement Improvement on internal implementation label Aug 19, 2025
@nitbharambe nitbharambe changed the title Refactor topology/ybus: move topology related construction Refactor topology / ybus part of main model: move topology related construction Aug 19, 2025
Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
@Jerry-Jinfeng-Guo Jerry-Jinfeng-Guo changed the title Refactor topology / ybus part of main model: move topology related construction Clean-up main model: move topology / ybus related construction Aug 20, 2025
Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
@nitbharambe
Copy link
Member Author

Need thoughts on 1ab7ee8. Should we keep or revert the commit?

We had earlier decided against it when it was dependent on state and lived in main model. Reason was that this function is small unlike construct_topology. In the context of current PR, we would be homogenizing both these functions.

@mgovers
Copy link
Member

mgovers commented Aug 20, 2025

Need thoughts on 1ab7ee8. Should we keep or revert the commit?

We had earlier decided against it when it was dependent on state and lived in main model. Reason was that this function is small unlike construct_topology. In the context of current PR, we would be homogenizing both these functions.

i kind of like the commit, so IMO you can keep it

Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
@nitbharambe nitbharambe changed the title Clean-up main model: move topology / ybus related construction Clean-up main model: move topology related construction Aug 20, 2025
@nitbharambe
Copy link
Member Author

Limiting this PR's scope. Continuing in new one.

@nitbharambe nitbharambe marked this pull request as ready for review August 20, 2025 13:52
Copy link
Member

@mgovers mgovers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome cleanup. A couple small nitpicks but nothing major

Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
Signed-off-by: Nitish Bharambe <nitish.bharambe@alliander.com>
Copy link

Copy link
Member

@mgovers mgovers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no more remarks from my end. feel free to merge whenever

@nitbharambe nitbharambe added this pull request to the merge queue Aug 26, 2025
Merged via the queue into main with commit 776d3c2 Aug 26, 2025
31 checks passed
@nitbharambe nitbharambe deleted the feture/refactor-topology-main-model branch August 26, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement on internal implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants