Dear All,
I want to create GDX or xls file with different names for different instances. Please find the sample code below.
parameter
sel(i,j,tt) selection parameter
bat(i,j,tt) batch size paramter
inv(k,tt) inventory paramter
end(i,j,tt) internal parameter
l;
$setglobal inc l
loop n$(ord(n) <= count1) do
l = ord(n);
loop i do
loop j do
loop t do
sel(i,j,t) = Xin(n,i,j,t);
bat(i,j,t) = Bin(n,i,j,t);
endloop;
endloop;
endloop;
loop k do
loop t do
inv(k,t) = Sin(n,k,t);
endloop
endloop;
display sel, bat, l, count1;
execute_unload 'ganttsolution_%inc%.gdx’sel bat inv end l;
endloop
however, each time it is creating only one file titled “ganttsolution_l.gdx”, which is getting overwritten by the last values of the loop. I want to create different files for each instance of n. I have tried passing the value using ‘n.tl’ and ‘n.te(n)’ also, but that also didn’t work.
Kindly advice me regarding this as soon as possible.
Thank you for your help.