e2nIEE / pandapower

Compare e8c5b95 ... +6 ... cffe744

Coverage Reach
pandapower/pypower/pips.py pandapower/pypower/opf_model.py pandapower/pypower/dcopf_solver.py pandapower/pypower/opf_setup.py pandapower/pypower/pipsopf_solver.py pandapower/pypower/opf_execute.py pandapower/pypower/opf_args.py pandapower/pypower/newtonpf.py pandapower/pypower/opf_consfcn.py pandapower/pypower/fdpf.py pandapower/pypower/opf_hessfcn.py pandapower/pypower/pfsoln.py pandapower/pypower/gausspf.py pandapower/pypower/opf_costfcn.py pandapower/pypower/dSbr_dV.py pandapower/pypower/makePTDF.py pandapower/pypower/qps_pips.py pandapower/pypower/makeApq.py pandapower/pypower/makeAy.py pandapower/pypower/makeAvl.py pandapower/pypower/makeYbus.py pandapower/pypower/makeBdc.py pandapower/pypower/makeSbus.py pandapower/pypower/totcost.py pandapower/pypower/opf.py pandapower/pypower/makeAang.py pandapower/pypower/polycost.py pandapower/pypower/qps_pypower.py pandapower/pypower/idx_gen.py pandapower/pypower/idx_brch.py pandapower/pypower/idx_bus.py pandapower/pypower/dSbus_dV.py pandapower/pypower/makeB.py pandapower/pypower/d2Sbus_dV2.py pandapower/pypower/dIbr_dV.py pandapower/pypower/hasPQcap.py pandapower/pypower/d2Sbr_dV2.py pandapower/pypower/add_userfcn.py pandapower/pypower/makeLODF.py pandapower/pypower/update_mupq.py pandapower/pypower/ppoption.py pandapower/pypower/run_userfcn.py pandapower/pypower/pqcost.py pandapower/pypower/util.py pandapower/pypower/d2ASbr_dV2.py pandapower/pypower/dAbr_dV.py pandapower/pypower/d2AIbr_dV2.py pandapower/pypower/d2Ibr_dV2.py pandapower/pypower/dcpf.py pandapower/pypower/printpf.py pandapower/pypower/bustypes.py pandapower/pypower/idx_cost.py pandapower/pypower/ppver.py pandapower/pypower/pipsver.py pandapower/pypower/isload.py pandapower/pypower/idx_area.py pandapower/pypower/_compat.py pandapower/pypower/__init__.py pandapower/toolbox.py pandapower/networks/cigre_networks.py pandapower/networks/create_examples.py pandapower/networks/power_system_test_cases.py pandapower/networks/dickert_lv_networks.py pandapower/networks/kerber_networks.py pandapower/networks/simple_pandapower_test_networks.py pandapower/networks/synthetic_voltage_control_lv_networks.py pandapower/networks/kerber_extreme_networks.py pandapower/networks/mv_oberrhein.py pandapower/networks/ieee_europen_lv_asymmetric.py pandapower/networks/__init__.py pandapower/estimation/algorithm/base.py pandapower/estimation/algorithm/estimator.py pandapower/estimation/algorithm/matrix_base.py pandapower/estimation/algorithm/lp.py pandapower/estimation/algorithm/optimization.py pandapower/estimation/ppc_conversion.py pandapower/estimation/util.py pandapower/estimation/state_estimation.py pandapower/estimation/results.py pandapower/estimation/idx_brch.py pandapower/estimation/idx_bus.py pandapower/estimation/__init__.py pandapower/pf/run_bfswpf.py pandapower/pf/runpp_3ph.py pandapower/pf/runpf_pypower.py pandapower/pf/run_newton_raphson_pf.py pandapower/pf/create_jacobian.py pandapower/pf/pfsoln_numba.py pandapower/pf/run_dc_pf.py pandapower/pf/iwamoto_multiplier.py pandapower/pf/makeYbus_numba.py pandapower/pf/ppci_variables.py pandapower/pf/dSbus_dV_numba.py pandapower/pf/no_numba.py pandapower/pf/create_jacobian_numba.py pandapower/shortcircuit/ppc_conversion.py pandapower/shortcircuit/currents.py pandapower/shortcircuit/results.py pandapower/shortcircuit/calc_sc.py pandapower/shortcircuit/kappa.py pandapower/shortcircuit/toolbox.py pandapower/shortcircuit/impedance.py pandapower/shortcircuit/idx_bus.py pandapower/shortcircuit/idx_brch.py pandapower/shortcircuit/__init__.py pandapower/control/controller/trafo/DiscreteTapControl.py pandapower/control/controller/trafo/ContinuousTapControl.py pandapower/control/controller/trafo/u_setofp.py pandapower/control/controller/trafo/USetTapControl.py pandapower/control/controller/characteristic_control.py pandapower/control/controller/const_control.py pandapower/control/controller/trafo_control.py pandapower/control/util/auxiliary.py pandapower/control/util/diagnostic.py pandapower/control/util/characteristic.py pandapower/control/util/__init__.py pandapower/control/run_control.py pandapower/control/basic_controller.py pandapower/control/__init__.py pandapower/timeseries/output_writer.py pandapower/timeseries/run_time_series.py pandapower/timeseries/ts_runpp.py pandapower/timeseries/read_batch_results.py pandapower/timeseries/data_sources/frame_data.py pandapower/timeseries/data_sources/__init__.py pandapower/timeseries/data_source.py pandapower/timeseries/__init__.py pandapower/converter/pypower/from_ppc.py pandapower/converter/pypower/to_ppc.py pandapower/converter/pypower/__init__.py pandapower/converter/powermodels/to_pm.py pandapower/converter/powermodels/from_pm.py pandapower/converter/powermodels/__init__.py pandapower/converter/matpower/from_mpc.py pandapower/converter/matpower/to_mpc.py pandapower/converter/matpower/__init__.py pandapower/converter/__init__.py pandapower/io_utils.py pandapower/create.py pandapower/build_branch.py pandapower/auxiliary.py pandapower/diagnostic.py pandapower/build_bus.py pandapower/topology/create_graph.py pandapower/topology/graph_searches.py pandapower/topology/graph_tool_interface.py pandapower/topology/__init__.py pandapower/results_branch.py pandapower/diagnostic_reports.py pandapower/pd2ppc_zero.py pandapower/results_bus.py pandapower/convert_format.py pandapower/build_gen.py pandapower/results_gen.py pandapower/opf/make_objective.py pandapower/opf/pm_storage.py pandapower/opf/validate_opf_input.py pandapower/opf/run_powermodels.py pandapower/pd2ppc.py pandapower/file_io.py pandapower/results.py pandapower/powerflow.py pandapower/std_types.py pandapower/optimal_powerflow.py pandapower/run.py pandapower/__init__.py pandapower/runpm.py setup.py

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -214,7 +214,11 @@
Loading
214 214
    """
215 215
    _add_auxiliary_elements(net)
216 216
    # pos. seq bus impedance
217 -
    ppc, ppci = _pd2ppc(net)
217 +
    ppc, ppci = _init_ppc(net)
218 +
    # Create k updated ppci
219 +
    ppci_bus = _get_is_ppci_bus(net, bus)
220 +
    _, ppci, _ =\
221 +
        _create_k_updated_ppci(net, ppci, ppci_bus=ppci_bus)
218 222
    _calc_ybus(ppci)
219 223
220 224
    # zero seq bus impedance

@@ -209,7 +209,7 @@
Loading
209 209
        return trafo_df[par].values
210 210
211 211
212 -
def _calc_branch_values_from_trafo_df(net, ppc, trafo_df=None, seq=1):
212 +
def _calc_branch_values_from_trafo_df(net, ppc, trafo_df=None, sequence=1):
213 213
    """
214 214
    Calculates the MAT/PYPOWER-branch-attributes from the pandapower trafo dataframe.
215 215
@@ -252,15 +252,15 @@
Loading
252 252
    vn_trafo_hv, vn_trafo_lv, shift = _calc_tap_from_dataframe(net, trafo_df)
253 253
    ratio = _calc_nominal_ratio_from_dataframe(ppc, trafo_df, vn_trafo_hv, vn_trafo_lv,
254 254
                                               bus_lookup)
255 -
    r, x, y = _calc_r_x_y_from_dataframe(net, trafo_df, vn_trafo_lv, vn_lv, ppc, seq=seq)
255 +
    r, x, y = _calc_r_x_y_from_dataframe(net, trafo_df, vn_trafo_lv, vn_lv, ppc, sequence=sequence)
256 256
    return r, x, y, ratio, shift
257 257
258 258
259 -
def _calc_r_x_y_from_dataframe(net, trafo_df, vn_trafo_lv, vn_lv, ppc, seq=1):
259 +
def _calc_r_x_y_from_dataframe(net, trafo_df, vn_trafo_lv, vn_lv, ppc, sequence=1):
260 260
    mode = net["_options"]["mode"]
261 261
    trafo_model = net["_options"]["trafo_model"]
262 262
263 -
    r, x = _calc_r_x_from_dataframe(mode, trafo_df, vn_lv, vn_trafo_lv, net.sn_mva, seq=seq)
263 +
    r, x = _calc_r_x_from_dataframe(mode, trafo_df, vn_lv, vn_trafo_lv, net.sn_mva, sequence=sequence)
264 264
265 265
    if mode == "sc":
266 266
        y = 0
@@ -408,17 +408,17 @@
Loading
408 408
    array[mask] = value
409 409
    return array
410 410
411 -
def _calc_r_x_from_dataframe(mode, trafo_df, vn_lv, vn_trafo_lv, sn_mva, seq=1):
411 +
def _calc_r_x_from_dataframe(mode, trafo_df, vn_lv, vn_trafo_lv, sn_mva, sequence=1):
412 412
    """
413 413
    Calculates (Vectorized) the resitance and reactance according to the
414 414
    transformer values
415 415
416 416
    """
417 417
    parallel = get_trafo_values(trafo_df, "parallel")
418 -
    if seq == 1:
418 +
    if sequence == 1:
419 419
        vk_percent = get_trafo_values(trafo_df, "vk_percent")
420 420
        vkr_percent = get_trafo_values(trafo_df, "vkr_percent")
421 -
    elif seq == 0:
421 +
    elif sequence == 0:
422 422
        vk_percent = get_trafo_values(trafo_df, "vk0_percent")
423 423
        vkr_percent = get_trafo_values(trafo_df, "vkr0_percent")
424 424
    else:
@@ -429,7 +429,7 @@
Loading
429 429
    sn_trafo_mva = get_trafo_values(trafo_df, "sn_mva")
430 430
    z_sc = vk_percent / 100. / sn_trafo_mva * tap_lv
431 431
    r_sc = vkr_percent / 100. / sn_trafo_mva * tap_lv
432 -
    x_sc = np.sign(z_sc) * np.sqrt(z_sc ** 2 - r_sc ** 2)
432 +
    x_sc = np.sign(z_sc) * np.sqrt((z_sc ** 2 - r_sc ** 2).astype(float))
433 433
    return r_sc / parallel, x_sc / parallel
434 434
435 435
@@ -803,17 +803,17 @@
Loading
803 803
    _is_elements["line"] = net["line"][net["line"]["in_service"].values.astype(bool)]
804 804
805 805
806 -
def _trafo_df_from_trafo3w(net, seq=1):
806 +
def _trafo_df_from_trafo3w(net, sequence=1):
807 807
    nr_trafos = len(net["trafo3w"])
808 808
    trafo2 = dict()
809 809
    sides = ["hv", "mv", "lv"]
810 810
    mode = net._options["mode"]
811 811
    loss_side = net._options["trafo3w_losses"].lower()
812 812
    nr_trafos = len(net["trafo3w"])
813 813
    t3 = net["trafo3w"]
814 -
    if seq==1:
814 +
    if sequence==1:
815 815
        _calculate_sc_voltages_of_equivalent_transformers(t3, trafo2, mode)
816 -
    elif seq==0:
816 +
    elif sequence==0:
817 817
        if mode != "sc":
818 818
            raise NotImplementedError("0 seq impedance calculation only implemented for short-circuit calculation!")
819 819
        _calculate_sc_voltages_of_equivalent_transformers_zero_sequence(t3, trafo2,)

@@ -5,12 +5,14 @@
Loading
5 5
6 6
import math
7 7
import numpy as np
8 +
from itertools import product
9 +
8 10
import pandapower.auxiliary as aux
9 11
from pandapower.build_bus import _build_bus_ppc
10 12
from pandapower.build_gen import _build_gen_ppc
11 13
#from pandapower.pd2ppc import _ppc2ppci, _init_ppc
12 14
from pandapower.pypower.idx_brch import BR_B, BR_R, BR_X, F_BUS, T_BUS, branch_cols, BR_STATUS, SHIFT, TAP
13 -
from pandapower.pypower.idx_bus import BASE_KV, BS, GS
15 +
from pandapower.pypower.idx_bus import BASE_KV, BS, GS, BUS_TYPE
14 16
from pandapower.build_branch import _calc_tap_from_dataframe, _transformer_correction_factor, _calc_nominal_ratio_from_dataframe,\
15 17
     get_trafo_values, _trafo_df_from_trafo3w, _calc_branch_values_from_trafo_df
16 18
from pandapower.build_branch import _switch_branches, _branches_with_oos_buses, _initialize_branch_lookup, _end_temperature_correction_factor
@@ -31,6 +33,7 @@
Loading
31 33
32 34
    _build_bus_ppc(net, ppc)
33 35
    _build_gen_ppc(net, ppc)
36 +
    _add_gen_sc_impedance_zero(net, ppc)
34 37
    _add_ext_grid_sc_impedance_zero(net, ppc)
35 38
    _build_branch_ppc_zero(net, ppc)
36 39
@@ -41,7 +44,8 @@
Loading
41 44
    # Also sets lines out of service if they are connected to two out of service buses
42 45
    _branches_with_oos_buses(net, ppc)
43 46
    if hasattr(net, "_isolated_buses"):
44 -
        ppc["bus"][net._isolated_buses, 1] = 4.
47 +
        ppc["bus"][net._isolated_buses, BUS_TYPE] = 4.
48 +
45 49
    # generates "internal" ppci format (for powerflow calc) from "external" ppc format and updates the bus lookup
46 50
    # Note: Also reorders buses and gens in ppc
47 51
    ppci = _ppc2ppci(ppc, net)
@@ -95,15 +99,29 @@
Loading
95 99
    f, t = branch_lookup["trafo"]
96 100
    trafo_df["_ppc_idx"] = range(f, t)
97 101
    bus_lookup = net["_pd2ppc_lookups"]["bus"]
102 +
103 +
    hv_bus = get_trafo_values(trafo_df, "hv_bus").astype(int)
104 +
    lv_bus = get_trafo_values(trafo_df, "lv_bus").astype(int)
105 +
    in_service = get_trafo_values(trafo_df, "in_service").astype(int)
106 +
    ppc["branch"][f:t, F_BUS] = bus_lookup[hv_bus]
107 +
    ppc["branch"][f:t, T_BUS] = bus_lookup[lv_bus]
98 108
    buses_all, gs_all, bs_all = np.array([], dtype=int), np.array([]), \
99 109
                                np.array([])
110 +
    if mode == "sc":
111 +
        # Should be considered as connected for all in_service branches
112 +
        ppc["branch"][f:t, BR_X] = 1e20
113 +
        ppc["branch"][f:t, BR_R] = 1e20
114 +
        ppc["branch"][f:t, BR_B] = 0
115 +
        ppc["branch"][f:t, BR_STATUS] = in_service  
116 +
    else:
117 +
        ppc["branch"][f:t, BR_STATUS] = 0
118 +
100 119
    if not "vector_group" in trafo_df:
101 120
        raise ValueError("Vector Group of transformer needs to be specified for zero \
102 121
                         sequence modelling \n Try : net.trafo[\"vector_group\"] = 'Dyn'" )
103 122
104 123
    for vector_group, trafos in trafo_df.groupby("vector_group"):
105 124
        ppc_idx = trafos["_ppc_idx"].values.astype(int)
106 -
        ppc["branch"][ppc_idx, BR_STATUS] = 0
107 125
108 126
        if vector_group in ["Yy", "Yd", "Dy", "Dd"]:
109 127
            continue
@@ -175,6 +193,8 @@
Loading
175 193
        z_sc = z_sc.astype(float)
176 194
        r_sc = r_sc.astype(float)
177 195
        x_sc = np.sign(z_sc) * np.sqrt(z_sc ** 2 - r_sc ** 2)
196 +
        # TODO: This equation needs to be checked!
197 +
        # z0_k = (r_sc + x_sc * 1j) / parallel  * max(1, ratio) **2
178 198
        z0_k = (r_sc + x_sc * 1j) / parallel
179 199
        y0_k = 1 / z0_k #adding admittance for "pi" model
180 200
        if mode == "sc":# or trafo_model == "pi":
@@ -208,7 +228,7 @@
Loading
208 228
#        za = z_temp / (z2+z3)
209 229
        zb = z_temp / z1
210 230
#        zb = z_temp / (z1+z3)
211 -
        zc = z_temp / z3  # ZAB  Transfer impedance
231 +
        zc = z_temp / z3 # ZAB  Transfer impedance
212 232
#        zc = z_temp / (z1+z2)  # ZAB  Transfer impedance
213 233
        YAB = 1 / zc.astype(complex)
214 234
        YAN = 1 / za.astype(complex)
@@ -220,35 +240,35 @@
Loading
220 240
        YAB_AN = 1 / (zc + za).astype(complex)  # Series conn YAB and YAN
221 241
        YAB_BN = 1 / (zc + zb).astype(complex)  # Series conn YAB and YBN
222 242
243 +
        # y0_k = 1 / z0_k #adding admittance for "pi" model
223 244
        if vector_group == "Dyn":
224 245
            buses_all = np.hstack([buses_all, lv_buses_ppc])
225 246
            if trafo_model == "pi":
226 247
                y = y0_k # pi model
227 248
            else:
228 -
                y = (YAB + YBN).astype(complex) * int(ppc["baseMVA"])  # T model
229 -
            gs_all = np.hstack([gs_all, y.real * in_service])
230 -
            bs_all = np.hstack([bs_all, y.imag * in_service])
249 +
                y = (YAB + YBN).astype(complex)  # T model
250 +
            gs_all = np.hstack([gs_all, y.real * in_service]) * int(ppc["baseMVA"])
251 +
            bs_all = np.hstack([bs_all, y.imag * in_service]) * int(ppc["baseMVA"])
231 252
232 253
        elif vector_group == "YNd":
233 254
            buses_all = np.hstack([buses_all, hv_buses_ppc])
234 255
            if trafo_model == "pi":
235 -
                y = y0_k # pi model
256 +
                y = y0_k * ppc["baseMVA"] # pi model
236 257
            else:
237 -
                y = (YAB_BN + YAN).astype(complex) * int(ppc["baseMVA"]) #T model
238 -
            gs_all = np.hstack([gs_all, y.real * in_service])
239 -
            bs_all = np.hstack([bs_all, y.imag * in_service])
258 +
                y = (YAB_BN + YAN).astype(complex) #T model
259 +
            gs_all = np.hstack([gs_all, y.real * in_service]) * int(ppc["baseMVA"])
260 +
            bs_all = np.hstack([bs_all, y.imag * in_service]) * int(ppc["baseMVA"])
240 261
241 262
        elif vector_group == "Yyn":
242 263
            buses_all = np.hstack([buses_all, lv_buses_ppc])
243 264
            if trafo_model == "pi":
244 -
                y = 1/(z0_mag+z0_k).astype(complex)* int(ppc["baseMVA"]) #pi model
265 +
                y = 1/(z0_mag+z0_k).astype(complex) #pi model
245 266
            else:
246 -
#                y = (YAB_AN + YBN).astype(complex) * int(ppc["baseMVA"]) #T model
247 -
                y = (YAB + YAB_BN + YBN).astype(complex)* int(ppc["baseMVA"])  # T model
248 -
249 -
            gs_all = np.hstack([gs_all, y.real * in_service])
250 -
            bs_all = np.hstack([bs_all, y.imag * in_service])
267 +
#                y = (YAB_AN + YBN).astype(complex) #T model
268 +
                y = (YAB + YAB_BN + YBN).astype(complex) # T model
251 269
270 +
            gs_all = np.hstack([gs_all, y.real * in_service]) * int(ppc["baseMVA"])
271 +
            bs_all = np.hstack([bs_all, y.imag * in_service]) * int(ppc["baseMVA"])
252 272
253 273
        elif vector_group == "YNyn":
254 274
            ppc["branch"][ppc_idx, BR_STATUS] = in_service
@@ -302,6 +322,23 @@
Loading
302 322
    del net.trafo["_ppc_idx"]
303 323
304 324
325 +
def _add_gen_sc_impedance_zero(net, ppc):
326 +
    mode = net["_options"]["mode"]
327 +
    if mode == 'pf_3ph':
328 +
        return
329 +
330 +
    eg = net["gen"][net._is_elements["gen"]]
331 +
    if len(eg) == 0:
332 +
        return
333 +
    eg_buses = eg.bus.values
334 +
    bus_lookup = net["_pd2ppc_lookups"]["bus"]
335 +
    eg_buses_ppc = bus_lookup[eg_buses]
336 +
337 +
    y0_gen = 1 / (1e3 + 1e3*1j)
338 +
    # buses, gs, bs = aux._sum_by_group(eg_buses_ppc, y0_gen.real, y0_gen.imag)
339 +
    ppc["bus"][eg_buses_ppc, GS] += y0_gen.real
340 +
    ppc["bus"][eg_buses_ppc, BS] += y0_gen.imag
341 +
305 342
def _add_ext_grid_sc_impedance_zero(net, ppc):
306 343
    mode = net["_options"]["mode"]
307 344
@@ -388,50 +425,53 @@
Loading
388 425
    bus_lookup = net["_pd2ppc_lookups"]["bus"]
389 426
    branch = ppc["branch"]
390 427
    f, t = net["_pd2ppc_lookups"]["branch"]["trafo3w"]
391 -
    trafo_df = _trafo_df_from_trafo3w(net, seq=0)
428 +
    trafo_df = _trafo_df_from_trafo3w(net, sequence=0)
392 429
    hv_bus = get_trafo_values(trafo_df, "hv_bus").astype(int)
393 430
    lv_bus = get_trafo_values(trafo_df, "lv_bus").astype(int)
394 431
    in_service = get_trafo_values(trafo_df, "in_service").astype(int)
395 432
    branch[f:t, F_BUS] = bus_lookup[hv_bus]
396 433
    branch[f:t, T_BUS] = bus_lookup[lv_bus]
397 434
398 -
    r, x, _, ratio, shift = _calc_branch_values_from_trafo_df(net, ppc, trafo_df, seq=0)
435 +
    r, x, _, ratio, shift = _calc_branch_values_from_trafo_df(net, ppc, trafo_df, sequence=0)
399 436
400 437
    n_t3 = net.trafo3w.shape[0]
401 438
    for t3_ix in np.arange(n_t3):
402 439
        t3 = net.trafo3w.iloc[t3_ix, :]
403 -
404 -
        if t3.vector_group.lower() == "ynyd":
440 +
        
441 +
        if t3.vector_group.lower() in set(map(lambda vg: "".join(vg), product("dy", repeat=3))):
442 +
            x[[t3_ix, t3_ix+n_t3, t3_ix+n_t3*2]] = 1e10
443 +
            r[[t3_ix, t3_ix+n_t3, t3_ix+n_t3*2]] = 1e10
444 +
        elif t3.vector_group.lower() == "ynyd":
405 445
            # Correction for YnYD
406 446
            # z3->y3
407 447
            ys = 1 / ((x[t3_ix+n_t3*2] * 1j + r[t3_ix+n_t3*2]) * ratio[t3_ix+n_t3*2] ** 2)
408 448
            aux_bus = bus_lookup[lv_bus[t3_ix]]
409 449
            ppc["bus"][aux_bus, BS] += ys.imag
410 450
            ppc["bus"][aux_bus, GS] += ys.real
411 451
412 -
            # Set z2/z3 to almost 0 to avoid isolated bus
413 -
            x[[t3_ix+n_t3, t3_ix+n_t3*2]] = 1e20
414 -
            r[[t3_ix+n_t3, t3_ix+n_t3*2]] = 1e20
452 +
            # Set y2/y3 to almost 0 to avoid isolated bus
453 +
            x[[t3_ix+n_t3, t3_ix+n_t3*2]] = 1e10
454 +
            r[[t3_ix+n_t3, t3_ix+n_t3*2]] = 1e10
415 455
        elif t3.vector_group.lower() == "yynd":
416 456
            # z3->y3
417 457
            ys = 1 / ((x[t3_ix+n_t3*2] * 1j + r[t3_ix+n_t3*2]) * ratio[t3_ix+n_t3*2] ** 2)
418 458
            aux_bus = bus_lookup[lv_bus[t3_ix]]
419 459
            ppc["bus"][aux_bus, BS] += ys.imag
420 460
            ppc["bus"][aux_bus, GS] += ys.real
421 461
422 -
            # Set z1/z3 to almost 0 to avoid isolated bus
423 -
            x[[t3_ix, t3_ix+n_t3*2]] = 1e20
424 -
            r[[t3_ix, t3_ix+n_t3*2]] = 1e20
462 +
            # Set y1/y3 to almost 0 to avoid isolated bus
463 +
            x[[t3_ix, t3_ix+n_t3*2]] = 1e10
464 +
            r[[t3_ix, t3_ix+n_t3*2]] = 1e10
425 465
        elif t3.vector_group.lower() == "ynynd":
426 466
            # z3->y3
427 467
            ys = 1 / ((x[t3_ix+n_t3*2] * 1j + r[t3_ix+n_t3*2]) * ratio[t3_ix+n_t3*2] ** 2)
428 468
            aux_bus = bus_lookup[lv_bus[t3_ix]]
429 469
            ppc["bus"][aux_bus, BS] += ys.imag
430 470
            ppc["bus"][aux_bus, GS] += ys.real
431 471
432 -
            # Set z3 to almost 0 to avoid isolated bus
433 -
            x[t3_ix+n_t3*2] = 1e20
434 -
            r[t3_ix+n_t3*2] = 1e20
472 +
            # Set y3 to almost 0 to avoid isolated bus
473 +
            x[t3_ix+n_t3*2] = 1e10
474 +
            r[t3_ix+n_t3*2] = 1e10
435 475
        else:
436 476
            raise UserWarning(f"{t3.vector_group} not supported yet for trafo3w!")
437 477

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
pandapower +<.01% 87.60%
setup.py 0.00%
Project Totals (168 files) 87.52%
Loading