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.
Description
This introduces a new
GrowthSeedparameter designed to prevent theMaxCapacityGrowthconstraint from being too restrictive when existing capacity is low/zero.The previous approach was to remove the
MaxCapacityGrowthconstraint when it would otherwise be zero, but this still doesn't help when capacity is small but nonzero. I've frequently seen users putting tiny values in their existing capacity files (e.g. 0.000001) and wonder why that technology isn't invested in - it's becauseMaxCapacityGrowth, even if big in percentage terms, will cap absolute growth at a tiny number.Thus the need for a seed, which relaxes the constraint when existing capacity is low.
The main changes are in the
max_capacity_expansionfunction inconstraints.py, and explained in the documentation. I've discussed with Adam and he's happy with the new method in principle. I'll also make sure to explain this in the release notes as it's quite a fundamental change which will likely affect most models.I've re-run all the models and regenerated the results files. Rather than adding a
GrowthSeedcolumn to all the technodata files, I'm just relying on the default seed value of 1 which seems reasonable for these models. Most of the changes to the results are small and don't affect the narrative of the tutorials. A couple of models didn't run at first so I had to make a couple of small parameter tweaks in thedefault_adhocandtrademodels.Also, I couldn't get the
modify-time-frameworkto run due to issue #371. As described in that issue, the model has a bug where gas capacity sometimes sporadically drops to zero. When this happens, new capacity must be invested in to make up the difference, and the default seed is too restrictive in this case. I could toggle with the model to make it happy, but since it's broken anyway I've decided to mark this particular test as xfail until #371 is fixedFixes #578
Type of change
Key checklist
$ python -m pytest$ python -m sphinx -b html docs docs/buildFurther checks