From 0417251b690176003d225bcd32ffdc77e1518dbc Mon Sep 17 00:00:00 2001 From: OUSTRY Antoine Date: Fri, 2 May 2025 08:24:15 +0200 Subject: [PATCH 1/6] Proposal for config file for complex modeling artifacts conversion --- .../src/cc_configuration/batteries.yaml | 119 ++++++++++++++++++ .../andromede-v1/test_andromede_v1_models.py | 5 + 2 files changed, 124 insertions(+) create mode 100644 src/andromede/input_converter/src/cc_configuration/batteries.yaml diff --git a/src/andromede/input_converter/src/cc_configuration/batteries.yaml b/src/andromede/input_converter/src/cc_configuration/batteries.yaml new file mode 100644 index 00000000..32c2580c --- /dev/null +++ b/src/andromede/input_converter/src/cc_configuration/batteries.yaml @@ -0,0 +1,119 @@ +# +# See AUTHORS.txt +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# SPDX-License-Identifier: MPL-2.0 +# +# This file is part of the Antares project. + +# Configuration file to convert a complex modelling artefact in an Antares study into an Andromede model. + +loop: + + iteration_key: zone #Key on which we iterate (for a given list of zone, we want to execute a loop : for zone in list_zone) + #In the following, the notation $zone$ means the value of the string variable "zone" + andromede-model: antares-historic.short-term-storage #we want to create components of such a model, with id being indexed by the iteration_key + andromede-component-id : battery_$zone$ + + + andromede-model-parameters-to-set-a-priori: + #TODO : we still have to see if the following parameters can be set a priori or have to be read in the Antares study,during the conversion. + #- id: lower_rule_curve + #- id: lower_rule_curve + #- id: p_max_injection_modulation # Read in p_max_injection + #- id: p_max_withdrawal_modulation # Read in p_max_withdrawal + + + - id: initial_level + time-dependent: false + scenario-dependent: false + value: -1.0 #TODO : The initial stock level constraint must be disabled or deleted in the Andromede ST storage model + + - id: inflows #No inflows in a battery model! + time-dependent: false + scenario-dependent: false + value: 0.0 + + + + antares-coupling-constraints-to-visit: + + - id : batteries_$zone$ + name: batteries_$zone$ + to-delete: True #This flag means that the constraint should be deleted from the Antares Study, if hybrid mode is targetted + parameters-to-store: + - id-target-andromede-model-parameter: efficiency_injection #target parameter in the andromede-model + location-in-legacy-study: $zone$%z_batteries #where to read the parameter in the Antares coupling constraint + multiplication-factor: -1 # The parameter we read in Antares coupling constraint should be multiplied by -1 to create target param + - id-target-andromede-model-parameter: efficiency_withdrawal #there are different naming conventions between Antares CC model for batteries and the short-term storage model + #=> therefore there is an intervertion between injection and withdrawal (this is no mistake) + location-in-legacy-study: $zone$.$zone$_batteries_inj + multiplication-factor: 1 + + + - id : battery_level_$zone$ + name : Battery_level_$zone$ + to-delete: True + parameters-to-store: / + + + antares-links-to-visit: + - id : $zone$%z_batteries + name : $zone$%z_batteries + to-delete: True + parameters-to-store: + - id-target-andromede-model-parameter : injection_nominal_capacity + location-in-legacy-study: link_capacity #TODO : find the right id to describe link capacity? @tbittar + multiplication-factor: 1 + + + antares-nodes-to-visit: / + + antares-clusters-to-visit: + - node.cluster_id: $zone$.$zone$_batteries_inj #node.cluster + to-delete: True + parameters-to-store: + - id-target-andromede-model-parameter : withdrawal_nominal_capacity + location-in-legacy-study: p_max_cluster #TODO : find the right id to describe cluster pmax? @tbittar + multiplication-factor: 1 + - node.cluster_id : z_batteries.z_batteries_batteries_$zone$_1 #node.cluster in Antares study + to-delete: True + parameters-to-store: + - id-target-andromede-model-parameter : reservoir_capacity + location-in-legacy-study: p_max_cluster #TODO : find the right id to describe cluster pmax? @tbittar + multiplication-factor: 1 + - node.cluster_id : z_batteries.z_batteries_batteries_$zone$_2 #node.cluster in Antares study + to-delete: True + parameters-to-store: / + + antares-load-to-visit: / + + andromede-connection-to-create: / + + area-connections-to-create: #Hybrid connection to create + - component: battery_$zone$ + port: injection + area: $zone$ + + + + +#We also have to delete the fictive node "z_batteries" + +loop: + iteration_key: / #No loop, just 1 iteration. + andromede-model : / + andromede-component-id : / + antares-nodes-to-visit: + - id : z_batteries + name: z_batteries #TBC + to-delete: True + parameters-to-store: / + antares-nodes-to-visit: / + antares-clusters-to-visit: + antares-load-to-visit: / + andromede-connection-to-create: / + hybrid-connection-to-create: / \ No newline at end of file diff --git a/tests/e2e/models/andromede-v1/test_andromede_v1_models.py b/tests/e2e/models/andromede-v1/test_andromede_v1_models.py index 2b8d2a75..68084caa 100644 --- a/tests/e2e/models/andromede-v1/test_andromede_v1_models.py +++ b/tests/e2e/models/andromede-v1/test_andromede_v1_models.py @@ -142,6 +142,11 @@ def test_model_behaviour( ) status = problem.solver.Solve() assert status == problem.solver.OPTIMAL + assert math.isclose( + problem.solver.Objective().Value(), + problem.solver.Objective().BestBound(), + rel_tol=relative_accuracy, + ) assert math.isclose( reference_values[k, 0], problem.solver.Objective().Value(), From 3d987d33fd9ed2370f75c46cf7354bbdac941a7f Mon Sep 17 00:00:00 2001 From: OUSTRY Antoine Date: Fri, 9 May 2025 18:40:46 +0200 Subject: [PATCH 2/6] V2 config file for building battery model from artifacts --- .../src/cc_configuration/batteries_v2.yaml | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 src/andromede/input_converter/src/cc_configuration/batteries_v2.yaml diff --git a/src/andromede/input_converter/src/cc_configuration/batteries_v2.yaml b/src/andromede/input_converter/src/cc_configuration/batteries_v2.yaml new file mode 100644 index 00000000..9fd5f07b --- /dev/null +++ b/src/andromede/input_converter/src/cc_configuration/batteries_v2.yaml @@ -0,0 +1,97 @@ +# +# See AUTHORS.txt +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# SPDX-License-Identifier: MPL-2.0 +# +# This file is part of the Antares project. + +# Configuration file to convert a complex modelling artefact in an Antares study into an Andromede model. + +loop: + + iteration-key: area #Key on which we iterate (for a given list of area, we want to execute a loop : for area in list_area) + + andromede-component-id: battery_$area$ + + andromede-model: antares-historic.short-term-storage + + parameters: + + - id: reservoir_capacity + time-dependent: true + scenario-dependent: true + value: + - path: input/thermal/series/z_batteries/z_batteries_batteries_$area$_1/series.txt + - multiplication_factor: 1 + - id: injection_nominal_capacity + time-dependent: true + scenario-dependent: true + value: + - link: $area$%z_batteries #TODO: change for path mention + - field: direct_capacity + - multiplication_factor: 1 + - id: withdrawal_nominal_capacity + time-dependent: true + scenario-dependent: true + value: + - path: input/thermal/series/$area$/$area$_batteries_inj/series.txt + - multiplication_factor: 1 + - id: efficiency_injection + time-dependent: false + scenario-dependent: false + value: + - binding_constraint: batteries_$area$ #TODO: change for path mention ? + - field : $area$%z_batteries + - multiplication_factor: -1 + - id: efficiency_withdrawal + time-dependent: false + scenario-dependent: false + value: + - binding_constraint: batteries_$area$ #TODO: change for path mention ? + - field : $area$.$area$_batteries_inj + - multiplication_factor: 1 + - id: lower_rule_curve + time-dependent: false + scenario-dependent: false + value: 0 #TODO : check if correct if the case in BP23 model + - id: upper_rule_curve + time-dependent: true + scenario-dependent: true + value: 1 #TODO : check if correct if the case in BP23 model + #- id: p_max_injection_modulation #TODO Could this be read from the link profile between the physical area and z_batteries ? + # time-dependent: true + # scenario-dependent: true + #- id: p_max_withdrawal_modulation # # TODO Could this be read from the availability series of thermal clusters in z_batteries ? + # time-dependent: true + # scenario-dependent: true + - id: inflows + time-dependent: false + scenario-dependent: false + value: 0 + - id: initial_level + time-dependent: false + scenario-dependent: false + value: 0.5 #TODO : check if correct if the case in BP23 model + + + area-connections: #Syntax for hybrid connections: https://antares-simulator.readthedocs.io/en/latest/user-guide/solver/08-hybrid-studies/ + - component: battery_$area$ + port: injection_port + area: $area$ + + legacy-objects-to-delete: + - binding_constraints: + - id : batteries_$area$ + - id : battery_level_$area$ + - links: + - id : $area$%z_batteries + - nodes: + - id : z_batteries #Warning: does not depend on area + - thermal_clusters: + - id : $area$.$area$_batteries_inj + - id : z_batteries.z_batteries_batteries_$area$_1 + - id : z_batteries.z_batteries_batteries_$area$_2 From 77ef67903e555844c46f4511e0ee87e748e2adae Mon Sep 17 00:00:00 2001 From: OUSTRY Antoine Date: Mon, 12 May 2025 16:46:47 +0200 Subject: [PATCH 3/6] V2 input_converter config for battery models --- .../src/cc_configuration/batteries_v2.yaml | 83 +++++++++++-------- .../reference_models/andromede_v1_models.yml | 56 +++++++++++++ 2 files changed, 106 insertions(+), 33 deletions(-) diff --git a/src/andromede/input_converter/src/cc_configuration/batteries_v2.yaml b/src/andromede/input_converter/src/cc_configuration/batteries_v2.yaml index 9fd5f07b..3eca96f9 100644 --- a/src/andromede/input_converter/src/cc_configuration/batteries_v2.yaml +++ b/src/andromede/input_converter/src/cc_configuration/batteries_v2.yaml @@ -11,74 +11,91 @@ # Configuration file to convert a complex modelling artefact in an Antares study into an Andromede model. +#TODOs : +#*idem pour battery_pcomp + loop: iteration-key: area #Key on which we iterate (for a given list of area, we want to execute a loop : for area in list_area) andromede-component-id: battery_$area$ - andromede-model: antares-historic.short-term-storage + andromede-model: andromede-v1-models.battery - parameters: + parameters: - id: reservoir_capacity - time-dependent: true - scenario-dependent: true + time-dependent: false + scenario-dependent: false value: - - path: input/thermal/series/z_batteries/z_batteries_batteries_$area$_1/series.txt + - cluster: z_batteries_batteries_$area$_1 + - field: nominalcapacity #field in the file "list.ini" - multiplication_factor: 1 - id: injection_nominal_capacity - time-dependent: true - scenario-dependent: true + time-dependent: false + scenario-dependent: false value: - - link: $area$%z_batteries #TODO: change for path mention - - field: direct_capacity - - multiplication_factor: 1 + - path: input/links/$area$/capacities/z_batteries_direct.txt + - column: 0 #To be read in first column + - operator: max - id: withdrawal_nominal_capacity - time-dependent: true - scenario-dependent: true - value: - - path: input/thermal/series/$area$/$area$_batteries_inj/series.txt - - multiplication_factor: 1 + time-dependent: false + scenario-dependent: false + value: + - cluster: $area$_batteries_inj + - field: nominalcapacity + - multiplication_factor: 1 #field in the file "list.ini" - id: efficiency_injection time-dependent: false scenario-dependent: false value: - - binding_constraint: batteries_$area$ #TODO: change for path mention ? - - field : $area$%z_batteries + - binding_constraint: batteries_$area$ + - field : $area$%z_batteries #field in the file corresponding to the binding constraint - multiplication_factor: -1 - id: efficiency_withdrawal time-dependent: false scenario-dependent: false value: - - binding_constraint: batteries_$area$ #TODO: change for path mention ? + - binding_constraint: batteries_$area$ - field : $area$.$area$_batteries_inj - multiplication_factor: 1 - id: lower_rule_curve time-dependent: false scenario-dependent: false - value: 0 #TODO : check if correct if the case in BP23 model + value: 0 - id: upper_rule_curve time-dependent: true - scenario-dependent: true - value: 1 #TODO : check if correct if the case in BP23 model - #- id: p_max_injection_modulation #TODO Could this be read from the link profile between the physical area and z_batteries ? - # time-dependent: true - # scenario-dependent: true - #- id: p_max_withdrawal_modulation # # TODO Could this be read from the availability series of thermal clusters in z_batteries ? - # time-dependent: true - # scenario-dependent: true - - id: inflows - time-dependent: false scenario-dependent: false - value: 0 - - id: initial_level - time-dependent: false + value: + - path: input/thermal/series/z_batteries/z_batteries_batteries_$area$_1/series.txt + - column: 0 #To be read in first column + - multiplication_factor: 1.0 /reservoir_capacity #Reference to a constant parameter already defined above. + - id: p_max_injection_modulation + time-dependent: true + scenario-dependent: false + value: + - path: input/links/$area$/capacities/z_batteries_direct.txt + - column: 0 #To be read in first column + - multiplication_factor: 1.0 / injection_nominal_capacity #Reference to a constant parameter already defined above. + - id: p_max_withdrawal_modulation + time-dependent: true scenario-dependent: false - value: 0.5 #TODO : check if correct if the case in BP23 model + value: + - path: input/thermal/series/$area$/$area$_batteries_inj/series.txt + - column: 0 #To be read in first column + - multiplication_factor: 1.0 / withdrawal_nominal_capacity #Reference to a constant parameter already defined above. + - id: marginal_cost + time-dependent: true + scenario-dependent: false + value: + - path: input/links/$area$/capacities/z_batteries_parameters + - column: 0 #To be read in first column (direct hurdle costs) + - multiplication_factor: 1.0 area-connections: #Syntax for hybrid connections: https://antares-simulator.readthedocs.io/en/latest/user-guide/solver/08-hybrid-studies/ + #To handle the case of hybrid studies, where we replace complex modeling artifacts for batteries by a model. + #TODO : handle the case of pure Andromede studies - component: battery_$area$ port: injection_port area: $area$ diff --git a/src/andromede/libs/reference_models/andromede_v1_models.yml b/src/andromede/libs/reference_models/andromede_v1_models.yml index 6a095179..e495e18e 100644 --- a/src/andromede/libs/reference_models/andromede_v1_models.yml +++ b/src/andromede/libs/reference_models/andromede_v1_models.yml @@ -66,3 +66,59 @@ library: - port: hydrogen_port field: flow definition: efficiency * power + + - id: battery_BP23 + parameters: + - id: reservoir_capacity + time-dependent: false + scenario-dependent: false + - id: injection_nominal_capacity + time-dependent: false + scenario-dependent: false + - id: withdrawal_nominal_capacity + time-dependent: false + scenario-dependent: false + - id: efficiency_injection + time-dependent: false + scenario-dependent: false + - id: efficiency_withdrawal + time-dependent: false + scenario-dependent: false + - id: lower_rule_curve + time-dependent: true + scenario-dependent: true + - id: upper_rule_curve + time-dependent: true + scenario-dependent: true + - id: p_max_injection_modulation # Read in p_max_injection + time-dependent: true + scenario-dependent: true + - id: p_max_withdrawal_modulation # Read in p_max_withdrawal + time-dependent: true + scenario-dependent: true + - id: marginal_cost + time-dependent: true + scenario-dependent: false + + + variables: + - id: p_injection + lower-bound: 0 + upper-bound: p_max_injection_modulation * injection_nominal_capacity # p_max_injection_modulation is a timeseries with adimensional values between 0 and 1 + - id: p_withdrawal + lower-bound: 0 + upper-bound: p_max_withdrawal_modulation * withdrawal_nominal_capacity # p_max_withdrawal_modulation is a timeseries with adimensional values between 0 and 1 + - id: level + lower-bound: lower_rule_curve * reservoir_capacity + upper-bound: upper_rule_curve * reservoir_capacity + ports: + - id: injection_port + type: flow + port-field-definitions: + - port: injection_port + field: flow + definition: p_withdrawal - p_injection + constraints: + - id: level_equation + expression: level[t+1] = level + efficiency_injection * p_injection - efficiency_withdrawal * p_withdrawal + objective: expec(sum(marginal_cost * p_injection)) From cd4a06651cbf0d8b233d4e0d58ce3a8c0019b6cc Mon Sep 17 00:00:00 2001 From: Thomas Bittar Date: Fri, 16 May 2025 11:25:01 +0200 Subject: [PATCH 4/6] Improve readability and consistency --- .../src/cc_configuration/batteries_v2.yaml | 220 ++++++++++-------- 1 file changed, 128 insertions(+), 92 deletions(-) diff --git a/src/andromede/input_converter/src/cc_configuration/batteries_v2.yaml b/src/andromede/input_converter/src/cc_configuration/batteries_v2.yaml index 3eca96f9..27fcf7f7 100644 --- a/src/andromede/input_converter/src/cc_configuration/batteries_v2.yaml +++ b/src/andromede/input_converter/src/cc_configuration/batteries_v2.yaml @@ -14,101 +14,137 @@ #TODOs : #*idem pour battery_pcomp -loop: - - iteration-key: area #Key on which we iterate (for a given list of area, we want to execute a loop : for area in list_area) - - andromede-component-id: battery_$area$ - - andromede-model: andromede-v1-models.battery - - parameters: - - - id: reservoir_capacity - time-dependent: false - scenario-dependent: false - value: - - cluster: z_batteries_batteries_$area$_1 - - field: nominalcapacity #field in the file "list.ini" - - multiplication_factor: 1 - - id: injection_nominal_capacity - time-dependent: false - scenario-dependent: false - value: - - path: input/links/$area$/capacities/z_batteries_direct.txt - - column: 0 #To be read in first column - - operator: max - - id: withdrawal_nominal_capacity - time-dependent: false - scenario-dependent: false - value: - - cluster: $area$_batteries_inj - - field: nominalcapacity - - multiplication_factor: 1 #field in the file "list.ini" - - id: efficiency_injection - time-dependent: false - scenario-dependent: false - value: - - binding_constraint: batteries_$area$ - - field : $area$%z_batteries #field in the file corresponding to the binding constraint - - multiplication_factor: -1 - - id: efficiency_withdrawal - time-dependent: false - scenario-dependent: false - value: - - binding_constraint: batteries_$area$ - - field : $area$.$area$_batteries_inj - - multiplication_factor: 1 - - id: lower_rule_curve - time-dependent: false - scenario-dependent: false - value: 0 - - id: upper_rule_curve - time-dependent: true - scenario-dependent: false - value: - - path: input/thermal/series/z_batteries/z_batteries_batteries_$area$_1/series.txt - - column: 0 #To be read in first column - - multiplication_factor: 1.0 /reservoir_capacity #Reference to a constant parameter already defined above. - - id: p_max_injection_modulation - time-dependent: true - scenario-dependent: false - value: - - path: input/links/$area$/capacities/z_batteries_direct.txt - - column: 0 #To be read in first column - - multiplication_factor: 1.0 / injection_nominal_capacity #Reference to a constant parameter already defined above. - - id: p_max_withdrawal_modulation - time-dependent: true - scenario-dependent: false - value: - - path: input/thermal/series/$area$/$area$_batteries_inj/series.txt - - column: 0 #To be read in first column - - multiplication_factor: 1.0 / withdrawal_nominal_capacity #Reference to a constant parameter already defined above. - - id: marginal_cost - time-dependent: true - scenario-dependent: false - value: - - path: input/links/$area$/capacities/z_batteries_parameters - - column: 0 #To be read in first column (direct hurdle costs) - - multiplication_factor: 1.0 +template: + name: battery + model: andromede-v1-models.battery + template-parameters: + - name: area + description: "Area identifier for the battery component" + component: + id: battery_${area} + parameters: + - id: reservoir_capacity + time-dependent: false + scenario-dependent: false + value: + type: cluster_data + data: + area: z_batteries + cluster: z_batteries_batteries_${area}_1 + field: nominalcapacity #field in the file "list.ini" + + - id: injection_nominal_capacity + time-dependent: false + scenario-dependent: false + value: + type: from_timeseries + data: + path: input/links/${area}/capacities/z_batteries_direct.txt + column: 0 #Read the first column + operation: + type: max + + - id: withdrawal_nominal_capacity + time-dependent: false + scenario-dependent: false + value: + type: cluster_data + data: + area: ${area} + cluster: ${area}_batteries_inj + field: nominalcapacity #field in the file "list.ini" + + - id: efficiency_injection + time-dependent: false + scenario-dependent: false + value: + type: binding_constraint_data + data: + binding-constraint-id: batteries_${area} + field: ${area}%z_batteries + operation: + multiply_by: -1 + + - id: efficiency_withdrawal + time-dependent: false + scenario-dependent: false + value: + type: binding_constraint_data + data: + binding-constraint-id: batteries_${area} + field: ${area}.${area}_batteries_inj + + - id: lower_rule_curve + time-dependent: false + scenario-dependent: false + value: + type: constant + data: 0 + + - id: upper_rule_curve + time-dependent: true + scenario-dependent: false + value: + type: from_timeseries + data: + path: input/thermal/series/z_batteries/z_batteries_batteries_${area}_1/series.txt + column: 0 + operation: + divide_by: reservoir_capacity + + - id: p_max_injection_modulation + time-dependent: true + scenario-dependent: false + value: + type: from_timeseries + data: + path: input/links/${area}/capacities/z_batteries_direct.txt + column: 0 + operation: + divide_by: injection_nominal_capacity + + - id: p_max_withdrawal_modulation + time-dependent: true + scenario-dependent: false + value: + type: from_timeseries + data: + path: input/thermal/series/${area}/${area}_batteries_inj/series.txt + column: 0 + operation: + divide_by: withdrawal_nominal_capacity + + - id: marginal_cost + time-dependent: true + scenario-dependent: false + value: + type: from_timeseries + data: + path: input/links/${area}/capacities/z_batteries_parameters + column: 0 area-connections: #Syntax for hybrid connections: https://antares-simulator.readthedocs.io/en/latest/user-guide/solver/08-hybrid-studies/ #To handle the case of hybrid studies, where we replace complex modeling artifacts for batteries by a model. - #TODO : handle the case of pure Andromede studies - - component: battery_$area$ - port: injection_port - area: $area$ + - component: battery_${area} + port: injection_port + area: ${area} + + connections: + - component1: battery_${area} + port1: injection_port + component2: ${area} + port2: balance_port legacy-objects-to-delete: - - binding_constraints: - - id : batteries_$area$ - - id : battery_level_$area$ - - links: - - id : $area$%z_batteries - - nodes: - - id : z_batteries #Warning: does not depend on area - - thermal_clusters: - - id : $area$.$area$_batteries_inj - - id : z_batteries.z_batteries_batteries_$area$_1 - - id : z_batteries.z_batteries_batteries_$area$_2 + binding_constraints: + - id: batteries_${area} + - id: battery_level_${area} + links: + - id: ${area}%z_batteries + nodes: + - id: z_batteries + thermal_clusters: + - id: ${area}.${area}_batteries_inj + - id: z_batteries.z_batteries_batteries_${area}_1 + - id: z_batteries.z_batteries_batteries_${area}_2 From 393c6e9620e2048c865edf7df82fb3c0262aedea Mon Sep 17 00:00:00 2001 From: Thomas Bittar Date: Fri, 16 May 2025 11:26:25 +0200 Subject: [PATCH 5/6] Renaming for consistency --- .../src/cc_configuration/batteries.yaml | 119 ------------------ .../{batteries_v2.yaml => battery.yaml} | 0 .../reference_models/andromede_v1_models.yml | 2 +- 3 files changed, 1 insertion(+), 120 deletions(-) delete mode 100644 src/andromede/input_converter/src/cc_configuration/batteries.yaml rename src/andromede/input_converter/src/cc_configuration/{batteries_v2.yaml => battery.yaml} (100%) diff --git a/src/andromede/input_converter/src/cc_configuration/batteries.yaml b/src/andromede/input_converter/src/cc_configuration/batteries.yaml deleted file mode 100644 index 32c2580c..00000000 --- a/src/andromede/input_converter/src/cc_configuration/batteries.yaml +++ /dev/null @@ -1,119 +0,0 @@ -# -# See AUTHORS.txt -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# SPDX-License-Identifier: MPL-2.0 -# -# This file is part of the Antares project. - -# Configuration file to convert a complex modelling artefact in an Antares study into an Andromede model. - -loop: - - iteration_key: zone #Key on which we iterate (for a given list of zone, we want to execute a loop : for zone in list_zone) - #In the following, the notation $zone$ means the value of the string variable "zone" - andromede-model: antares-historic.short-term-storage #we want to create components of such a model, with id being indexed by the iteration_key - andromede-component-id : battery_$zone$ - - - andromede-model-parameters-to-set-a-priori: - #TODO : we still have to see if the following parameters can be set a priori or have to be read in the Antares study,during the conversion. - #- id: lower_rule_curve - #- id: lower_rule_curve - #- id: p_max_injection_modulation # Read in p_max_injection - #- id: p_max_withdrawal_modulation # Read in p_max_withdrawal - - - - id: initial_level - time-dependent: false - scenario-dependent: false - value: -1.0 #TODO : The initial stock level constraint must be disabled or deleted in the Andromede ST storage model - - - id: inflows #No inflows in a battery model! - time-dependent: false - scenario-dependent: false - value: 0.0 - - - - antares-coupling-constraints-to-visit: - - - id : batteries_$zone$ - name: batteries_$zone$ - to-delete: True #This flag means that the constraint should be deleted from the Antares Study, if hybrid mode is targetted - parameters-to-store: - - id-target-andromede-model-parameter: efficiency_injection #target parameter in the andromede-model - location-in-legacy-study: $zone$%z_batteries #where to read the parameter in the Antares coupling constraint - multiplication-factor: -1 # The parameter we read in Antares coupling constraint should be multiplied by -1 to create target param - - id-target-andromede-model-parameter: efficiency_withdrawal #there are different naming conventions between Antares CC model for batteries and the short-term storage model - #=> therefore there is an intervertion between injection and withdrawal (this is no mistake) - location-in-legacy-study: $zone$.$zone$_batteries_inj - multiplication-factor: 1 - - - - id : battery_level_$zone$ - name : Battery_level_$zone$ - to-delete: True - parameters-to-store: / - - - antares-links-to-visit: - - id : $zone$%z_batteries - name : $zone$%z_batteries - to-delete: True - parameters-to-store: - - id-target-andromede-model-parameter : injection_nominal_capacity - location-in-legacy-study: link_capacity #TODO : find the right id to describe link capacity? @tbittar - multiplication-factor: 1 - - - antares-nodes-to-visit: / - - antares-clusters-to-visit: - - node.cluster_id: $zone$.$zone$_batteries_inj #node.cluster - to-delete: True - parameters-to-store: - - id-target-andromede-model-parameter : withdrawal_nominal_capacity - location-in-legacy-study: p_max_cluster #TODO : find the right id to describe cluster pmax? @tbittar - multiplication-factor: 1 - - node.cluster_id : z_batteries.z_batteries_batteries_$zone$_1 #node.cluster in Antares study - to-delete: True - parameters-to-store: - - id-target-andromede-model-parameter : reservoir_capacity - location-in-legacy-study: p_max_cluster #TODO : find the right id to describe cluster pmax? @tbittar - multiplication-factor: 1 - - node.cluster_id : z_batteries.z_batteries_batteries_$zone$_2 #node.cluster in Antares study - to-delete: True - parameters-to-store: / - - antares-load-to-visit: / - - andromede-connection-to-create: / - - area-connections-to-create: #Hybrid connection to create - - component: battery_$zone$ - port: injection - area: $zone$ - - - - -#We also have to delete the fictive node "z_batteries" - -loop: - iteration_key: / #No loop, just 1 iteration. - andromede-model : / - andromede-component-id : / - antares-nodes-to-visit: - - id : z_batteries - name: z_batteries #TBC - to-delete: True - parameters-to-store: / - antares-nodes-to-visit: / - antares-clusters-to-visit: - antares-load-to-visit: / - andromede-connection-to-create: / - hybrid-connection-to-create: / \ No newline at end of file diff --git a/src/andromede/input_converter/src/cc_configuration/batteries_v2.yaml b/src/andromede/input_converter/src/cc_configuration/battery.yaml similarity index 100% rename from src/andromede/input_converter/src/cc_configuration/batteries_v2.yaml rename to src/andromede/input_converter/src/cc_configuration/battery.yaml diff --git a/src/andromede/libs/reference_models/andromede_v1_models.yml b/src/andromede/libs/reference_models/andromede_v1_models.yml index e495e18e..293f8c9e 100644 --- a/src/andromede/libs/reference_models/andromede_v1_models.yml +++ b/src/andromede/libs/reference_models/andromede_v1_models.yml @@ -67,7 +67,7 @@ library: field: flow definition: efficiency * power - - id: battery_BP23 + - id: battery parameters: - id: reservoir_capacity time-dependent: false From c3deb1d6e5b0c23970b1be6a22a54a94c9159f41 Mon Sep 17 00:00:00 2001 From: Thomas Bittar Date: Fri, 16 May 2025 11:34:23 +0200 Subject: [PATCH 6/6] Add generator version compatibility to battery configuration --- src/andromede/input_converter/src/cc_configuration/battery.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/andromede/input_converter/src/cc_configuration/battery.yaml b/src/andromede/input_converter/src/cc_configuration/battery.yaml index 27fcf7f7..7ad445a2 100644 --- a/src/andromede/input_converter/src/cc_configuration/battery.yaml +++ b/src/andromede/input_converter/src/cc_configuration/battery.yaml @@ -16,6 +16,7 @@ template: name: battery + generator-version-compatibility: X.Y #TODO: find this information model: andromede-v1-models.battery template-parameters: - name: area