From 6f2ada47088510b93c90590302aec8804c21dba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Espen=20Flo=20B=C3=B8dal?= Date: Tue, 25 Nov 2025 17:28:32 +0100 Subject: [PATCH 1/2] Fixed bug related to investmentdata for hydro reservoirs and level parameter. --- ext/EMIExt/checks.jl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ext/EMIExt/checks.jl b/ext/EMIExt/checks.jl index 3f185008..577efb00 100644 --- a/ext/EMIExt/checks.jl +++ b/ext/EMIExt/checks.jl @@ -53,14 +53,16 @@ function EMB.check_node_data( return end - for cap_fields ∈ fieldnames(typeof(data)) - sub_data = getfield(data, cap_fields) + cap_map = Dict(:charge => charge, :level => level, :discharge => discharge) + + for (cap, cap_fun) ∈ cap_map + sub_data = getfield(data, cap) isnothing(sub_data) && continue check_inv_data( sub_data, - EMB.capacity(getproperty(n, cap_fields)), + EMB.capacity(cap_fun(n)), 𝒯, - " of field `" * String(cap_fields) * "`", + " of field `" * String(cap) * "`", check_timeprofiles, ) end From b0c09ebefe427e1a3574760c855ed8892afd3640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Espen=20Flo=20B=C3=B8dal?= Date: Wed, 26 Nov 2025 09:27:38 +0100 Subject: [PATCH 2/2] Updated NEWS.md --- NEWS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.md b/NEWS.md index 5d040163..a82f3991 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,11 @@ # Release notes +## Unversioned + +### Bugfixes + +* Fix a bug in which field names for the capacities of a `Storage` node resulted in error message for the investment data checks. + ## Version 0.9.3 (2025-10-23) ## Bugfixes