def kb_extrem_vorstadtnetz_trafo_2(std_type="NAYY 4x185", p_load_in_kw=2., q_load_in_kvar=0., trafotype="0.25 MVA 10/0.4 kV", v_os=10.): num_lines = [61, 32, 32, 20, 15, 15, 11, 5, 1] len_lines = [0.01, 0.014, 0.014, 0.02, 0.023, 0.023, 0.026, 0.05, 0.085] pd_net, main_busbar_nr = _create_empty_network_with_transformer(trafotype, V_OS=v_os) for i, n_lines in enumerate(num_lines): pd_net = _add_lines_with_branched_loads( pd_net, n_lines, startbus=main_busbar_nr, length_per_line=len_lines[i], std_type=std_type, p_per_load_in_kw=p_load_in_kw, q_per_load_in_kvar=q_load_in_kvar, length_branchout_line_1=0.011, std_type_branchout_line_1="NAYY 4x50", std_type_branchout_line_2="NYY 4x35", # Probability: 50% betweeen "NAVY 50" and "NYY 4x35" prob_branchout_line_1=0.5, branchnr=i + 1) return pd_net
def kb_extrem_landnetz_kabel( n_branch_1=26, l_lines_1_in_km=0.026, std_type="NAYY 4x150", # trafotype="0.4 MVA 10/0.4 kV Yyn6 4 ASEA" trafotype="0.25 MVA 10/0.4 kV", p_load_in_kw=8., q_load_in_kvar=0., lenght_branchout_line_1=0.018, lenght_branchout_line_2=0.033, std_type_branchout_line="NAYY 4x50", v_os=10.): num_lines = [n_branch_1] len_lines = [l_lines_1_in_km] pd_net, main_busbar_nr = _create_empty_network_with_transformer(trafotype, V_OS=v_os) for i, n_lines in enumerate(num_lines): pd_net = _add_lines_with_branched_loads( pd_net, n_lines, startbus=main_busbar_nr, length_per_line=len_lines[i], std_type=std_type, p_per_load_in_kw=p_load_in_kw, q_per_load_in_kvar=q_load_in_kvar, length_branchout_line_1=lenght_branchout_line_1, length_branchout_line_2=lenght_branchout_line_2, std_type_branchout_line_1=std_type_branchout_line, branchnr=i + 1) return pd_net
def kb_extrem_dorfnetz_trafo( std_type="NAYY 4x150", trafotype="0.25 MVA 10/0.4 kV", # trafotype="0.4 MVA 10/0.4 kV Yyn6 4 ASEA", p_load_in_kw=6., q_load_in_kvar=0., length_branchout_line_1=0.015, length_branchout_line_2=0.031, std_type_branchout_line="NAYY 4x50", v_os=10.): num_lines = [28, 28, 16, 12, 12, 9, 7, 4, 1] len_lines = [0.021, 0.021, 0.029, 0.032, 0.032, 0.040, 0.043, 0.064, 0.102] pd_net, main_busbar_nr = _create_empty_network_with_transformer(trafotype, V_OS=v_os) for i, n_lines in enumerate(num_lines): pd_net = _add_lines_with_branched_loads( pd_net, n_lines, startbus=main_busbar_nr, length_per_line=len_lines[i], std_type=std_type, p_per_load_in_kw=p_load_in_kw, q_per_load_in_kvar=q_load_in_kvar, length_branchout_line_1=length_branchout_line_1, length_branchout_line_2=length_branchout_line_2, std_type_branchout_line_1=std_type_branchout_line, branchnr=i + 1) return pd_net
def test_add_lines_with_branched_loads(): # BUILD: pd_net = pp.create_empty_network() busnr1 = pp.create_bus(pd_net, name="startbus", vn_kv=.4) n_lines_add = int(10.*rd.random() + 1) l_per_line = 0.10*rd.random() l_branchout_line = 0.022 # OPERATE: _add_lines_with_branched_loads(pd_net, n_lines_add, startbus=busnr1, length_per_line=l_per_line, p_load_kw=2., q_load_kvar=0, length_branchout_line_1=l_branchout_line, prob_branchout_line_1=0.5, branchnr=1) assert len(pd_net.bus.index) == 2*n_lines_add + 1 assert len(pd_net.line.index) == 2*n_lines_add assert len(pd_net.load.index) == n_lines_add assert abs(pd_net.line.length_km.sum() - n_lines_add*(l_per_line+l_branchout_line)) < 0.0000001