Skip to content

Commit

Permalink
use variable "fuel_cols" when multi-fuel exists
Browse files Browse the repository at this point in the history
  • Loading branch information
qluo0320github committed Jan 16, 2024
1 parent 92ad0cf commit 6bc4c5b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/write_outputs/write_fuel_consumption.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ function write_fuel_consumption_plant(path::AbstractString,inputs::Dict, setup::
G = inputs["G"]
HAS_FUEL = inputs["HAS_FUEL"]
MULTI_FUELS = inputs["MULTI_FUELS"]

Check warning on line 17 in src/write_outputs/write_fuel_consumption.jl

View check run for this annotation

Codecov / codecov/patch

src/write_outputs/write_fuel_consumption.jl#L17

Added line #L17 was not covered by tests
fuel_cols = inputs["FUEL_COLS"]
max_fuels = inputs["MAX_NUM_FUELS"]

# Fuel consumption cost by each resource, including start up fuel
dfPlantFuel = DataFrame(Resource = inputs["RESOURCES"][HAS_FUEL],
Expand All @@ -26,6 +24,8 @@ function write_fuel_consumption_plant(path::AbstractString,inputs::Dict, setup::
tempannualsum = value.(EP[:ePlantCFuelOut][HAS_FUEL]) + value.(EP[:ePlantCFuelStart][HAS_FUEL])

if !isempty(MULTI_FUELS)
fuel_cols = inputs["FUEL_COLS"]
max_fuels = inputs["MAX_NUM_FUELS"]
dfPlantFuel.Multi_Fuels = dfGen[HAS_FUEL, :MULTI_FUELS]
for i = 1:max_fuels
tempannualsum_fuel_heat_multi_generation = zeros(length(HAS_FUEL))
Expand Down Expand Up @@ -64,7 +64,6 @@ end
function write_fuel_consumption_ts(path::AbstractString, inputs::Dict, setup::Dict, EP::Model)
T = inputs["T"] # Number of time steps (hours)
HAS_FUEL = inputs["HAS_FUEL"]
MULTI_FUELS = inputs["MULTI_FUELS"]

# Fuel consumption by each resource per time step, unit is MMBTU
dfPlantFuel_TS = DataFrame(Resource = inputs["RESOURCES"][HAS_FUEL])
Expand Down

0 comments on commit 6bc4c5b

Please sign in to comment.