Skip to content

Bus merging logic to ensure correct bus type updates #937

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jbarberia
Copy link
Contributor

Proposed fix for #935 and #936.

This update addresses an issue with the bus merging logic to ensure the resulting bus_type is correctly updated when buses are merged.

When two buses are connected by a switch or a zero-impedance line, the merged bus should have the highest priority bus_type (PQ=1, PV=2, Slack=3)

Changes Introduced

  • Correctly updates the bus_type of the resulting bus to reflect the highest priority among the merged buses.
  • Adds safeguards to prevent assigning invalid bus types (e.g., type 4).

Co-authored-by: Oscar Dowson <odow@users.noreply.github.com>
Copy link
Collaborator

@odow odow left a comment

Choose a reason for hiding this comment

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

Reverting the name change. I addressed it separately in #959

Copy link

codecov bot commented Apr 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.71%. Comparing base (8824212) to head (48b8399).
Report is 10 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #937   +/-   ##
=======================================
  Coverage   93.71%   93.71%           
=======================================
  Files          43       43           
  Lines        9636     9638    +2     
=======================================
+ Hits         9030     9032    +2     
  Misses        606      606           
Files with missing lines Coverage Δ
src/core/data.jl 90.82% <100.00%> (+0.01%) ⬆️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8824212...48b8399. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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