bus2bus switches are set to isolated buses in ppc (categorie 4.0 at column 1)
eva-bct opened this issue · comments
Bug report checklis
-
Searched the issues page for similar reports
-
Read the relevant sections of the documentation
-
Browse the tutorials and tests for usefull code snippets and examples of use
-
Reproduced the issue after updating with
pip install --upgrade pandapower
(orgit pull
) -
Tried basic troubleshooting (if a bug/error) like restarting the interpreter and checking the pythonpath
Reproducible Example
import simbench as sb
from pandapower.estimation.ppc_conversion import _init_ppc
from pandapower.pd2ppc import _pd2ppc
net = sb.get_simbench_net("1-MV-comm--0-sw")
# for simplification remove open lines and switches
net.line = net.line.drop(net.switch.element[np.equal(net.switch.closed, False)])
net.switch = net.switch[net.switch.closed]
_init_ppc(net, None, None, False)
pcc, ppci = _pd2ppc(net)
net.switch[net.switch.et == 'b'] # bus 0-1, 2-3, 3-4 are connected by bus to bus connections, closed = True
Issue Description and Traceback
In the example grid, some of the buses are connected via bus to bus switches. These buses are set to isolated buses in ppc even though the bus to bus switches are closed
buses 0 to 1, 2 to 3, 3 to 4 are connected by bus to bus connections, closed = True
in ppc bus 0, 3 and 4 are set to isolated buses, which is not possible, as the switches of these buses are closed
these happen in the auxiliary file within the function: _check_connectivity(ppc)
Expected Behavior
The buses 0,3 and 4 should not be set to isolated buses in the ppc
Installed Versions
- python version: 3.10 * pandas version: 2.21 * numpy version: 1.23.5 *simbench version 1.4.0 *pandapower version 2.13.1
Label
- Relevant labels are selected