From 1c4eb6889a24809651002e06b35ab4d215626d62 Mon Sep 17 00:00:00 2001 From: Jacob Schwartz Date: Tue, 5 Dec 2023 11:55:20 -0500 Subject: [PATCH] Move function --- src/model/resources/fusion/fusion.jl | 11 +++++++++++ .../fusion/fusion_policy_adjustments.jl | 16 ---------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/model/resources/fusion/fusion.jl b/src/model/resources/fusion/fusion.jl index b1c0f23697..74dc6c9213 100644 --- a/src/model/resources/fusion/fusion.jl +++ b/src/model/resources/fusion/fusion.jl @@ -486,3 +486,14 @@ function fusion_annual_parasitic_power(EP, inputs, resource_component::AbstractS annual_parasitic = weight' * eTotalParasitic return annual_parasitic end + +function thermal_fusion_annual_parasitic_power(EP::Model, inputs::Dict, setup::Dict)::Vector{Float64} + dfGen = inputs["dfGen"] + scale_factor = setup["ParameterScale"] == 1 ? ModelScalingFactor : 1 + FUSION = resources_with_fusion(dfGen) + + resource_component = dfGen[FUSION, :Resource] + + expr = fusion_annual_parasitic_power.(Ref(EP), Ref(inputs), resource_component) + return scale_factor * value.(expr) +end diff --git a/src/model/resources/fusion/fusion_policy_adjustments.jl b/src/model/resources/fusion/fusion_policy_adjustments.jl index f12c8e7e22..873e831ceb 100644 --- a/src/model/resources/fusion/fusion_policy_adjustments.jl +++ b/src/model/resources/fusion/fusion_policy_adjustments.jl @@ -119,19 +119,3 @@ function fusion_parasitic_power_adjust_energy_share_requirement!(EP, inputs) end end -################################# -# -# For various outputs -# -################################# - -function thermal_fusion_annual_parasitic_power(EP::Model, inputs::Dict, setup::Dict)::Vector{Float64} - dfGen = inputs["dfGen"] - scale_factor = setup["ParameterScale"] == 1 ? ModelScalingFactor : 1 - FUSION = resources_with_fusion(dfGen) - - resource_component = dfGen[FUSION, :Resource] - - expr = fusion_annual_parasitic_power.(Ref(EP), Ref(inputs), resource_component) - return scale_factor * value.(expr) -end