{"id":28615919,"url":"https://github.com/powergridmodel/iec-cim-conversion-services-beta","last_synced_at":"2025-06-12T02:10:43.578Z","repository":{"id":297941598,"uuid":"643946921","full_name":"PowerGridModel/IEC-CIM-conversion-services-beta","owner":"PowerGridModel","description":"CimToPGM and PGMToCim conversion services from RSE Italy (beta)","archived":false,"fork":false,"pushed_at":"2023-05-25T11:29:16.000Z","size":40,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-08T14:02:00.586Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PowerGridModel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-22T13:38:49.000Z","updated_at":"2024-07-02T16:43:23.000Z","dependencies_parsed_at":"2025-06-08T14:02:05.277Z","dependency_job_id":"0b31524a-1c49-4dfd-9b79-e29e96c1b0f4","html_url":"https://github.com/PowerGridModel/IEC-CIM-conversion-services-beta","commit_stats":null,"previous_names":["powergridmodel/iec-cim-conversion-services-beta"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PowerGridModel/IEC-CIM-conversion-services-beta","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerGridModel%2FIEC-CIM-conversion-services-beta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerGridModel%2FIEC-CIM-conversion-services-beta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerGridModel%2FIEC-CIM-conversion-services-beta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerGridModel%2FIEC-CIM-conversion-services-beta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PowerGridModel","download_url":"https://codeload.github.com/PowerGridModel/IEC-CIM-conversion-services-beta/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PowerGridModel%2FIEC-CIM-conversion-services-beta/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259382356,"owners_count":22848845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-12T02:10:42.409Z","updated_at":"2025-06-12T02:10:43.557Z","avatar_url":"https://github.com/PowerGridModel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2022 Contributors to the Power Grid Model project \u003cdynamic.grid.calculation@alliander.com\u003e\n\nSPDX-License-Identifier: MPL-2.0\n--\u003e\n\n# IEC-CIM-conversion-services (Beta)\nThis repo contains the IECCimToPGM and PGMToIECCim conversion services that [RSE S.p.A.](https://www.rse-web.it/) developed. They developed these services to integrate Power Grid Model into their DSO platform. Since there is a broader interest in IECCimToPGM and PGMToIECCim conversion services they will open source these services and contribute them to the Power Grid Model project. In the future, these services may be integrated into [power-grid-model-io](https://github.com/PowerGridModel/power-grid-model-io). \n\n# Notable contributors\nOur gratitude goes to the following contributors who have worked (and are still working) on these services before it became open source:\n- Gabriele Paludetto (RSE)\n- Francesca Soldan (RSE)\n- Enea Bionda (RSE)\n\n\n# Conversion services description\n\nThis service performs:\n- PGM data model transformation to IEC CIM\n- IEC CIM transformation to PGM data model.\n\nFor the transformation, rdflib python library is exploited.\nBefore launching the service, required libraries should be installed, using:\n### `pip install -r requirements.txt` \n\n\nIn the project directory, you can run:\n### `python Main.py --input inputFilePath --in_type inputType --out_type outputType --corr_id correlationID`\nwhere:\n1) inputFilePath: relative path to the input file (e.g. InputTransform/test.json; InputTransform/test.xml)\n2) inputType: cim15-301, cim17-301, cim15-cgmes, cim17-cgmes, pgm-json\n2) outputType: cim15-301, cim17-301, cim15-cgmes, cim17-cgmes, pgm-json (please note: transformations from IEC CIM to another IEC CIM version are not supported)\n3) correlationID: service correlation ID for unique identification (e.g. pgmTestNetwork)\n\nAs test command, you can run:\n### `python Main.py --input InputTransform/test.json --in_type pgm-json --out_type cim17-301 --corr_id pgmTestNetwork`\n### `python Main.py --input InputTransform/test.xml --in_type cim17-301 --out_type pgm-json --corr_id cimTestNetwork`\n\nBy default, the output file is saved in the folder OutputTransform. It is possible to specify the output folder in the command, using:\n--output_folder outputFolderPath\n\n## PGM to IEC CIM service\nThe service takes as input the pgm networks in json format. \nField names are set in config.cfg, together with the acceptable categorical values contained in columns:\n- breaker status (1,0)\n- node type (source, sym_load, sym_gen)\n- branch type (line, link, transformer)\n\nThe transformation requires the following steps:\n1) Input network is transformed from/to IEC CIM using rdflib functions\n2) Topology is calculated using networkx topological processor\n3) If cgmes is selected as output type, classes filtering to conform CGMES is performed\n4) xslt transformation and xml serialization are performed\n5) Output file is saved in default output folder or in the specified one through command line parameter\n\n## IEC CIM to PGM service\nThe service takes as input IEC CIM networks in RDF/XML format.\nDifferent versions (CIM 15 and CIM 17) are supported.\n\nThe output in PGM data model querying the IEC CIM network graph.\n\n## Known bugs/limitations\n- For the transformation PGM to IEC CIM: not all PGM elements are supported, but only node, line, sym_load, sym_gen, source, transformer. You are welcome to contribute by supporting more elements, or by adding issues for discussing the addition of elements.\n- For the transformation IEC CIM to PGM, not all IEC CIM elements are supported, only the most needed ones. Default values (not directly found in IEC CIM) are set for the transformation from lines and transformers. You are welcome to contribute by supporting more elements, or by adding issues for discussing the addition of elements.\n\n\n\n\n\n\n# License\nThis project is licensed under the Mozilla Public License, version 2.0 - see [LICENSE](LICENSE) for details.\n\n# Contributing\nPlease read [CODE_OF_CONDUCT](https://github.com/PowerGridModel/.github/blob/main/CODE_OF_CONDUCT.md) and [CONTRIBUTING](https://github.com/PowerGridModel/.github/blob/main/CONTRIBUTING.md) for details on the process \nfor submitting pull requests to us.\n\n# Contact\nPlease read [SUPPORT](https://github.com/PowerGridModel/.github/blob/main/SUPPORT.md) for how to connect and get into contact with the IEC-CIM-conversion-services-beta project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowergridmodel%2Fiec-cim-conversion-services-beta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpowergridmodel%2Fiec-cim-conversion-services-beta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowergridmodel%2Fiec-cim-conversion-services-beta/lists"}