Hello,
I have been trying to use a .bat file with double-dashed parameters to execute a series of models (say, model1, model2 & model3). In addition, I wrote a shell program to execute the 4 models in sequence:
$call '"E:\GAMS\36\gams.exe" folder1/model1.gms'
$call '"E:\GAMS\36\gams.exe" folder2/model2.gms'
$call '"E:\GAMS\36\gams.exe" folder3/model3.gms'
The double-dashed parameters are contained inside the “model#.gms” code and assigned to scalars which are also generated there. When running each model separately they work. However, when I try to use the .bat file to execute the model (also passing it inputs in the form of double-dashed variables), it seems that the models are not receiving this inputs. Inside the model files I have used “set global” and I found this statement in the GAMs manual: $setGlobal → Available in the input file where they are defined, in all parent files and in all include files.
It seems to me that the statement is saying that the double-dashed parameters should be defined everywhere so long as I use “$setGlobal”, which doesn’t seem to be the case (unless I am missing something). My question is: can I pass double-dashed parameters to multiple separate models through a shell-loop like the code above? Thanks in advance for any tips/recommendations.