fix/scale vom by efficiency when missing#2154
Open
gianvicolux wants to merge 3 commits intoPyPSA:masterfrom
Open
fix/scale vom by efficiency when missing#2154gianvicolux wants to merge 3 commits intoPyPSA:masterfrom
gianvicolux wants to merge 3 commits intoPyPSA:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2145.
Changes proposed in this Pull Request
This PR fixes a bug concerning marginal cost definition for those links where
vomcosts are given per unit of output (e.g., electricity) in the technology cost datasets. Indeed,marginal_costof links must be expressed per unit of carrier atbus0, because the PyPSA objective function multipliesmarginal_cost × p0 × snapshot_weighting. In such cases, the correct conversion when settingmarginal_costfor a Link is:In multiple places across
prepare_sector_network.pyandadd_existing_baseyear.py,marginal_costwas set directly tocosts.at[tech, "VOM"]without multiplying by efficiency. This caused an overestimation of the effective marginal cost by a factor of1/η.The affected carrier were:
central solid biomass CHP,central solid biomass CHP CCCCGT methanol,CCGT methanol CCH2 turbineurban central {fuel} CHP,urban central {fuel} CHP CCbiogas to gas,biogas to gas CCChecklist
Required:
doc/release_notes.rst.If applicable:
scripts/lib/validation.doc/*.rstfiles.