Skip to content

Commit

Permalink
fixed calculation error with project costs
Browse files Browse the repository at this point in the history
  • Loading branch information
smartie2076 committed Jun 12, 2019
1 parent df688ca commit d743a26
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions D_process_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def economic_values(experiment):
'project']

for item in component_list:
print(item)
# --------------------------------------------------#
# CAPEX without opex/a #
# --------------------------------------------------#
Expand All @@ -86,8 +85,7 @@ def economic_values(experiment):
# costs. Includes project_cost_annuity, distribution_grid_cost_annuity, maingrid_extension_cost_annuity for
# consistency eventhough these are not used in optimization.
experiment.update({item + '_cost_annuity': experiment[item + '_cost_annuity'] / 365*experiment['evaluated_days']})
if item == 'project':
print(experiment[item + '_cost_investment'], experiment[item + '_cost_capex'], experiment[item + '_cost_annuity']*365/experiment['evaluated_days'])

return experiment

def add_timeseries(experiment_s):
Expand Down
2 changes: 0 additions & 2 deletions Z_economic_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ def capex_from_investment(investment_t0, lifetime, project_life, wacc, tax):

# Substraction of component value at end of life with last replacement (= number_of_investments - 1)
if number_of_investments * lifetime > project_life:
print(number_of_investments * lifetime)
print(investment_t0)
last_investment = first_time_investment / ((1 + wacc) ** ((number_of_investments - 1) * lifetime))
linear_depreciation_last_investment = last_investment / lifetime
capex = capex - linear_depreciation_last_investment * (number_of_investments * lifetime - project_life)
Expand Down

0 comments on commit d743a26

Please sign in to comment.