From b69edbf56a0f1ab541e4936b1a1a7f8cbc8478cb Mon Sep 17 00:00:00 2001 From: Hallie Dunham <70401017+hdunham@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:11:28 -0600 Subject: [PATCH] (gen results) loop elec stor, don't hardcode "ElectricStorage" --- src/results/generator.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/results/generator.jl b/src/results/generator.jl index 22e6ab975..56d5d256e 100644 --- a/src/results/generator.jl +++ b/src/results/generator.jl @@ -90,7 +90,7 @@ function add_generator_results(m::JuMP.AbstractModel, p::MPCInputs, d::Dict; _n= r["variable_om_cost"] = round(value(m[:TotalPerUnitProdOMCosts]), digits=0) r["fuel_cost"] = round(value(m[:TotalGenFuelCosts]), digits=2) - if p.s.storage.attr["ElectricStorage"].size_kw > 0 + if any([p.s.storage.attr[b].size_kw for b in p.s.storage.types.elec] .> 0) generatorToBatt = @expression(m, [ts in p.time_steps], sum(m[:dvProductionToStorage][b, t, ts] for b in p.s.storage.types.elec, t in p.techs.gen)) r["to_battery_series_kw"] = round.(value.(generatorToBatt), digits=3).data