[AMPL 24780] macOS "can't find file"

Hello, I am having problem with the AMPL IDE software. When I write my code, there is an error like
ample: model caff.mod;
can’t find file “caff.mod”
context: model >>>caff.mod<<<;

What can I do to be able to get the app to recognize my file.
I have the file saved in the same folder as the application and everything else that was downloaded for AMPL.

Is there a solution to this?

Thank you

In the IDE’s list of files – normally in the window at the left – be sure to double-click on your AMPL folder, so that it becomes the “current folder”. Then files like caff.mod will be found there.

If you continue to have trouble, take a screenshot of the whole IDE window, and paste it into a reply.

Hello,

Thanks for the quick reply. I did that and it still didn’t work. I attached the screenshot of my page

Thank you

The IDE file listing pane at the left shows that the current folder is your AMPL folder, /Users/joycedong/Desktop/AMPL. But you are trying to execute “model caff.mod;” – and there is no file named caff.mod in the listing. You do have a file named caff.mod that is open in the editor pane, but either that file is in a different folder, or it has been renamed since you opened it.

I notice that a file named “caff copy.mod” does appear in the IDE file listing. Is that supposed to be “caff.mod”? Then you can close caff.mod in the editor pane, rename “caff copy.mod” to “caff.mod”, and then double-click the filename to open it again. After that, you will be able to execute “model caff.mod;” successfully. (An easy way to rename the file is to control-click its name, then select “Rename” from the little menu that appears.)

If caff.mod already exists in a different folder, however, then simply close the file in the editor pane, and use the Mac Finder to move caff.mod to your AMPL folder. Then click the little “Refesh” icon at the top of the file listing pane, and “caff.mod” will appear there.

It looks like you will have the same problem with “caff copy.dat” and “caff-simple copy.mod”.