def test_case6_data(self):
     net = pn.case6ww()
     self.converter.set_sn_mva(
         net.sn_mva)  # TODO raise an error if not set !
     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.j, 4. + 0.j, 6. + 0.j, 6. + 0.j, 6. + 0.j, 2. + 0.j,
         4. + 0.j, 5. + 0.j, 5. + 0.j, 2. + 0.j, 8. + 0.j
     ])
     self.assert_equal(line_r, res_r)
     self.assert_equal(line_x, res_x)
     self.assert_equal(line_h, res_h)
def test_case6ww():
    net = pn.case6ww()
    assert net.converged
    pp.runpp(net, trafo_model='pi')
    assert len(net.bus) == 6
    assert len(net.line) + len(net.trafo) == 11
    assert len(net.ext_grid) + len(net.gen) + len(net.sgen) == 3
    assert net.converged
Beispiel #3
0
def test_case6ww():
    net = pn.case6ww()
    assert net.converged
    _ppc_element_test(net, 6, 11, 3, True)
Beispiel #4
0
# grid2 = pn.case39()

# grid1 = pn.case6515rte()
# grid2 = pn.case6515rte()

# grid1 = pn.case9241pegase()
# grid2 = pn.case9241pegase()
# grid1 = pn.case1888rte()
# grid2 = pn.case1888rte()

# without trafo, ordering issue nor shunt, no parrallel line
grid1 = pn.case5()
grid2 = pn.case5()

# without trafo, ordering issue, nor shunt, no parrallel line
grid1 = pn.case6ww()
grid2 = pn.case6ww()

# # without trafo, but ordering issue and shunt, no parrallel line
grid1 = pn.case30()
grid2 = pn.case30()

# # with trafo, ordering issue, and shunt, no parrallel line
grid1 = pn.case14()
grid2 = pn.case14()

# # with trafo, ordering issue, and shunt, with parrallel line
grid1 = pn.case118()
grid2 = pn.case118()

nb_iteration = 1  # number of powerflow run