Improvements to the Slope-Based Carbon Price Rescale Algorithm (module 47)#2363
Draft
Renato-Rodrigues wants to merge 11 commits into
Draft
Improvements to the Slope-Based Carbon Price Rescale Algorithm (module 47)#2363Renato-Rodrigues wants to merge 11 commits into
Renato-Rodrigues wants to merge 11 commits into
Conversation
…missions numerators on the slope calculation are identified and the iteration is avoided as reference iteration
…llChange always pre-empts it. Remove
…n the local abatment slope instead of long one
…rent from the current one.
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.
Purpose of this PR
This pull request introduces enhancements to the slope-based carbon price rescaling algorithm within the
47_regipolmodule. The changes aim to prevent convergence stalls, handle degenerate/noisy slopes in near-net-zero scenarios, and keep the price scaling process focused on the local abatement cost curve.Changes
Local Abatement Slope Window
s47_slopeMaxWindow(default5iterations). If the current iteration exceeds the reference iteration by more than this window, it falls back toSquareDev(squareDev_outsideWindow) to force a reset and keep the slope calculation local.Adaptive Upper Clamp Bound
-0.3for clamping the Rescale Slope when the raw slope was too flat or positive.-0.3→ relax bound to-0.15(next iteration)-0.15→ relax bound to-0.075(next iteration)-0.075→ immediately override toSquareDevfallback (squareDev_adaptiveClamp), reset bound to-0.3, and reset the slope reference iteration.-0.3if the upper clamp does not fire or when the reference iteration changes.Slope Degeneration Detection
s47_slopeDegenerateThreshold(default 1% of the region's 2005 reference emissions). If the absolute change in emissions between the current iteration and the reference iteration is smaller than this threshold we:squareDev_degenerateSlope). The reference iteration is also set to the current iteration so that subsequent iterations can try to calculate a fresh, non-degenerate slope.Code Robustness & Bug Fixes
Type of change
Indicate the items relevant for your PR by replacing ◻️ with ☑️.
Do not delete any lines. This makes it easier to understand which areas are affected by your changes and which are not.
Parts concerned
Impact
Checklist
Do not delete any line. Leave unfinished elements unchecked so others know how far along you are.
In the end all checkboxes must be ticked before you can merge.
make test) after my final commit and all tests pass (FAIL 0)remind2if and where it was neededforbiddenColumnNamesin readCheckScenarioConfig.R in case the PR leads to deprecated switchesCHANGELOG.mdcorrectly (added, changed, fixed, removed, input data/calibration)Further information (optional)
/p/projects/ecemf/REMIND/debug/remind_47_algorithm/output/SSP2-EU21-PkBudg1000_2026-06-05_20.20.32Check the report
nashConvergence-regiTarget.htmlfor more information.Not Aplicable.