Skip to content

Refactor tax calculation and fix a bug for cm_fetaxscen=5 - #2423

Draft
simonkrogmann wants to merge 2 commits into
remindmodel:developfrom
simonkrogmann:unify-conv
Draft

Refactor tax calculation and fix a bug for cm_fetaxscen=5#2423
simonkrogmann wants to merge 2 commits into
remindmodel:developfrom
simonkrogmann:unify-conv

Conversation

@simonkrogmann

@simonkrogmann simonkrogmann commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Purpose of this PR

  • This refactors some unit handling in the tax module: Move conversions from preloop to datainput.
  • Interpolation is moved into a macro.
  • Zeros from tax_convergence_rollback were treated as NA and ignored instead of setting the tax to 0 which affected cm_fetaxscen=5. After talking to @nicobauer I changed this to the intended behavior.

Except for this bugfix and some rounding differences the new values are exactly the same (checked by script).

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)

@simonkrogmann
simonkrogmann marked this pull request as draft August 6, 2026 12:42
@simonkrogmann
simonkrogmann force-pushed the unify-conv branch 3 times, most recently from b92a9cf to 110b40c Compare August 6, 2026 13:39
@simonkrogmann
simonkrogmann force-pushed the unify-conv branch 3 times, most recently from d475e35 to ec52b63 Compare August 19, 2026 09:13
@simonkrogmann simonkrogmann changed the title Unify unit conversions for tax convergence and rollback Refactor tax calculation and fix a bug for cm_fetaxscen=5 Aug 19, 2026
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.

1 participant