Skip to content

Commit

Permalink
Add units to fuel outputs; fix bugs in fuel.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
qluo0320github committed Feb 19, 2024
1 parent a0f4a70 commit c06660b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/model/core/fuel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/write_outputs/write_fuel_consumption.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c06660b

Please sign in to comment.