RE: [AMPL 14085] Mysterious message "error processing var x[...]: no data for set I"

198 views
Skip to first unread message

Robert Fourer

unread,
May 26, 2017, 12:51:25 AM5/26/17
to am...@googlegroups.com
Are you getting any error messages before "no data for set I"? For example if you are getting an error like

Error reading table I with table handler tab:
Cannot open "I.tab".

then that would explain why there is no data for set I when you invoke "solve" -- AMPL was not able to read the data from the intended file. AMPL looks for the .tab files in the current folder, and gives this message if it can't find them. So if they are in some other folder, then you should give an explicit filename in the "table" statement. For example,

table I IN 'tabfiles\I.tab': I <- [i], ...

reads I.tab from a folder tabfiles inside the current folder, and

table I IN 'C:\Users\XYZ\Desktop\FILES\AMPL\I.tab': I <- [i], ...

reads I.tab from the folder C:\Users\XYZ\Desktop\FILES\AMPL.

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of Larry Bonczar
Sent: Wednesday, May 24, 2017 5:27 PM
To: AMPL Modeling Language
Subject: [AMPL 14085] Mysterious message "error processing var x[...]: no data for set I"

AMPL isn't reading my .tab files correctly. I can't place why. All code is below. Might it have something to do with my current directory?

Windows 10. 64-bit. Working from the AMPL IDE.



Reply all
Reply to author
Forward
0 new messages