Skip to content

Allow scenario aliases in compareScenarios2 - #2399

Merged
simonkrogmann merged 2 commits into
remindmodel:developfrom
simonkrogmann:scenario-aliases
Jul 14, 2026
Merged

Allow scenario aliases in compareScenarios2#2399
simonkrogmann merged 2 commits into
remindmodel:developfrom
simonkrogmann:scenario-aliases

Conversation

@simonkrogmann

@simonkrogmann simonkrogmann commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Purpose of this PR

If compareScenarios2 is started with runs that are based on the same scenario (e.g. default), they will have almost the same name in the resulting pdf (default.1, default.2), which makes comparing difficult. Now users are prompted for aliases if there are identical scenario names. For scripting backwards compatibility this only happens if the runs are selected manually. piamPlotComparison already offers a corresponding feature so no change is necessary there.

Other comparison modules may also make use of these aliases, but I have neither implemented not tested them, because I don't know which modules are still in use.

Please give lots of feedback, also about R conventions and functions, I'm learning it at the moment.

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 requested a review from fbenke-pik July 9, 2026 14:10
Comment thread output.R Outdated
Comment thread output.R Outdated
Comment thread output.R
Comment thread output.R Outdated
Comment thread output.R Outdated
@simonkrogmann
simonkrogmann force-pushed the scenario-aliases branch 2 times, most recently from 3b31fdb to 5246537 Compare July 14, 2026 08:43
Comment thread output.R Outdated
if (!exists("outputdir")) {
aliases = promptForAliases(outputdirs, aliases)
}
if (exists("aliases"))

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.

Please use autoindent do make sure this is indented correctly.

@simonkrogmann
simonkrogmann force-pushed the scenario-aliases branch 3 times, most recently from f22283a to 7f75082 Compare July 14, 2026 14:01
@simonkrogmann
simonkrogmann merged commit 9242144 into remindmodel:develop Jul 14, 2026
2 checks passed
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.

2 participants