From c06660b5ff17c95af3513d82bbbd2c6ec26579e5 Mon Sep 17 00:00:00 2001 From: ql0320 Date: Mon, 19 Feb 2024 14:40:46 -0500 Subject: [PATCH] Add units to fuel outputs; fix bugs in fuel.jl --- src/model/core/fuel.jl | 8 ++++---- src/write_outputs/write_fuel_consumption.jl | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/model/core/fuel.jl b/src/model/core/fuel.jl index 58137a9083..39931a750e 100644 --- a/src/model/core/fuel.jl +++ b/src/model/core/fuel.jl @@ -111,10 +111,10 @@ function fuel!(EP::Model, inputs::Dict, setup::Dict) min_cofire_start =inputs["MIN_COFIRE_START"] max_cofire_start =inputs["MAX_COFIRE_START"] - COFIRE_MAX = [findall(g -> max_cofire_cols(g, tag=1) < 1, gen[MULTI_FUELS]) for i in 1:max_fuels] - COFIRE_MAX_START = [findall(g -> max_cofire_start_cols(g, tag=1) < 1, gen[MULTI_FUELS]) for i in 1:max_fuels] - COFIRE_MIN = [findall(g -> min_cofire_cols(g, tag=1) < 1, gen[MULTI_FUELS]) for i in 1:max_fuels] - COFIRE_MIN_START = [findall(g -> min_cofire_start_cols(g, tag=1) < 1, gen[MULTI_FUELS]) for i in 1:max_fuels] + COFIRE_MAX = [findall(g -> max_cofire_cols(g, tag=i) < 1, gen[MULTI_FUELS]) for i in 1:max_fuels] + COFIRE_MAX_START = [findall(g -> max_cofire_start_cols(g, tag=i) < 1, gen[MULTI_FUELS]) for i in 1:max_fuels] + COFIRE_MIN = [findall(g -> min_cofire_cols(g, tag=i) < 1, gen[MULTI_FUELS]) for i in 1:max_fuels] + COFIRE_MIN_START = [findall(g -> min_cofire_start_cols(g, tag=i) < 1, gen[MULTI_FUELS]) for i in 1:max_fuels] @variable(EP, vMulFuels[y in MULTI_FUELS, i = 1:max_fuels, t = 1:T] >= 0) @variable(EP, vMulStartFuels[y in MULTI_FUELS, i = 1:max_fuels, t = 1:T] >= 0) diff --git a/src/write_outputs/write_fuel_consumption.jl b/src/write_outputs/write_fuel_consumption.jl index d66f934130..427e318a4c 100644 --- a/src/write_outputs/write_fuel_consumption.jl +++ b/src/write_outputs/write_fuel_consumption.jl @@ -46,9 +46,9 @@ function write_fuel_consumption_plant(path::AbstractString,inputs::Dict, setup:: end dfPlantFuel[!, fuel_cols_num[i]] = fuel_cols.(gen[HAS_FUEL], tag=i) - dfPlantFuel[!, Symbol(string(fuel_cols_num[i],"_AnnualSum_Fuel_HeatInput_Generation"))] = tempannualsum_fuel_heat_multi_generation - dfPlantFuel[!, Symbol(string(fuel_cols_num[i],"_AnnualSum_Fuel_HeatInput_Start"))] = tempannualsum_fuel_heat_multi_start - dfPlantFuel[!, Symbol(string(fuel_cols_num[i],"_AnnualSum_Fuel_HeatInput_Total"))] = tempannualsum_fuel_heat_multi_total + dfPlantFuel[!, Symbol(string(fuel_cols_num[i],"_AnnualSum_Fuel_HeatInput_Generation_MMBtu"))] = tempannualsum_fuel_heat_multi_generation + dfPlantFuel[!, Symbol(string(fuel_cols_num[i],"_AnnualSum_Fuel_HeatInput_Start_MMBtu"))] = tempannualsum_fuel_heat_multi_start + dfPlantFuel[!, Symbol(string(fuel_cols_num[i],"_AnnualSum_Fuel_HeatInput_Total_MMBtu"))] = tempannualsum_fuel_heat_multi_total dfPlantFuel[!, Symbol(string(fuel_cols_num[i],"_AnnualSum_Fuel_Cost"))] = tempannualsum_fuel_cost_multi end end