rl-institut / offgridders

Models and optimizes capacity & dispatch of electricity supply systems, off-grid or connected to a (weak) central grid
GNU General Public License v3.0
21 stars 9 forks source link

FIRST INVESTMENT CALCULATION #174

Open oum96-mah opened 1 year ago

oum96-mah commented 1 year ago

I have a bit of a problem with the first investment calculation. I'm trying to recalculate it and compare it to the value given in the Excel result file, but they're not the same. Is it possible to clarify the precise formula with which you calculate?

smartie2076 commented 1 year ago

Hello @oum96-mah! The formula to calculate the present value of one investment unit is coded here: https://github.com/rl-institut/offgridders/blob/9095014d054b26e1c0a02b51d237840e1b8e9ea6/src/D1_economic_functions.py#L101

It takes into account the discount factor, asset lifetime, project lifetime, number of necessary replacements and the residual value at project end.

smartie2076 commented 1 year ago

The description here is maybe easier to read, but it seems it is marked for updates: https://offgridders.readthedocs.io/en/latest/Cost.html?highlight=replacement#including-costs-in-oemof-optimization

(The funtion above is the way that it is actually implemented)