Capital cost issue

625 views
Skip to first unread message

Alice Di Bella

unread,
Jun 6, 2021, 8:00:11 AM6/6/21
to pypsa
Hi everybody,

I'm Alice Di Bella, I am currently writing my thesis for my Master degree in Energy Engineering at Politecnico di Milano using Pypsa-eur. I am currently having troubles understanding how the cost variables (capital_cost and marginal_cost) work.

I'll be more precise: I ran a simulaion with 37 nodes in europe, timestep of 24 hours, using config.default.yaml and I don't understand how the capital cost is calculated.
For example the capital cost for onwind, taken from network.generators.capital_cost is 109.3 €/kW but in the data costs.csv the value was 1040 €/kW. I know that I should consider a certain discount rate, but the difference is of an entire order of magnitude, so I think it's a bit weird. Can anybody help me with this please?
It would be important to go on with my work :)

Thank you in advance ,
Alice Di Bella

Tom Brown

unread,
Jun 6, 2021, 9:22:34 AM6/6/21
to py...@googlegroups.com
Hi Alice,

The investment costs are annualised using a formula for the annuity that
takes account of the discount rate, see e.g.

https://nworbmot.org/courses/esm-2020/lectures/esm-lecture-11.pdf

To this are added fixed O&M costs to get the fixed annual payment that
enters PyPSA as the "capital_cost".

Best,

Tom
> --
> You received this message because you are subscribed to the Google
> Groups "pypsa" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pypsa+un...@googlegroups.com
> <mailto:pypsa+un...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pypsa/11e3b925-b53f-40de-89a6-0450f30b359dn%40googlegroups.com
> <https://groups.google.com/d/msgid/pypsa/11e3b925-b53f-40de-89a6-0450f30b359dn%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Tom Brown (he/him)
Professor of Digital Transformation in Energy Systems
Institute of Energy Technology
Technische Universität Berlin

Group website: https://www.ensys.tu-berlin.de/
Personal website: https://nworbmot.org/

Visitor Address:
Einsteinufer 25 (TA 8)
10587 Berlin

Andreas Rüth

unread,
Apr 13, 2022, 10:32:38 AM4/13/22
to pypsa
Dear all, 

I know I am a bit late to this thread, but this one seems to fit best with regards to my query.
Capital costs are something that is paid once for constructing an asset / component and will not be paid again. It is a fixed cost position. Now, if I run a simulation for 1 year (e.g. snapshots: 2013-01-01 to 2014-01-01), will the capital costs of the built components somehow be divided by a factor to take into account that I only simulate 1 year instead of the whole period this asset would be active? 

Let me give you an example in case I was not clear enough:
The model (endogenously) adds additional capacity of 100 MW of PV power. The capital costs for that are 100 MUSD. Since I only simulate one year and a PV plant has an assumed lifetime of 20 years, would the model add capital costs of 100 MUSD, or 5 MUSD? 

I guess it would be 100 MUSD, but I would like to clarify this before going ahead with my project as this would be a crucial thing to consider for me.

Thank you all for your help!

Best regards,
Andreas

lisaze...@gmail.com

unread,
Apr 14, 2022, 2:04:30 AM4/14/22
to pypsa
Hi Andreas,

If you run the optimisation for one single year it makes sense to annualise the capital costs (this does not happen internally in pypsa). In your example the capital cost should be 5 MUSD. You can find an example on how we normally annualise the capital costs here

Best wishes,
Lisa

Andreas Rüth

unread,
Apr 14, 2022, 5:34:19 AM4/14/22
to pypsa
Hi Lisa, 

thanks for the swift answer. After investigating the code, I get the idea. Definitely a very helpful reply!
I don't really get the point about the "Nyears", though. Staying in the example above, could you explain to me what the value for Nyears would be? I am having trouble understanding what exactly is the calculation behind this with respect to snapshot.weightings and so on. 

Nyears = n.snapshot_weightings.objective.sum() / 8760

Could you give me an idea of what would be the value for Nyears in the example presented above?
I am running 1 year of simulation with 4h-snapshots, in case that's relevant. Maybe you could reiterate how the Nyear would change with changing the Xh-snapshots and Y years of  simulation. That would be incredibly helpful.

Thank you for your help, best regards,
Andreas

lisaze...@gmail.com

unread,
Apr 14, 2022, 6:15:07 AM4/14/22
to pypsa
Hi Andreas,

the "NYears" in the example code stands for the Number of Years of your optimisation. So in your example it should be equal to 1. If you run a simulation with every 4th snapshot or a resampling to 4h you do have a network with 2190 snapshots and  n.snapshot_weightings.objective are probably equal to 4, so Nyears = n.snapshot_weightings.objective.sum() / 8760 should be 1 as well.

Best,
Lisa


Andreas Rüth

unread,
Apr 14, 2022, 6:27:03 AM4/14/22
to pypsa
Hi Lisa, 

thanks again. Reading that, I assume changing nyears manually to (1 / the lifetime of a component) would lead to reasonable consideration of the capex if I run the simulation only for 1 year. 

Thank you so much.

Br,
Andreas

Ahmad Fuad Jamaludin

unread,
May 23, 2022, 5:38:22 PM5/23/22
to pypsa
Dear all,

I am trying to calculate techno-economic parameters for different electricity generation technologies, for year 2030, 2040 and 2050. 

Currently I am referring to the formula mentioned by Lisa which is used in the pypsa-eur add_electricity script. Based on the formula, for costs["FOM"], and also, referring to the pypsa-eur costs.csv file, for example, for onwind technology, with the FOM value of 2.450549%/year, may I know how was the value obtained? Especially to get it in terms of percentage %/year. I have tried to calculate based on below examples/resources but still couldn't get it. Or maybe I am referring to the wrong raw data sources? 

2) Numbers from the raw data sources of DEA https://ens.dk website, screenshot of the table as below (highlighted in YELLOW colour), and its original excel file attached in this message (need to go to the "20 Onshore turbines" sheet of the excel file)

1.jpg

Once I fully understand how the numbers were obtained for year 2030 as in the costs.csv file, then I can proceed to calculate for 2040 and 2050. Really appreciate any help and many thanks in advance!

Regards,
Fuad
technology_data_for_el_and_dh.xlsx

lisaze...@gmail.com

unread,
May 24, 2022, 2:43:03 AM5/24/22
to pypsa
Hi Fuad,

the Fixed Operational and Maintenance cost (FOM) are given in our input data as a percentage of the investment costs. E.g. for onshore wind turbines investment costs in 2030 are 1.04*10⁶ EUR/MW and FOM are 12.6*10³ EUR/MW/year so the FOM in our format as a percentage are 12.6*10³/1.04*10⁶ =  0.0122 per unit / year = 1.22%/year.

We do have all the technology data already for different years calculated you can find it in this repository here

Also if you want to check all the conversions we are doing getting from the raw data to our input files check the script in the same repository here

Best wishes,
Lisa

Message has been deleted
Message has been deleted

Qui Rin

unread,
May 25, 2022, 12:00:33 PM5/25/22
to pypsa

Hi Lisa,

I am doing a multi-investment optimization and can't figure out how the capital costs are handled. When I add them like in the add_electricity script, should I use Nyears = sum of all investment-periods durations, or just the durations themselfs or per year (as the investment_period_weightings contribute to the objective function..)?

Best Quirin

lisaze...@gmail.com

unread,
May 30, 2022, 3:44:09 AM5/30/22
to pypsa
Hi Quirin,
the capital costs are added as annualised capital costs for one single year (Nyears=1). If you use the multi period optimisation you can add a weighting for the time difference between the investment periods via the investment_period_weightings (e.g. investment periods 2025, 2030 with investment period weightings 5). The n.investment_periods["years"] waits your dispatch or also you CO2 constraints, the n.investment_periods["objective"] the costs (here you can add for example an additional factor for the social discount rate).
Best,
Lisa

Reply all
Reply to author
Forward
0 new messages