I am considering if GAMS can store codes to one callable function like Matlab and C then use the function in another gms. file. Like the sample use of:
the "function.gms" contains a large amounts of codes including assignment and model solving, say 500 lines. So having them in the two ifs will be exceedingly tedious. That's the motivation of this question.
Code: Select all
Loop(iter, if(ord(iter)<=1, s(i) = m.l(i); call:function.gms; ... ); if(ord(iter)>1, call:function.gms; ... ); );