how to call a sub-gms file inside the main gms file

Problems with modeling
Post Reply
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: how to call a sub-gms file inside the main gms file

Post by bussieck »

Not sure I understand, but you can call GAMS recursively during compilation. Assume B.gms creates AAA.inc while compiling A.gms. Hence in A.gms you have:

$call gams B.gms lo=%gams.lo%
$if errorlevel 1 $abort problems running gams B.gms. Check B.lst for details

$include AAA.inc

-Michael
Post Reply