-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add technoeconomic cost projections and related data #99
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #99 +/- ##
=======================================
+ Coverage 75.5% 76.8% +1.2%
=======================================
Files 101 112 +11
Lines 6675 7157 +482
=======================================
+ Hits 5046 5497 +451
- Misses 1629 1660 +31
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great start for a first message-ix-models PR!
I leave some comments about general pandas usage. I think with these applied the code will slim down considerably, making the intended behaviour more clear. That can then be targeted in a next review.
4b820cb
to
c404952
Compare
672b80d
to
b1ffabd
Compare
It would be nice to include needed package dependencies into |
In IAMC data template output, the Model and Unit columns are missing and should be added. |
Time steps (currently 10-year time steps) and set of regions for which to produce projections should become easily configurable. Also, region names used in GDP/cap specification, IEA WEO mapping, etc. then need to become unambiguous. I would suggest to use |
1a3da58
to
b2efb16
Compare
7bd7ac4
to
83a0c59
Compare
Following a discussion with @volker-krey, here is what it would look like to keep the learning rates scenario constant (in this case, at SSP2) with varying SSP GDP scenarios. Showing |
faf6306
to
544178e
Compare
656ddb5
to
e8aefbf
Compare
An update on the current state of the PR The module derives cost projections using the same three general methods as mentioned previously:
The methdology for the GDP-adjusted cost projections have been modified to prevent large jumps in cost projections. I have hacked together some quick input data for a low-energy demand (LED) scenario, but these values need considerate validation and verification. The
The The |
e8aefbf
to
880689f
Compare
f35036d
to
8b8d42b
Compare
- First line of docstring ends with a period. - Incorporate pre-function comments into docstring, so they are visible in the built documentation. - Ensure ReST list items are wrapped.
- Use .eval(…) with direct formulae instead of 2-stage linregress()/predict on 2 data points per group. - Vectorize calculations for performance. - Chain pandas operations. - Remove .gdp.default_ref_region(); this predates Config, is now handled by Config.
This file was initially created to subset the large SSP data file. But with the new SSP data hhandler, I think this script is no longer needed.
- For projecting costs of reference region, used words like `decay` or `cost reduction` instead - Renamed `learning.py` to `decay.py` and also the corresponding test file - Changed `learning` projection method to `constant` instead
Namely, that `splines` have been removed and mentions of the term `learning` have been changed to `decay`, `cost reduction`, and `constant` (where appropriate)
- Explain more about the costs module functionality and different projection methods - Explain how to add additional technology modules - Give example of how to use code
…ll non-reference regions
- Start new sentences on new lines. - Use "-" consistently for bullet lists (don't mix "*" and "-"). - Ensure a blank line before bullet lists. - Use the ReST :file:`...` role for file names and paths.
- Shorten title for display. - Explain terms used. - Correct spelling and grammar. - Update docstrings for .costs.Config attributes and refer to these, instead of duplicating descriptions in text. - Update headings. - Use quotes for values appearing in code or data files.
This PR adds a module that projects regionally-differentiated investment costs and fixed O&M costs for technologies.
The module projects costs in a specified reference region for all technologies by applying a decay/reduction rate. Then, costs for all other regions are calculated through one of the following methods:
Note that all costs calculations mentioned above are for investment costs. Fixed O&M costs are assumed to be a specified fraction of investment costs.
The main function that projects costs is the
create_cost_projections()
function, which takes the following inputs:The
create_cost_projections()
outputs a class object with two dataframes (one for investment costs, one for fixed O&M costs).How to review
Documentation and usability (@adrivinca)
General purpose modeling tools
>Technoeconomic investment and fixed O&M costs projection
. The following link leads straight to the section in the latest docs test build: https://iiasa-energy-program-message-ix--99.com.readthedocs.build/projects/models/en/99/api/tools.html#technoeconomic-investment-and-fixed-o-m-costs-projection-tools-costsdemo.py
script in the module gives some example of how to use the main function that creates the costs projections.Technical, implementation (@khaeru)
PR checklist