Commit d1ea0011 authored by admin-mpa's avatar admin-mpa
Browse files

Removed calculation of Adjacencies for the grid

parent 720b7f6a
......@@ -95,7 +95,6 @@ class System():
self.branches = []
self.breakers = []
self.Ymatrix = np.zeros([], dtype=np.complex)
self.Adjacencies = np.array([])
def get_node_by_uuid(self, node_uuid):
for node in self.nodes:
......@@ -336,7 +335,6 @@ class System():
nodes_num = self.get_nodes_num()
self.Ymatrix = np.zeros((nodes_num, nodes_num), dtype=np.complex)
self.Bmatrix = np.zeros((nodes_num, nodes_num), dtype=np.complex)
self.Adjacencies = [[] for _ in range(nodes_num)]
for branch in self.branches:
fr = branch.start_node.index
to = branch.end_node.index
......@@ -346,8 +344,6 @@ class System():
self.Ymatrix[to][to] += branch.y_pu # + branch.b_pu
# self.Bmatrix[fr][to] += branch.b_pu
# self.Bmatrix[to][fr] += branch.b_pu
self.Adjacencies[fr].append(to + 1) # to + 1??? To be checked
self.Adjacencies[to].append(fr + 1) # fr + 1??? To be checked
#Testing functions
def print_nodes_names(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment