1

How can I define a string variable in GAMS. I want to use it as a reference to including files as shown below

set file = "myfile.inc"; (i have no idea how to do this part)
$include file;

istead of

$include "myfile.inc" 
k.dkhk
  • 481
  • 1
  • 11
  • 24

1 Answers1

3

$set file file_name_here

$include %file%.inc

File is being replaced by your desired filename. Note that if you want to use this string variable in other included files too you have to use $setglobal instead of $set

GFA
  • 86
  • 2