def test_case6_data(self):
    net = pn.case6ww()
    self.converter.set_sn_mva(net.sn_mva)
    self.converter.set_f_hz(net.f_hz)
    (line_r, line_x, line_h) = self.converter.get_line_param((net.line['r_ohm_per_km'].values * net.line['length_km'].values), (net.line['x_ohm_per_km'].values * net.line['length_km'].values), (net.line['c_nf_per_km'].values * net.line['length_km'].values), (net.line['g_us_per_km'].values * net.line['length_km'].values), net.bus.loc[net.line['from_bus']]['vn_kv'], net.bus.loc[net.line['to_bus']]['vn_kv'])
    res_r = np.array([0.001, 0.0005, 0.001, 0.0008, 0.0005, 0.0005, 0.001, 0.0007, 0.0012, 0.0002, 0.002])
    res_x = np.array([0.002, 0.002, 0.003, 0.003, 0.0025, 0.001, 0.003, 0.002, 0.0026, 0.001, 0.004])
    res_h = np.array([(4.0 + 0j), (4.0 + 0j), (6.0 + 0j), (6.0 + 0j), (6.0 + 0j), (2.0 + 0j), (4.0 + 0j), (5.0 + 0j), (5.0 + 0j), (2.0 + 0j), (8.0 + 0j)])
    self.assert_equal(line_r, res_r)
    self.assert_equal(line_x, res_x)
    self.assert_equal(line_h, res_h)
def test_case6_data(self):
    net = pn.case6ww()
    self.converter.set_sn_mva(net.sn_mva)
    self.converter.set_f_hz(net.f_hz)
    (line_r, line_x, line_h) = self.converter.get_line_param((net.line['r_ohm_per_km'].values * net.line['length_km'].values), (net.line['x_ohm_per_km'].values * net.line['length_km'].values), (net.line['c_nf_per_km'].values * net.line['length_km'].values), (net.line['g_us_per_km'].values * net.line['length_km'].values), net.bus.loc[net.line['from_bus']]['vn_kv'], net.bus.loc[net.line['to_bus']]['vn_kv'])
    res_r = np.array([0.001, 0.0005, 0.001, 0.0008, 0.0005, 0.0005, 0.001, 0.0007, 0.0012, 0.0002, 0.002])
    res_x = np.array([0.002, 0.002, 0.003, 0.003, 0.0025, 0.001, 0.003, 0.002, 0.0026, 0.001, 0.004])
    res_h = np.array([(4.0 + 0j), (4.0 + 0j), (6.0 + 0j), (6.0 + 0j), (6.0 + 0j), (2.0 + 0j), (4.0 + 0j), (5.0 + 0j), (5.0 + 0j), (2.0 + 0j), (8.0 + 0j)])
    self.assert_equal(line_r, res_r)
    self.assert_equal(line_x, res_x)
    self.assert_equal(line_h, res_h)