Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] CIM16 CGMES import error busbar_id and busbar_name is dropped #2517

Open
5 of 6 tasks
bp50hz opened this issue Jan 30, 2025 · 1 comment
Open
5 of 6 tasks

[bug] CIM16 CGMES import error busbar_id and busbar_name is dropped #2517

bp50hz opened this issue Jan 30, 2025 · 1 comment
Assignees
Labels

Comments

@bp50hz
Copy link

bp50hz commented Jan 30, 2025

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 (or git pull)

  • Tried basic troubleshooting (if a bug/error) like restarting the interpreter and checking the pythonpath

Reproducible Example

testcase is missing in:
https://github.com/e2nIEE/pandapower/blob/8009cb53287c1f79e009d3093b1baf5694da17db/pandapower/test/converter/test_from_cim.py

Issue Description and Traceback

https://github.com/e2nIEE/pandapower/blob/develop/pandapower/converter/cim/cim2pp/build_pp_net.py
line 65 in build_pp_net.py:

self.net[pp_type] = pd.concat([self.net[pp_type],
        input_df[list(set(self.net[pp_type].columns).intersection(input_df.columns))]],
        ignore_index=True, sort=False)

during runtime:

input_df.columns = Index(['origin_id', 'name', 'description', 'ConnectivityNodeContainer',
       'origin_profile', 'origin_class', 'ConnectivityNodeContainer_id',
       'Substation', 'zone', 'Substation_id', 'vn_kv', 'ConnectivityNode',
       'cim_topnode', 'busbar_id', 'busbar_name', 'GeographicalRegion_id',
       'GeographicalRegion_name', 'SubGeographicalRegion_id',
       'SubGeographicalRegion_name', 'in_service', 'type'],
      dtype='object')
self.net[pp_type].columns = 
Index(['name', 'vn_kv', 'type', 'zone', 'in_service', 'geo', 'origin_id',
       'origin_class', 'origin_profile', 'cim_topnode',
       'ConnectivityNodeContainer_id', 'Substation_id', 'description',
       'Busbar_id', 'Busbar_name', 'GeographicalRegion_id',
       'GeographicalRegion_name', 'SubGeographicalRegion_id',
       'SubGeographicalRegion_name'],
      dtype='object')

Busbar_id != busbar_id
Busbar_name != busbar_name
-> busbar info gets dropped

why is the type hardcoded and not based on the busbarsection?
https://github.com/e2nIEE/pandapower/blob/develop/pandapower/converter/cim/cim2pp/converter_classes/connectivitynodes/connectivityNodesCim16.py
line 266

Expected Behavior

Busbar_id == Busbar_id
Busbar_name == Busbar_name

Installed Versions

pandapower 3.0.0.dev1 8009cb5

Label

  • Relevant labels are selected
@bp50hz bp50hz added the bug label Jan 30, 2025
@bp50hz
Copy link
Author

bp50hz commented Jan 31, 2025

possible hotfix:
https://github.com/e2nIEE/pandapower/blob/develop/pandapower/converter/cim/cim2pp/converter_classes/connectivitynodes/connectivityNodesCim16.py
current code:

    def convert_connectivity_nodes_cim16(self):
        time_start = time.time()
        self.logger.info("Start converting ConnectivityNodes / TopologicalNodes.")
        connectivity_nodes, eqssh_terminals = self._prepare_connectivity_nodes_cim16()

add after line 24:
connectivity_nodes = connectivity_nodes.rename(columns={'busbar_id': 'Busbar_id', "busbar_name": 'Busbar_name'})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants