Closed LukasKur closed 1 year ago
Update I updated pandapower (with conda, if this information is helpful) again and now I get the following error when executing the code above:
`---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
Cell In[11], line 1
----> 1 pp.shortcircuit.calc_sc(net, fault="3ph", case="max")
File ~\Anaconda3\envs\pypsaenv\lib\site-packages\pandapower\shortcircuit\calc_sc.py:147, in calc_sc(net, bus, fault, case, lv_tol_percent, topology, ip, ith, tk_s, kappa_method, r_fault_ohm, x_fault_ohm, branch_results, check_connectivity, return_all_currents, inverse_y)
144 init_results(net, "sc")
146 if fault in ("2ph", "3ph"):
--> 147 _calc_sc(net, bus)
148 elif fault == "1ph":
149 _calc_sc_1ph(net, bus)
File ~\Anaconda3\envs\pypsaenv\lib\site-packages\pandapower\shortcircuit\calc_sc.py:198, in _calc_sc(net, bus)
195 def _calc_sc(net, bus):
196 ppc, ppci = _init_ppc(net)
--> 198 _calc_current(net, ppci, bus)
200 ppc = _copy_results_ppci_to_ppc(ppci, ppc, "sc")
201 _extract_results(net, ppc, ppc_0=None, bus=bus)
File ~\Anaconda3\envs\pypsaenv\lib\site-packages\pandapower\shortcircuit\calc_sc.py:160, in _calc_current(net, ppci_orig, bus)
156 ppci_bus = _get_is_ppci_bus(net, bus)
158 # update ppci
159 non_ps_gen_ppci_bus, non_ps_gen_ppci, ps_gen_bus_ppci_dict =\
--> 160 _create_k_updated_ppci(net, ppci_orig, ppci_bus=ppci_bus)
162 # For each ps_gen_bus one unique ppci is required
163 ps_gen_ppci_bus = list(ps_gen_bus_ppci_dict.keys())
File ~\Anaconda3\envs\pypsaenv\lib\site-packages\pandapower\shortcircuit\ppc_conversion.py:245, in _create_k_updated_ppci(net, ppci_orig, ppci_bus)
243 trafo_ix = ppci_gen["bus"][bus, PS_TRAFO_IX].astype(int)
244 # Calculating SC inside power system unit
--> 245 ppci_gen["branch"][trafo_ix, [BR_X, BR_R]] /= \
246 ppci_gen["branch"][trafo_ix, K_ST]
248 bus_ppci.update({bus: ppci_gen})
250 return non_ps_gen_bus, ppci, bus_ppci
IndexError: index -2147483648 is out of bounds for axis 0 with size 5`
`
Dear @LukasKur ,
we do not have a conda version of pandapower, I think it is an older version packaged by someone else?
You should install pandapower from PyPI or from github develop. Does the problem still occur then?
Hey @rbolgaryn,
thanks for the comment! I will try it out.
FYI: In the official installation guide conda is explicitly recommended: http://www.pandapower.org/start/
Yes but for installing packages, not pandapower itself
No updates so closing the issue.
Issue Report Checklist
pip install --upgrade pandapower
(orgit pull
)Problem Description
Hey all, I´m trying to make a short-circuit-calculation. I made a previous issue, where I described the error in my main project #1876 . Now I was trying out some examples/tutorials to test the problem. I tried https://github.com/e2nIEE/pandapower/blob/develop/tutorials/shortcircuit.ipynb and it worked. But when I add a second transformator (see code) below I get the error below.
--> Is the problem/bug of the short-circuit-calculation the second transformator? (FYI, the example in https://pandapower.readthedocs.io/en/v2.11.1/shortcircuit/run.html doesn´t work with me.
What steps reproduce the problem?
Executing the following code in Jupyter Notebook:
`
`
What is the expected output? What do you see instead?
Short-circuit calculation
Paste Traceback/Error Below (if applicable)
Versions
pandas version: 1.5.2 networkx version: 3.0 scipy version: 1.10.0 numpy version: 1.23.5 packaging version: 22.0 tqdm version: 4.64.1 deepdiff version: not included --> reason for the error? Operating System name/version: Win 10
Labels (if access available)
labels
at the right side (e.g.bug
,controller
,OPF
...)