Hello,
I am trying to ‘compartmentalize’ my GAMS code. In doing so, I am building a ‘Main.gms’ script, which call several sub-files. An example of this looks like
* Main.gms
*Define output to the IDE
$setglobal ide "ide=%gams.ide% lo=%gams.lo% errorlog=%gams.errorlog% errmsg=1"
loop( cases,
*This bit of code creates the GDX files from CSVs which are read into the solver
execute "gams Path To File\CreateGDXFile.gms s=wf1" %ide%" ;
*This is a portion of the code
execute "gams Path To File/SubFile1.gms r=wf1 %ide%" ;
... and so on
The issue I am running into is that the ‘PATH TO FILE’ causes this command to fail, due to the spaces. There error is
Error: Parameter error(s), Reading parameter(s) from "command line", **** Error Unkown option "To"
Is there any work around to getting the code to run? Is there a different approach I should be using other than ‘execute’. I think the loop aspect makes execute a necessity.
P.S. According to https://support.gams.com/platform:spaces_in_directory_or_file_name, GAMS should be able to handle spaces as of 2018.