We have a model which needs to read in hundreds of GDX files. However, to limit the overhead, we try to limit the number of files actually read in through only 'sending' it the files it needs. See the following statement:
Code: Select all
$if exist "<filename.csv>" $call csv2gdx "<filename.csv>" output="<filename.gdx>" id=Par_name ...
$if exist '<filename.csv>' Execute_load '<filename.gdx>' Par_name =Par_name ;
Code: Select all
loop(fueltype,
put_utility 'shell' / 'if exist ".\FuelLimit_' fueltype.tl:0 '_N1.csv" csv2gdx ".\FuelLimit_' fueltype.tl:0 '_N1.csv" output=".\FuelLimit_' fueltype.tl:0 '_N1.gdx" id=FuelLimitIn index=1,2 values=3..lastCol useHeader=y'
);
Code: Select all
loop(fueltype,
put_utilities dummyFile 'gdxin' / '.\FuelLimit_' fueltype.tl:0 '_N1.gdx'
execute_load dummyPar=FuelLimitIn;
par_dgfuellimit_hourly(fueltype)= dummyPar;
);