diff --git a/CHANGELOG.md b/CHANGELOG.md index ef7bfc1..28d8219 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. ### Removed ### Fixed +- Fix emInput from parent_em to controlling_em [#333](https://github.com/ie3-institute/pypsdm/issues/333) ## 0.0.6 diff --git a/pypsdm/models/input/create/participants.py b/pypsdm/models/input/create/participants.py index 66eebe3..84304f0 100644 --- a/pypsdm/models/input/create/participants.py +++ b/pypsdm/models/input/create/participants.py @@ -351,7 +351,7 @@ def create_loads(data_dict): def create_energy_management_systems_data( id, control_strategy, - parent_em=None, + controlling_em=None, q_characteristics=None, uuid=None, operates_from=None, @@ -366,7 +366,7 @@ def create_energy_management_systems_data( { "id": id, "control_strategy": control_strategy, - "parent_em": parent_em, + "controlling_em": controlling_em, "q_characteristics": q_characteristics, "operates_from": operates_from, "operates_until": operates_until, diff --git a/pypsdm/models/input/participant/em.py b/pypsdm/models/input/participant/em.py index 52ef25b..fc9a359 100644 --- a/pypsdm/models/input/participant/em.py +++ b/pypsdm/models/input/participant/em.py @@ -21,12 +21,12 @@ def control_strategy(self) -> Series: return self.data["control_strategy"] @property - def parent_em(self) -> Series: - return self.data["parent_em"] + def controlling_em(self) -> Series: + return self.data["controlling_em"] @staticmethod def attributes() -> list[str]: return Entities.attributes() + [ "control_strategy", - "parent_em", + "controlling_em", ] diff --git a/tests/resources/simple_grid/input/em_input.csv b/tests/resources/simple_grid/input/em_input.csv index 6776411..ffc7930 100644 --- a/tests/resources/simple_grid/input/em_input.csv +++ b/tests/resources/simple_grid/input/em_input.csv @@ -1,4 +1,4 @@ -uuid,id,parent_em,control_strategy,operates_from,operates_until,operator +uuid,id,controlling_em,control_strategy,operates_from,operates_until,operator db1a151e-8e52-4b4d-8600-0fcd827d3e77,EMS_NS_02,,PRIORITIZED,,, d9571711-9cf7-4bad-bc15-c1879841892f,EMS_NS_03,,PRIORITIZED,,, e4c3c9a7-6c4e-4908-b537-3247f59eff1c,EMS_NS_04,,PRIORITIZED,,, diff --git a/tests/resources/vn_simona/input/em_input.csv b/tests/resources/vn_simona/input/em_input.csv index fc67989..08c5f4b 100644 --- a/tests/resources/vn_simona/input/em_input.csv +++ b/tests/resources/vn_simona/input/em_input.csv @@ -1,2 +1,2 @@ -uuid,control_strategy,id,parent_em,operates_from,operates_until,operator +uuid,control_strategy,id,controlling_em,operates_from,operates_until,operator 6fc12c35-f118-4c33-aecf-9f77e7639939,PRIORITIZED,test_em_1,,,,