From a5b4283ed394d910794c4476e43615deec9b3efb Mon Sep 17 00:00:00 2001 From: Jacob Schwartz Date: Wed, 18 Sep 2024 16:14:17 -0400 Subject: [PATCH] Create total_parasitic via macro --- src/model/resources/fusion/fusion.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/model/resources/fusion/fusion.jl b/src/model/resources/fusion/fusion.jl index 6a6b7d80c..9ec629bda 100644 --- a/src/model/resources/fusion/fusion.jl +++ b/src/model/resources/fusion/fusion.jl @@ -463,6 +463,8 @@ function fusion_total_parasitic_power!( resource_component, r_id::Int ) + T = inputs["T"] + from_model(f::Function) = EP[Symbol(f(resource_component))] ePassive = from_model(fusion_parasitic_passive_name) @@ -471,7 +473,7 @@ function fusion_total_parasitic_power!( total_parasitic = Symbol(fusion_parasitic_total_name(resource_component)) - EP[total_parasitic] = ePassive + eActive + eStartEnergy + EP[total_parasitic] = @expression(EP, [t in 1:T], ePassive[t] + eActive[t] + eStartEnergy[t]) union!(inputs[FUSION_PARASITIC_POWER], (total_parasitic,)) end