Skip to content

Add growth seed parameter#680

Merged
tsmbland merged 10 commits intomainfrom
growth_seed
Mar 27, 2025
Merged

Add growth seed parameter#680
tsmbland merged 10 commits intomainfrom
growth_seed

Conversation

@tsmbland
Copy link
Copy Markdown
Collaborator

@tsmbland tsmbland commented Mar 17, 2025

Description

This introduces a new GrowthSeed parameter designed to prevent the MaxCapacityGrowth constraint from being too restrictive when existing capacity is low/zero.

The previous approach was to remove the MaxCapacityGrowth constraint 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 because MaxCapacityGrowth, 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_expansion function in constraints.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 GrowthSeed column 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 the default_adhoc and trade models.

Also, I couldn't get the modify-time-framework to 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 fixed

Fixes #578

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass: $ python -m pytest
  • The documentation builds and looks OK: $ python -m sphinx -b html docs docs/build

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@tsmbland tsmbland changed the title Apply fixed growth seed of 1 Add growth seed parameter Mar 17, 2025
@tsmbland tsmbland linked an issue Mar 18, 2025 that may be closed by this pull request
@tsmbland tsmbland changed the base branch from main to input_structure March 26, 2025 12:07
@tsmbland tsmbland marked this pull request as ready for review March 26, 2025 14:50
@tsmbland tsmbland requested a review from dalonsoa March 26, 2025 14:50
Base automatically changed from input_structure to main March 27, 2025 12:43
Copy link
Copy Markdown
Collaborator

@dalonsoa dalonsoa left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@tsmbland tsmbland merged commit b6986d6 into main Mar 27, 2025
14 checks passed
@tsmbland tsmbland deleted the growth_seed branch March 27, 2025 13:47
@github-project-automation github-project-automation Bot moved this to ✅ Done in MUSE Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Add growth seed parameter

2 participants