Skip to content

Commit

Permalink
Merge pull request #2508 from mfisch42/fix/geodata_auxilary_bus
Browse files Browse the repository at this point in the history
Fix/geodata auxilary bus
  • Loading branch information
pawellytaev authored Jan 10, 2025
2 parents 0c11889 + 5c785c1 commit 43afaa5
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 14 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@ Change Log

[upcoming release] - 2025-..-..
-------------------------------
- [FIXED] Increasing geojson precision as the default precision might cause problems with pandahub

[2.14.11] - 2024-07-08
-------------------------------
- [FIXED] Lightsim2grid version

[2.14.10] - 2024-07-08
-------------------------------
- [FIXED] geopandas version

[2.14.9] - 2024-06-25
-------------------------------
- [FIXED] scipy version

[upcoming release] - 2024-..-..
-------------------------------

- [ADDED] Static Var Compensator with Voltage Control
- [ADDED] pf2pp: min/max q_mvar and min/max p_mw limits for sgens and gen will be converted
- [FIXED] Allow to consider all oos components in nx graph creation
- [REMOVED] Excluding tests and test_files from built packages
- [ADDED] Static Var Compensator with Voltage Control
Expand Down
1 change: 1 addition & 0 deletions doc/converter/powerfactory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The documentation describes how to use the exporter as a function in "Engine mod
- ElmSind (Series Reactor)
- Elmscap (Series Capacitor)
- ElmSvs (Static Var Compensator with Voltage Control)


Setup PowerFactory and Python
=====================================
Expand Down
3 changes: 2 additions & 1 deletion pandapower/build_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,8 @@ def _normalise_slack_weights(ppc, gen_mask, xward_mask, xward_pq_buses):
else:
# ppc['gen'][subnet_gen_mask, SL_FAC] /= sum_slack_weights
slack_weights_gen /= sum_slack_weights
buses, slack_weights_bus, _ = _sum_by_group(gen_buses[subnet_gen_mask], slack_weights_gen[subnet_gen_mask], slack_weights_gen[subnet_gen_mask])
buses, slack_weights_bus, _ = _sum_by_group(gen_buses[subnet_gen_mask], slack_weights_gen[subnet_gen_mask],
slack_weights_gen[subnet_gen_mask])
ppc['bus'][buses, SL_FAC_BUS] = slack_weights_bus

# raise NotImplementedError if there are several separate zones for distributed slack:
Expand Down
1 change: 1 addition & 0 deletions pandapower/converter/powerfactory/pf_export_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def create_network_dict(app, flag_graphics='GPS'):
'ElmVsc',
'ElmVscmono',


# branch elements:
'ElmLne',
'ElmCoup',
Expand Down
26 changes: 13 additions & 13 deletions pandapower/converter/powerfactory/pp_import_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2907,12 +2907,12 @@ def create_zpu(net, item):

# create auxilary buses
aux_bus1 = pp.create_bus(net, vn_kv=net.bus.vn_kv.at[bus1], name=net.bus.name.at[bus1]+'_aux',
geodata=net.bus.geo.at[bus1], type="b", zone=net.bus.zone.at[bus1],
in_service=True)
type="b", zone=net.bus.zone.at[bus1], in_service=True)
net.bus.loc[aux_bus1, 'geo'] = net.bus.geo.at[bus1]
params['from_bus'] = aux_bus1
aux_bus2 = pp.create_bus(net, vn_kv=net.bus.vn_kv.at[bus2], name=net.bus.name.at[bus2]+'_aux',
geodata=net.bus.geo.at[bus2], type="b", zone=net.bus.zone.at[bus2],
in_service=True)
type="b", zone=net.bus.zone.at[bus2], in_service=True)
net.bus.loc[aux_bus2, 'geo'] = net.bus.geo.at[bus2]
params['to_bus'] = aux_bus2

xid = pp.create_impedance(net, **params)
Expand Down Expand Up @@ -3042,13 +3042,13 @@ def create_sind(net, item):
logger.error("Cannot add Sind '%s': not connected" % item.loc_name)
return

# create auxilary buses
# create auxilary buses
aux_bus1 = pp.create_bus(net, vn_kv=net.bus.vn_kv.at[bus1], name=net.bus.name.at[bus1]+'_aux',
geodata=net.bus.geo.at[bus1], type="b", zone=net.bus.zone.at[bus1],
in_service=True)
type="b", zone=net.bus.zone.at[bus1], in_service=True)
net.bus.loc[aux_bus1, 'geo'] = net.bus.geo.at[bus1]
aux_bus2 = pp.create_bus(net, vn_kv=net.bus.vn_kv.at[bus2], name=net.bus.name.at[bus2]+'_aux',
geodata=net.bus.geo.at[bus2], type="b", zone=net.bus.zone.at[bus2],
in_service=True)
type="b", zone=net.bus.zone.at[bus2], in_service=True)
net.bus.loc[aux_bus2, 'geo'] = net.bus.geo.at[bus2]

sind = pp.create_series_reactor_as_impedance(net, from_bus=aux_bus1, to_bus=aux_bus2,
r_ohm=item.rrea, x_ohm=item.xrea, sn_mva=item.Sn,
Expand Down Expand Up @@ -3103,11 +3103,11 @@ def create_scap(net, item):

# create auxilary buses
aux_bus1 = pp.create_bus(net, vn_kv=net.bus.vn_kv.at[bus1], name=net.bus.name.at[bus1]+'_aux',
geodata=net.bus.geo.at[bus1], type="b", zone=net.bus.zone.at[bus1],
in_service=True)
type="b", zone=net.bus.zone.at[bus1], in_service=True)
net.bus.loc[aux_bus1, 'geo'] = net.bus.geo.at[bus1]
aux_bus2 = pp.create_bus(net, vn_kv=net.bus.vn_kv.at[bus2], name=net.bus.name.at[bus2]+'_aux',
geodata=net.bus.geo.at[bus2], type="b", zone=net.bus.zone.at[bus2],
in_service=True)
type="b", zone=net.bus.zone.at[bus2], in_service=True)
net.bus.loc[aux_bus2, 'geo'] = net.bus.geo.at[bus2]

scap = pp.create_series_reactor_as_impedance(net, from_bus=aux_bus1, to_bus=aux_bus2, r_ohm=r_ohm,
x_ohm=x_ohm, sn_mva=item.Sn,
Expand Down

0 comments on commit 43afaa5

Please sign in to comment.