I often have data read in using $include files, formatted using the a.b.c 10 format
parameter myData(a,b,c) /
$include myData.txt
/;
myData.txt:
a1.b1.c1 10
a2.b2.c2 20
Is there a way to do this with csv files?
parameter myData(a,b,c) /
$include myData.csv
/;
myData.csv:
a1,b1,c1,10
a2,b2,c2,20
The motivation behind this is sometimes the data files are empty. I have switched to trying csv2gdx but if the csv file is empty it generates a gdx that exists but is empty and I then get a crash when trying to GDXIN $load the data from it (which makes sense).
In my txt data I use the $onEmpty so I can get around this. So if I can find a way to use $include myData.csv I could probably continue to do this.
All help appriciated
Thanks