option ampl_include 'C:\ampl_source_foler \
C:\ampl_data_foler';
table mydata: [id], dat1, dat2;
read table mydata;
Error at _cmdno 13 executing "read_table" command:
Error reading table mydata with table handler tab:
Cannot open "mydata.tab".
According to the AMPL book, ampl_include
is used for include
and similar statements rather than read data
:
For include phrases as well as model, data, and commands commands, files with simple names, e.g., not involving a slash (/), are sought in directories (folders) specified by option ampl_include.
But you can specify the path to the .tab file in the table declaration:
table mydata 'path/to/mydata.tab': [id], dat1, dat2;
or use a parameter if the path is used more than once:
param data_path symbolic = 'path/to/data';
table mydata (data_path & '/mydata.tab'): [id], dat1, dat2;
HTH,
Victor
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/wOTuvQPtcvE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.