I am trying to load data from a csv file (attached) using the following command:
set
i /1*1001/
;
parameter x(i)/
$ondelim
$include Data.csv
$offdelim
/;
The file has only 1001 data points. However, I am getting the following message in GAMS:
error 465 Too much data on this line - rest ignored. Any suggestion on fixing this error is much appreciated.
GAMS error- Too much data on this line- rest ignored
GAMS error- Too much data on this line- rest ignored
- Attachments
-
- Data.csv
- (5.75 KiB) Downloaded 197 times
Re: GAMS error- Too much data on this line- rest ignored
Hi,
You are not using proper GAMS syntax. You miss the indices and also it seems that you do not need $ondelim.
The following code snippet illustrates how your data should be formatted (with or withour $ondelim)
I suggest to have a look at the documentation: https://www.gams.com/latest/docs/UG_Dat ... ASCII.html
I hope this helps!
Fred
You are not using proper GAMS syntax. You miss the indices and also it seems that you do not need $ondelim.
The following code snippet illustrates how your data should be formatted (with or withour $ondelim)
Code: Select all
parameter x(i)/
1 2, 2 2.003, 3 2.006, 4 2.009
/;
parameter xx(i)/
$ondelim
1,2
2,2.003
3,2.006
4,2.009
$offdelim
/;
I hope this helps!
Fred