refactor: historical clean energy is additional, not reference #184
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.
Purpose
Based on conversations with @danlivengood, we want to modify how external clean energy references are incorporated in calculations. The biggest example of this is California: they calculate a 'clean energy total' vastly in excess of our calculated numbers, since they count things like small hydro, rooftop PV, etc. that are not counted by our framework.
Previously, we had been inputting a constant value as the 'historical clean energy reference' (e.g. from California's reported total in 2016). This change instead uses a 'historical additional clean energy' value (which we will calculate once outside of this framework). This has the benefit of allowing accurate calculation of shortfall in scaled-up 2030 scenarios, where previously the over-generation was clipped at this historical reference value, even for future scenarios.
What is the code doing
In
clean_capacity_scaling.py
: we rename 'external_ce_historical_amount' to 'external_ce_addl_historical_amount'. This offset is added toprev_ce_generation
(generated energy from 'qualifying' resources in our framework) when calculating total shortfall or overgeneration for each target area.In
test_resource_target_manager.py
: we modify the test input values to reflect that the final argument toTargetManager
is an offset, not a reference.In
test_strategies.py
: we modify the test input values to reflect that the final argument toTargetManager
is an offset, not a reference.In
test_target_manager_input.py
: we modify the column naming.Time to review
Half an hour. This change is necessary to begin our revised Western 2030 runs, which are a blocker for our USA 2030 runs.