Skip to content

Commit

Permalink
Rename Bus.short_circuit to add_short_circuit (#103)
Browse files Browse the repository at this point in the history
This is done to differentiate between the method that adds a short
circuit and the property `short_circuits` that returns a list of short
circuits

Also made `Bus.short_circuits` return a copy so that users do not modify
it directly.
  • Loading branch information
alihamdan authored Jul 27, 2023
1 parent a61ed85 commit 1b6e887
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 556 deletions.
2 changes: 1 addition & 1 deletion doc/models/Bus.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ vs = VoltageSource(id="source", bus=bus1, voltages=voltages)
pref = PotentialRef(id="pref", element=bus1, phase="n")

# Create a short circuit on bus2 between phases "a" and "b"
bus2.short_circuit("a", "b")
bus2.add_short_circuit("a", "b")

# Create a network and solve a load flow
en = ElectricalNetwork.from_element(bus1)
Expand Down
Loading

0 comments on commit 1b6e887

Please sign in to comment.