From 06e91f42a81252f8db746782025cb85b03c0ebf8 Mon Sep 17 00:00:00 2001 From: mr0321 <145195994+mr0321@users.noreply.github.com> Date: Fri, 27 Jun 2025 14:19:41 +0300 Subject: [PATCH] adds export parameter for pypowsybl 1.11.1 --- emf/model_merger/merge_functions.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/emf/model_merger/merge_functions.py b/emf/model_merger/merge_functions.py index fbf0fa9e..be6e29a6 100644 --- a/emf/model_merger/merge_functions.py +++ b/emf/model_merger/merge_functions.py @@ -63,9 +63,13 @@ def export_merged_model(network: pypowsybl.network, "iidm.export.cgmes.modeling-authority-set": opdm_object_meta['pmd:modelingAuthoritySet'], "iidm.export.cgmes.base-name": file_base_name, "iidm.export.cgmes.profiles": profiles, - "iidm.export.cgmes.naming-strategy": "cgmes-fix-all-invalid-ids", # identity, cgmes, cgmes-fix-all-invalid-ids + # For missing instances like "SupplyStation" + "iidm.export.cgmes.topology-kind": 'NODE_BREAKER', + # cgmes-fix-all-invalid-ids fixes non-standard uuid's. Can cause danglingReference errors + # "iidm.export.cgmes.naming-strategy": "cgmes-fix-all-invalid-ids", # identity, cgmes, cgmes-fix-all-invalid-ids "iidm.export.cgmes.export-sv-injections-for-slacks": "False", - "iidm.export.cgmes.export-boundary-power-flows": "False", + # False sets all boundary flows to zero causing Kirchhoff 1st law and SvPowerFlowBranchInstances2 errors + # "iidm.export.cgmes.export-boundary-power-flows": "False", "iidm.export.cgmes.cgm_export": cgm_export_flag, }