Skip to content

Implement GDP-based floor cost scenario and refactor related code#2310

Merged
lecfab merged 40 commits into
remindmodel:developfrom
lecfab:copilot/differentiate-floor-costs
Jun 11, 2026
Merged

Implement GDP-based floor cost scenario and refactor related code#2310
lecfab merged 40 commits into
remindmodel:developfrom
lecfab:copilot/differentiate-floor-costs

Conversation

@lecfab

@lecfab lecfab commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

Purpose of this PR

  • Implementing floor cost options following the discussion in: https://github.com/remindmodel/development_issues/issues/230
    • default: the floor cost is the same for all regions
    • pricestruc: regionally differentiated floor costs follow the historical price structure. That means that, for a given technology, a region that had in history a 2x higher cost than global average will have a 2x higher floor cost than written in generisdata_tech
    • gdpBased: regionally differentiated floor costs follow the GDP-MER/cap projection for 2050. Depending on their GDP, regions will have a x0.5 to x1.5 factor compared to the floor cost written in generisdata_tech. The curve is S-shaped: https://www.desmos.com/calculator/rbcjeoulgk
      Note: upon request by @robertpietzcker, CHA sees the price corresponding to half of its GDPpCap, reflecting its leading role in new technologies.
  • Refactoring cost trajectories using macros for clarity
  • Fixing a bug that pricestruc was used by default, and with a wrong reference value, making floor cost too small. For spv for instance, reference costs in 2005 instead of 2020 gave all regions a very low cost in the price structure, and therefore a very low floor cost.

Results

Changes of pm_data floorcost (in $/W)

See details in this sheet. Mostly matters for spv and windon
image
image

Changed in Pk750 scenario

  • indeed some change in the investment cost curves
  • slightly higher carbon price compared to old (because of the spv bug), not much differences between new options
  • regional differences between new options, and increase in VRE for gdpBased
  • wind capacity does not change much globally, but the share of offshore changes
image image image image image

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

  • ☑️ GAMS Code
  • ◻️ R-scripts
  • ◻️ Documentation (GAMS incode documentation, comments, tutorials)
  • ◻️ Input data / CES parameters
  • ◻️ Tests, CI/CD (continuous integration/deployment)
  • ☑️ Configuration (switches in main.gms, default.cfg, and scenario_config*.csv files)
  • ◻️ Other (please give a description)

Impact

  • ☑️ Bug fix
  • ☑️ Refactoring
  • ☑️ New feature
  • ◻️ Change of parameter values or input data (including CES parameters)
  • ◻️ Minor change (default scenarios show only small differences)
  • ◻️ Fundamental change of results of default scenarios

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
.

  • I executed the automated model tests (make test) after my final commit and all tests pass (FAIL 0)
  • I adjusted the reporting in remind2 if and where it was needed
  • I adjusted the madrat packages (mrremind and other packages involved) for input data generation if and where it was needed
  • My code follows the coding etiquette
  • I explained my changes within the PR, particularly in hard-to-understand areas
  • I checked that the in-code documentation is up-to-date
  • I adjusted forbiddenColumnNames in readCheckScenarioConfig.R in case the PR leads to deprecated switches
  • I updated the CHANGELOG.md correctly (added, changed, fixed, removed, input data/calibration)

Further information (optional)

  • Runs with these changes are here: /p/tmp/fabricel/floorCostGDPbased/202605-changed, see compScen pdfs there
  • Comparison of results (what changes by this PR?):

Copilot AI and others added 30 commits February 24, 2026 17:14
Co-authored-by: lecfab <1883023+lecfab@users.noreply.github.com>
…rameters

Co-authored-by: lecfab <1883023+lecfab@users.noreply.github.com>
…ased, consolidate equations with ifthenE

Co-authored-by: lecfab <1883023+lecfab@users.noreply.github.com>
…edundancy

Co-authored-by: lecfab <1883023+lecfab@users.noreply.github.com>
…pital

Co-authored-by: lecfab <1883023+lecfab@users.noreply.github.com>
Co-authored-by: lecfab <1883023+lecfab@users.noreply.github.com>
…emove useless parens

Co-authored-by: lecfab <1883023+lecfab@users.noreply.github.com>
…in.gms

Co-authored-by: lecfab <1883023+lecfab@users.noreply.github.com>
…dYear; apply style to modified blocks

Co-authored-by: lecfab <1883023+lecfab@users.noreply.github.com>
…avoid overwrite

Co-authored-by: lecfab <1883023+lecfab@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…) which only refers to 2005 value and is misleading for VRE
@lecfab lecfab requested a review from robertpietzcker June 9, 2026 17:08
@lecfab

lecfab commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Extensive tests of all AMT scenarios available here:

  • old: /p/tmp/fabricel/floorCostGDPbased/202605-develop
  • default: /p/tmp/fabricel/floorCostGDPbased/202605-changed/output/*-default*
  • pricestruc: /p/tmp/fabricel/floorCostGDPbased/202605-changed/output/*-pricestruc*
  • gdpBased: /p/tmp/fabricel/floorCostGDPbased/202605-changed/output/*-gdpBased*

@lecfab lecfab requested a review from fschreyer June 10, 2026 09:11

@fschreyer fschreyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, thanks for this development and also extensive clean-up. As far as I understand the default does not change for now. And the floor cost switch variations seem plausible.

Maybe we check with RSE that all the macro refactoring is fine. I do start to like it but it should be defined somewhere centrally. Maybe for later, @LaviniaBaumstark

Comment thread core/bounds.gms Outdated
Comment thread core/datainput.gms Outdated
Comment thread core/datainput.gms Outdated
Comment thread core/equations.gms
q_costTeCapital(t,regi,teLearn)$(NOT (pm_data(regi,"tech_stat",teLearn) eq 4 AND t.val le 2020)) ..

$macro macro_capCumGlob (sum(regi2, vm_capCum(t,regi2,teLearn)) + pm_capCumForeign(t,regi,teLearn))
$macro macro_costRegi (pm_data(regi,"floorcost",teLearn) + pm_data(regi,"learnMult_wFC",teLearn) * macro_capCumGlob ** pm_data(regi,"learnExp_wFC",teLearn))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Where are those macros used? Are they really used many times? Looks quite specific to the learning parameter initializtation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They greaaatly simplify the equations below :) because then the equations just say "start with regional, then slowly go to global", etc.

Comment thread core/equations.gms
+ pm_capCumForeign(t,regi,teLearn)
) ** fm_dataglob("learnExp_wFC",teLearn)
)
*** after 2020 for specific cm_floorCostScen: regional capital costs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why does that go into core/equations.gms? Previously this was in datainput, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok, I understand it better now. Acutally there is also a super nice documentation of the learning curve approach. I wasn't aware of that. I assume you added this before.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah the separation between datainput and equations is not super clear, but broadly:

  • datainput defines the global and regional parameters for floor costs and learning rates
  • equations put that together to obtain the correct curve depending on cm_floorCostScen
  • yes a while ago I pushed that :) Documenting learning equations #1937

@fschreyer

Copy link
Copy Markdown
Contributor

Btw, why is total capacity of electricity higher in GDP-based floor cost?

@lecfab

lecfab commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Btw, why is total capacity of electricity higher in GDP-based floor cost?

It is mainly storage capacity that increases, due to lower overall costs and different regional distribution.
image

@lecfab lecfab merged commit 494e6a0 into remindmodel:develop Jun 11, 2026
2 checks passed
@lecfab

lecfab commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for your comments Felix, I merged now!

@LaviniaBaumstark: just flagging the use of local macros in this PR for code simplification (see equations.gms)

@robertpietzcker I did not change the default setting, but I think the objective was to use gdpBased as the default from now on? The current default (which I should rename) uses a global floor cost...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants