How to read a table with dynamic numbers of rows and columns

16 views
Skip to first unread message

arr...@gmail.com

unread,
Apr 22, 2016, 5:52:21 PM4/22/16
to AMPL Modeling Language
Hi folks, 
            This is really a native question. I have a table with # of rows determined by set R and # of columns determined by set C. Both sets are not known until data input started.  I would like to know how should I read such a table.  

Thanks in advance!

Feng

arr...@gmail.com

unread,
Apr 23, 2016, 4:47:14 PM4/23/16
to AMPL Modeling Language, arr...@gmail.com
Never mind. I found a piece of old code that has this. 

read{i in I, j in J} a[i,j] < input.txt;
Reply all
Reply to author
Forward
0 new messages