Can't find file

17 views
Skip to first unread message

Nvr

unread,
Nov 16, 2017, 9:19:30 PM11/16/17
to AMPL Modeling Language
Hi, I'm getting the "Can't find file" error for model or data files that are in the same folder as the run file being executed. 
The only way around it to write the full directory path in the run file.
It doesn't work with default example models either! (attached screenshot)
If someone helps me in understanding what's wrong I'll be grateful.

Thanks!

Robert Fourer

unread,
Nov 17, 2017, 3:20:54 PM11/17/17
to am...@googlegroups.com

The message in the top bar of the command window indicates that you started AMPL by double-clicking on C:\Modelli\ampl.mswin64\ampl.exe.  Thus by default, AMPL will look for model files in the folder C:\Modelli\ampl.mswin64.  To tell AMPL that it should look for model, data, and run files in C:\Modelli\ampl.mswin64\models instead, give the command "option ampl_include models;" at the beginning of your AMPL session.

Bob Fourer
am...@googlegroups.com


Nvr

unread,
Nov 17, 2017, 4:36:16 PM11/17/17
to AMPL Modeling Language
Wow Robert Fourer himself, thank you professor!
Reply all
Reply to author
Forward
0 new messages