Skip to content

Commit

Permalink
Update financial.jl
Browse files Browse the repository at this point in the history
zero out multinode ghp results
  • Loading branch information
rathod-b committed Sep 27, 2023
1 parent 50c3f28 commit 2409de8
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/results/financial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,19 @@ function add_financial_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dict; _
if !(Symbol("TotalPerUnitHourOMCosts"*_n) in keys(m.obj_dict)) # CHP not currently included in multi-node modeling
m[Symbol("TotalPerUnitHourOMCosts"*_n)] = 0.0
end
if !(Symbol("GHPOMCosts"*_n) in keys(m.obj_dict)) # CHP not currently included in multi-node modeling
m[Symbol("GHPOMCosts"*_n)] = 0.0
end
if !(Symbol("GHPCapCosts"*_n) in keys(m.obj_dict)) # HHP not currently included in multi-node modeling
m[Symbol("GHPCapCosts"*_n)] = 0.0
end

r["lcc"] = value(m[Symbol("Costs"*_n)]) + 0.0001 * value(m[Symbol("MinChargeAdder"*_n)]) - value(m[Symbol("dvComfortLimitViolationCost"*_n)])
r["lifecycle_om_costs_before_tax"] = value(m[Symbol("TotalPerUnitSizeOMCosts"*_n)] +
m[Symbol("TotalPerUnitProdOMCosts"*_n)] + m[Symbol("TotalPerUnitHourOMCosts"*_n)] + m[Symbol("GHPOMCosts")])
m[Symbol("TotalPerUnitProdOMCosts"*_n)] + m[Symbol("TotalPerUnitHourOMCosts"*_n)] + m[Symbol("GHPOMCosts"*_n)])

## LCC breakdown: ##
r["lifecycle_generation_tech_capital_costs"] = value(m[Symbol("TotalTechCapCosts"*_n)] + m[Symbol("GHPCapCosts")]) # Tech capital costs (including replacements)
r["lifecycle_generation_tech_capital_costs"] = value(m[Symbol("TotalTechCapCosts"*_n)] + m[Symbol("GHPCapCosts"*_n)]) # Tech capital costs (including replacements)
r["lifecycle_storage_capital_costs"] = value(m[Symbol("TotalStorageCapCosts"*_n)]) # Storage capital costs (including replacements)
r["lifecycle_om_costs_after_tax"] = r["lifecycle_om_costs_before_tax"] * (1 - p.s.financial.owner_tax_rate_fraction) # Fixed & Variable O&M
if !isempty(p.techs.fuel_burning)
Expand Down Expand Up @@ -85,9 +92,9 @@ function add_financial_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dict; _
r["year_one_om_costs_before_tax"] = r["lifecycle_om_costs_before_tax"] / (p.pwf_om * p.third_party_factor)
r["year_one_om_costs_after_tax"] = r["lifecycle_om_costs_after_tax"] / (p.pwf_om * p.third_party_factor)

r["lifecycle_capital_costs_plus_om_after_tax"] = value(m[Symbol("TotalTechCapCosts"*_n)] + m[Symbol("TotalStorageCapCosts"*_n)] + m[Symbol("GHPCapCosts")]) +
r["lifecycle_capital_costs_plus_om_after_tax"] = value(m[Symbol("TotalTechCapCosts"*_n)] + m[Symbol("TotalStorageCapCosts"*_n)] + m[Symbol("GHPCapCosts"*_n)]) +
r["lifecycle_om_costs_after_tax"]
r["lifecycle_capital_costs"] = value(m[Symbol("TotalTechCapCosts"*_n)] + m[Symbol("TotalStorageCapCosts"*_n)] + m[Symbol("GHPCapCosts")])
r["lifecycle_capital_costs"] = value(m[Symbol("TotalTechCapCosts"*_n)] + m[Symbol("TotalStorageCapCosts"*_n)] + m[Symbol("GHPCapCosts"*_n)])
r["initial_capital_costs"] = initial_capex(m, p; _n=_n)
future_replacement_cost, present_replacement_cost = replacement_costs_future_and_present(m, p; _n=_n)
r["initial_capital_costs_after_incentives"] = r["lifecycle_capital_costs"] / p.third_party_factor - present_replacement_cost
Expand Down

0 comments on commit 2409de8

Please sign in to comment.