Exemplo n.º 1
0
def test_kerber_dorfnetz_error_default_trafo_other_voltage_lvl():
    try:
        pn.create_kerber_dorfnetz(p_load_in_kw=2., q_load_in_kvar=1., v_os=20.)
        warning1 = False
    except UserWarning:
        warning1 = True
    assert not warning1
Exemplo n.º 2
0
def test_create_kerber_dorfnetz():
    pd_net = pn.create_kerber_dorfnetz(p_load_in_kw=2., q_load_in_kvar=1.)
    assert abs(pd_net.line.length_km.sum() - 3.412) < 0.00000001
    assert abs(pd_net.load.p_kw.sum() - 114.) < 0.00000001
    assert abs(pd_net.load.q_kvar.sum() - 57.) < 0.00000001
    assert len(pd_net.bus.index) == 116
    assert len(pd_net.line.index) == 114
    assert len(pd_net.trafo.index) == 1
Exemplo n.º 3
0
def test_create_kerber_dorfnetz():
    pd_net = pn.create_kerber_dorfnetz(p_load_mw=.002, q_load_mvar=.001)
    assert abs(pd_net.line.length_km.sum() - 3.412) < 0.00000001
    assert abs(pd_net.load.p_mw.sum() - .114) < 0.00000001
    assert abs(pd_net.load.q_mvar.sum() - 0.057) < 0.00000001
    assert len(pd_net.bus.index) == 116
    assert len(pd_net.line.index) == 114
    assert len(pd_net.trafo.index) == 1
    pp.runpp(pd_net)
    assert pd_net.converged