Skip to content

Decrease full.lst size - #2491

Merged
simonkrogmann merged 1 commit into
remindmodel:developfrom
simonkrogmann:small-full-lst
Oct 8, 2026
Merged

simonkrogmann merged 1 commit into
remindmodel:developfrom
simonkrogmann:small-full-lst

Conversation

@simonkrogmann

@simonkrogmann simonkrogmann commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Purpose of this PR

Automatically insert $offlisting for every $onDelim (and vice versa) in the full.gms file. This reduces the size of full.lst from ~450MB to ~80MB for testOneRegi.

This will help us produce less data in the future to mitigate storage issues and make it easier to work with full.lst in text editors/IDEs. (I got some out-of-memory errors on my system)

Is this desirable? Does it justify the level of hackiness?

If yes, I will make the replacement more robust before merging.

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)

Comment thread scripts/start/prepare.R
' are missing. Call RSE immediately')
}
manipulateFile(dumpFilePath, list(c("$onDelim", "$offlisting\n$onDelim"), c("$offDelim", "$offDelim\n$onlisting")), fixed = TRUE)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should it be deleted everywhere where it is already used?

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.

Unfortunately $offlisting does not get passed to the full.gms at all. The creation of full.gms removes all instances of it.

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.

It seems to be a side effect of dumpopt=21 here:

exitcode <- system2(cfg$gamsv, c(tmpModelFile, "action=c", "dumpopt=21",

@simonkrogmann
simonkrogmann merged commit c037e40 into remindmodel:develop Oct 8, 2026
2 checks passed
@simonkrogmann
simonkrogmann deleted the small-full-lst branch October 8, 2026 08:38
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