Skip to content

Commit

Permalink
Add cumulative discounted cash flows to yearly finantial terms
Browse files Browse the repository at this point in the history
  • Loading branch information
davide-f committed Nov 13, 2023
1 parent 0ed794d commit 9743f12
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ECModel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -984,8 +984,16 @@ function split_yearly_financial_terms(ECModel::AbstractEC, profit_distribution=n
year_set, user_set_financial
)

# Cumulative Discounted Cash Flows
total_costs = Ann_reward .- CAPEX .- OPEX .- Ann_Replacement .+ Ann_Recovery
CUM_DCF = JuMP.Containers.DenseAxisArray(
cumsum(mapslices(x->x.*ann_factor, total_costs.data, dims=1), dims=1),
year_set, user_set_financial
)

return (
NPV=NPV,
CUM_DCF=CUM_DCF,
CAPEX=CAPEX,
OPEX=OPEX,
OEM=Ann_Maintenance,
Expand Down

0 comments on commit 9743f12

Please sign in to comment.