Skip to content

Commit

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

# Cumulative Discounted Cash Flows
CDCF = JuMP.Containers.DenseAxisArray(
cumsum(sum((Ann_reward .- CAPEX .- OPEX .- Ann_Replacement .+ Ann_Recovery).data, dims=2)[:, 1] .* ann_factor),
year_set
)

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

0 comments on commit d25b9e6

Please sign in to comment.