Hi
I'm parsing the results of the $show command, specifically $showVariables (aka the compile time variable list) using a script. Right now, the script relies on the $show command being present at the end of an input GAMS file, otherwise the compile time variable list would obviously not be printed to the listing file.
Sometimes, the $show command is deleted on accident, which then breaks the script. Is there a way to enable the $show from the command line, or a possibility to export the list of compile time variables to a file (e.g. like the reference command https://www.gams.com/45/docs/UG_GamsCal ... Oreference).
Thanks for your help!
Best
Christoph
Enable $show / $showVariables from Command Line
Re: Enable $show / $showVariables from Command Line
Christoph,
There is no command line parameter or similar to trigger this. The first thing that comes to my mind for this is to run with some `driver.gms` which you run to wrap `yourMoldel.gms` like this
and call it like . In such driver you could then of course also define more things you usually need.
Hope that helps,
Lutz
There is no command line parameter or similar to trigger this. The first thing that comes to my mind for this is to run with some `driver.gms` which you run to wrap `yourMoldel.gms` like this
Code: Select all
$include %myCode%
$show
Code: Select all
gams driver.gms --myCode=yourModel.gms
Hope that helps,
Lutz
Re: Enable $show / $showVariables from Command Line
Hey Lutz,
Thanks your suggestion! That's indeed a clever and simple solution, though I have to check if it breaks other parts of the script since it changes the include file structure!
Thanks,
Christoph
Thanks your suggestion! That's indeed a clever and simple solution, though I have to check if it breaks other parts of the script since it changes the include file structure!
Thanks,
Christoph