e2nIEE / pandapower

Convenient Power System Modelling and Analysis based on PYPOWER and pandas
https://www.pandapower.org
Other
881 stars 484 forks source link

grids without slack nodes #6

Closed FlorianShepherd closed 7 years ago

FlorianShepherd commented 7 years ago

Pypower allows grids withouth slack nodes and changes the first PV-bus to a slack node if none is available. I think it would be better if a warning / error is raised instead and the toolbox should get a function to change a PV node to a slack node.

See bustypes.py: `

pick a new reference bus if for some reason there is none (may have been

# shut down)
if len(ref) == 0:
    # bugfix Pypower: must be an numpy array!
    ref = zeros(1, dtype=int)
    ref[0] = pv[0]      # use the first PV bus
    pv = pv[1:]      # take it off PV list

`

lthurner commented 7 years ago

With the new connectivity check, we can now detect islands. I would suggest the following behaviour:

FlorianShepherd commented 7 years ago

Sounds valid.

FlorianShepherd commented 7 years ago

Fixed. We agreed on the following:

pandapower.diagnostic can be used to identify unsupplied buses with gens. These can be manually converted to ext_grid if desired. Otherwise the behaviour of the power flow algorithm would be implicit.