Skip to content
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

Fix bug with switch cm_inco0Factor for scaling investment cost of technologies, investment cost in policy runs are not overwritten by reference gdx in 05_initialCap anymore #1390

Merged
merged 4 commits into from
Sep 5, 2023

Conversation

fschreyer
Copy link
Contributor

Purpose of this PR

This fixes a bug for changing the investment cost in core/datainput with switches like cm_inco0Factor. Those changes were overwritten in policy runs at the end of the 05_initialCap module since the earlier change that initialCap is not run in policy runs anymore. Now, pm_inco0_t is not loaded from the input_ref.gdx anymore in policy runs. It is only loaded in case of cm_techcost = GLO where initialCap has an actual influence on pm_inco0_t. In this case, only the technologies modified by initialCap code are overwritten (ngcc etc.). I added a note to the above switches that those technologies are in this case still not affected by the switches. In all other cases, the switch should work as expected.

Type of change

(Make sure to delete from the Type-of-change list the items not relevant to your PR)

  • Bug fix

Checklist:

  • My code follows the coding etiquette
  • I performed a self-review of my own code
  • I explained my changes within the PR, particularly in hard-to-understand areas
  • I checked that the in-code documentation is up-to-date
  • All automated model tests pass (FAIL 0 in the output of make test)
  • The changelog CHANGELOG.md has been updated correctly

Further information (optional):

  • Test runs are here:
    /p/tmp/schreyer/Modeling/remind/Current/output/test_inco0_switch_glo_2023-08-29_11.42.31

  • Comparison of results (what changes by this PR?):

Felix Schreyer added 4 commits August 30, 2023 09:41
…in policy runs by loading the parameter from input_ref.gdx, only load and overwrite for the specific case in which 05_initialCap actually changes investment cost
…t does not work for specific technologies and settings as this gets overwritten in 05_initialCap module
Copy link
Contributor

@robertpietzcker robertpietzcker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable, especially the note in the declaration of cm_inco0Factor

One might still want to be able to change the investment costs in "GLO" runs, but then the next person who needs this can adjust the loading of pm_inco0_t in 05_initialcap/preloop so that the model does exactly what s/he needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants