Skip to content

Commit

Permalink
Merge pull request #2222 from mrifraunhofer/develop
Browse files Browse the repository at this point in the history
in reindex_elements: fixed index error when reindexing line_geodata
  • Loading branch information
SteffenMeinecke authored Feb 19, 2024
2 parents 30d6205 + f770a2a commit 6373031
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ Change Log
- [FIXED] additional arguments from mpc saved to net._options: create "_options" if it does not exist
- [CHANGED] cim2pp: extracted getting default classes, added generic setting datatypes from CGMES XMI schema
- [ADDED] function :code:`getOTDF` to obtain Outage Transfer Distribution Factors, that can be used to analyse outages using the DC approximation of the power system
- [CHANGED] DFData datasource behavior to enable timeseries calculation with time-dependent nonnumeric data (ConstControl)
- [ADDED] function :code:`outage_results_OTDF` to obtain the matrix of results for all outage scenarios, with rows as outage scenarios and columns as branch power flows in that scenario
- [FIXED] add some safeguards for TDPF to avoid numerical issues in some cases
- [FIXED] avoid attaching elements as duplicates to a group where some of the elements already exist
- [ADDED] the function :code:`run_contingency` can raise a captured error if parameter :code:`raise_errors` is passed
- [FIXED] bugfix for tap dependent impedance characteristics so that not all characteristics columns are necessary
- [FIXED] in function :code:`toolbox.replace_zero_branches_with_switches`, use absolute for the parameters of impedance elements in case they are negative nonzero values
- [FIXED] in :code:`reindex_elements`: fixed index error when reindexing line_geodata

[2.13.1] - 2023-05-12
-------------------------------
Expand Down
3 changes: 2 additions & 1 deletion pandapower/toolbox/data_modification.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ def reindex_elements(net, element_type, new_indices=None, old_indices=None, look
idx_name = net.line_geodata.index.name
place_holder = uuid.uuid4()
net["line_geodata"][place_holder] = net["line_geodata"].index
net["line_geodata"].loc[old_indices, place_holder] = get_indices(old_indices, lookup)
net["line_geodata"].loc[old_indices.intersection(net.line_geodata.index), place_holder] = (
get_indices(old_indices.intersection(net.line_geodata.index), lookup))
net["line_geodata"].set_index(place_holder, inplace=True)
net["line_geodata"].index.name = idx_name

Expand Down

0 comments on commit 6373031

Please sign in to comment.