From 71dcd85022112698af2d87cc8887dc3ca085ee9b Mon Sep 17 00:00:00 2001 From: "Zink, Zephyr" Date: Thu, 17 Sep 2026 16:13:06 -0600 Subject: [PATCH] light support for breakers and sectionalizers as switches --- src/ditto/readers/cyme/components/matrix_impedance_switch.py | 2 +- .../cyme/equipment/matrix_impedance_switch_equipment.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ditto/readers/cyme/components/matrix_impedance_switch.py b/src/ditto/readers/cyme/components/matrix_impedance_switch.py index 3b6be68..0a36d55 100644 --- a/src/ditto/readers/cyme/components/matrix_impedance_switch.py +++ b/src/ditto/readers/cyme/components/matrix_impedance_switch.py @@ -14,7 +14,7 @@ def __init__(self, system, units=ModelUnitSystem): super().__init__(system, units=units) cyme_file = "Network" - cyme_section = "SWITCH SETTING" + cyme_section = ["SWITCH SETTING", "BREAKER SETTING", "SECTIONALIZER SETTING"] def parse(self, row, used_sections, section_id_sections): name = self.map_name(row) diff --git a/src/ditto/readers/cyme/equipment/matrix_impedance_switch_equipment.py b/src/ditto/readers/cyme/equipment/matrix_impedance_switch_equipment.py index b78733d..2bb3f3e 100644 --- a/src/ditto/readers/cyme/equipment/matrix_impedance_switch_equipment.py +++ b/src/ditto/readers/cyme/equipment/matrix_impedance_switch_equipment.py @@ -14,10 +14,13 @@ def __init__(self, system, units=ModelUnitSystem): super().__init__(system, units=units) cyme_file = "Equipment" - cyme_section = "SWITCH" + cyme_section = ["SWITCH", "BREAKER", "SECTIONALIZER"] def parse(self, row, phases): + name = self.map_name(row, phases) + if len(list(self.system.list_components_by_name(MatrixImpedanceSwitchEquipment, name))) > 0: + return None r_matrix = self.map_r_matrix(phases) x_matrix = self.map_x_matrix(phases) c_matrix = self.map_c_matrix(phases)