Commit 881213b1 authored by admin-mpa's avatar admin-mpa
Browse files

Correction of Ymatrix with system.Ymatrix in power flow code

parent a0b978e6
......@@ -40,14 +40,14 @@ def solve(system):
H[m][i] = 1
H[m + 1][i2] = 1
elif node_type is BusType.PQ:
H[m][:node.num] = np.real(Ymatrix[i])
H[m][node.num:] = - np.imag(Ymatrix[i])
H[m+1][:node.num] = np.imag(Ymatrix[i])
H[m+1][node.num:] = np.real(Ymatrix[i])
H[m][:node.num] = np.real(system.Ymatrix[i])
H[m][node.num:] = - np.imag(system.Ymatrix[i])
H[m+1][:node.num] = np.imag(system.Ymatrix[i])
H[m+1][node.num:] = np.real(system.Ymatrix[i])
elif node_type is BusType.PV:
z[m + 1] = np.real(node.power)
H[m][:node.num] = np.real(Ymatrix[i])
H[m][node.num:] = - np.imag(Ymatrix[i])
H[m][:node.num] = np.real(system.Ymatrix[i])
H[m][node.num:] = - np.imag(system.Ymatrix[i])
epsilon = 10 ** (-10)
#epsilon = 0.01
......
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