Commit 561b21ec authored by Martin Alonso Moraga's avatar Martin Alonso Moraga
Browse files

fixed errors

parent 972d2a0b
......@@ -26,7 +26,7 @@ class Branch():
self.start_node = start_node
self.end_node = end_node
self.z = self.r + 1j*self.x
self.y = 1/self.z if (self.z != 0) else 0
self.y = 1/self.z if (self.z != 0) else float("inf")
class System():
def __init__(self):
......
......@@ -3,7 +3,8 @@ import math
import matplotlib.pyplot as plt
from acs.state_estimation import *
from acs.state_estimation import Power_flow
#from acs.state_estimation import Power_flow
# scenario data
import py_95bus_network_data
import py_95bus_meas_data
......@@ -51,7 +52,7 @@ slackV = 1.02
Base = PerUnit(S,V)
branch, node = py_95bus_network_data.Network_95_nodes(Base, slackV)
Vtrue, Itrue, Iinjtrue, S1true, S2true, Sinjtrue, num_iter = bc_powerflow.BC_power_flow(branch, node)
Vtrue, Itrue, Iinjtrue, S1true, S2true, Sinjtrue, num_iter = bc_powerflow.solve(branch, node)
""" Write here the indexes of the nodes/branches where the measurements are"""
V_idx = np.array([1,11,55])
......
Supports Markdown
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