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

add customer, asset catalogue and asset profile #2511

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions pandapower/converter/cim/cim_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@
# Copyright (c) 2016-2023 by University of Kassel and Fraunhofer Institute for Energy Economics
# and Energy System Technology (IEE), Kassel. All rights reserved.
from __future__ import annotations

import logging
import os
import re
import tempfile
import zipfile
from types import MappingProxyType
from typing import Dict, List
import pandas as pd

import numpy as np
import pandas as pd
from lxml import etree
from .other_classes import ReportContainer, Report, LogLevel, ReportCode

from .cim_tools import get_cim_schema
from .other_classes import LogLevel, Report, ReportCode, ReportContainer


class CimParser:
Expand Down Expand Up @@ -451,6 +454,12 @@ def _get_cgmes_profile_from_xml(self, root: etree.Element, ignore_errors: bool =
return 'op'
elif '/ShortCircuit-EU/' in one_profile:
return 'sc'
elif '/Customers/' in one_profile:
return 'cu'
elif '/AssetCatalogue/' in one_profile:
return 'ac'
elif '/Asset/' in one_profile:
return 'as'
if ignore_errors:
self.logger.warning("The CGMES profile could not be parsed from the XML, returning %s" % default_profile)
self.report_container.add_log(Report(level=LogLevel.ERROR, code=ReportCode.ERROR_PARSING,
Expand Down