Description
This model demonstrates how various special values are intepreted when reading a CSV file with CSV2GDX. This model is referenced in "Additional examples for extended use Example 6 - Reading special values" from the CSV2GDX Documentation. Keywords: CSV2GDX, data exchange, GAMS language features
Category : GAMS Data Utilities library
Main file : csv2gdx7.gms includes : csv2gdx7.gms
$title CSV2GDX Example 7 - Reading special Values with CSV2GDX (CSV2GDXE7,SEQ=116)
$onText
This model demonstrates how various special values are intepreted when
reading a CSV file with CSV2GDX.
This model is referenced in "Additional examples for extended use Example 6 -
Reading special values" from the CSV2GDX Documentation.
Keywords: CSV2GDX, data exchange, GAMS language features
$offText
$onEcho > specialValues.csv
one,two,three,four,five,six
red,red,,Undef,'3.3',red
red,red,"4.4",5.5,Eps,green
"red",'green',7.7e+02,8.8,-Inf,blue
blue,blue,10,0,NA,purple
$offEcho
$call csv2gdx specialValues.csv id=A index=1,2,6 values=3..5 useHeader=y storeZero=y trace=0
$ifE errorLevel<>0 $abort Problems reading CSV file!
Set color, number;
$gdxIn specialValues.gdx
$load color = dim1
$loadM color = dim2
$loadM color = dim3
$load number = dim4
Parameter A(color,color,color,number);
$onUNDF
$load A
$offUNDF
$gdxIn
display A;