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

System constructor does not properly initialize bus_numbers #1233

Open
GabrielKS opened this issue Dec 24, 2024 · 0 comments · May be fixed by #1234
Open

System constructor does not properly initialize bus_numbers #1233

GabrielKS opened this issue Dec 24, 2024 · 0 comments · May be fixed by #1234
Assignees

Comments

@GabrielKS
Copy link
Collaborator

GabrielKS commented Dec 24, 2024

MWE:
Screenshot 2024-12-24 at 11 11 01 AM

The culprit is this line in the System inner constructor:

bus_numbers = Set{Int}()

, which initializes a System with an empty set of bus numbers that never gets added to except in handle_component_addition!.

Without objection, I propose to treat this as a bug: whenever we give a System to the user, get_bus_numbers(sys) should always correspond to get_number.(get_components(ACBus, sys)). The fix, changing that line to

bus_numbers = Set(get_number.(IS.get_components(ACBus, data)))

, does not seem to break anything. Without objection, I'll push that fix along with my implementation of #1231.

@GabrielKS GabrielKS self-assigned this Dec 24, 2024
GabrielKS added a commit that referenced this issue Dec 24, 2024
GabrielKS added a commit that referenced this issue Dec 24, 2024
GabrielKS added a commit that referenced this issue Dec 26, 2024
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 a pull request may close this issue.

1 participant