RE: [AMPL 14792] "Can't find file"

3,836 views
Skip to first unread message
Message has been deleted

Robert Fourer

unread,
Sep 23, 2017, 12:02:47 PM9/23/17
to am...@googlegroups.com
Are you double-clicking the "ampl" application (with the black square icon)? If so, due to the way macOS works, a command window will appear but the current directory (folder) will not be your AMPL folder. This can be fixed with the following AMPL command at the beginning of the AMPL session:

cd /Users/camillajohansen/Desktop/ampl_macosx64;

This changes the current directory to the one referenced in the error message that you received.

If you are starting AMPL in some other way, then you can get more help by posting a screenshot of the window where you are running AMPL, showing it as it looked when the error message appeared.

You may find it more convenient to use the AMPL IDE under macOS. You can download an IDE add-in from http://ampl.com/products/ide/.

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of camilla....@springbrettet.org
Sent: Friday, September 22, 2017 10:49 AM
To: AMPL Modeling Language
Subject: [AMPL 14792] "Can't find file"

I am trying to run ampl on my mac and I keep getting a "can't find file" error. I have saved my .mod and .dat files directly into the ampl64 folder.

This is the result:
Can't find file "generalchemicals.mod"
context: model >>> generalchemicals.mod <<< ;

include stack...
-, line 1 includes
/Users/camillajohansen/Desktop/ampl_macosx64/solvingfile.run


Message has been deleted

Robert Fourer

unread,
Sep 25, 2017, 1:08:19 PM9/25/17
to am...@googlegroups.com
Working within the IDE, use "option solver cplex;". (The standard installation of the IDE knows where to find the solvers.)

A related note: If you double click on the "models" folder in the file-listing pane at the left, then "models" will become the current folder and you will be able to use short commands like "include solvingfile.run" and "model generalchemicals.mod".

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of camilla....@springbrettet.org
Sent: Sunday, September 24, 2017 5:10 AM
To: AMPL Modeling Language
Subject: Re: [AMPL 14802] "Can't find file"

Im using AMPL IDE. Im posting a screenshot og the window (this time I got a different result, but I still don't understand what's wrong)


Reply all
Reply to author
Forward
0 new messages