Bob Fourer
4...@ampl.com
/Users/jfarland/Desktop/AMPL/ampl_macosx64/ampl
And is the name of your homework directory (the one that contains HW1.mod)
as follows?
/Users/jfarland/Desktop/AMPL/ampl_macosx64/ampl/752
Then before you do anything else, type the following in the terminal window:
cd /Users/jfarland/Desktop/AMPL/ampl_macosx64/ampl
Then type
./ampl
and you should get an "ampl:" prompt. Then try loading the model file with
the command
model 752/HW1.mod
(Note that case of HW and mod is significant.) If the answer to both the
above is not "yes" then some adjustments will be necessary. But the key
thing is that AMPL interprets filenames relative to the directory that was
current when the AMPL program was started. The "cd" command in this example
acts to change the current directory.
Bob Fourer
4...@ampl.com
> -----Original Message-----
From: AMPL Modeling Language [mailto:ampl+m...@googlegroups.com]
Sent: Saturday, September 24, 2011 2:27 PM
To: Undisclosed recipients:
Subject: ampl - Google Groups: Message Pending
[{ILPV07-dhbGILCoCeWIwAY4-RRAIxnSK0}]
Upon trying a few syntaxes (very new to this language), this is what I
am getting for a response. It's gotta be something with the default
directory...
Last login: Wed Sep 21 09:36:31 on console
/Users/jfarland/Desktop/AMPL/ampl_macosx64/ampl ; exit;
Jonathan-Farlands-MacBook:~ jfarland$ /Users/jfarland/Desktop/AMPL/
ampl_macosx64/ampl ; exit;
ampl: model HW1.mod
Can't find file "HW1.mod"
context: model >>> HW1.mod <<<
ampl: model /752/HW1.mod
Can't find file "/752/HW1.mod"
context: model >>> /752/HW1.mod <<<
ampl: model 752/HW1.mod
Can't find file "752/HW1.mod"
context: model >>> 752/HW1.mod <<<
ampl:
Thanks
> -----Original Message-----
> From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of
> Jonathan Farland
> Sent: Tuesday, September 20, 2011 5:19 PM
> To: AMPL Modeling Language
> Subject: [AMPL 5054] MAC OSX Default Directory?!?
>
option solver '/Users/jfarland/Desktop/AMPL/ampl_macosx64/minos';
Of course this assumes there is the executable file "minos" in
/Users/jfarland/Desktop/AMPL/ampl_macosx64; substitute a different directory
if appropriate. If you got AMPL through the free AMPL for Courses package
then minos and the other solver files should already be in the same
directory as the "ampl" file. (On the other hand purchased solvers need to
be downloaded individually.)
Bob Fourer
4...@ampl.com
> --
> You received this message because you are subscribed to the Google
> Groups "AMPL Modeling Language" group.
> To post to this group, send email to am...@googlegroups.com.
> To unsubscribe from this group, send email to
> ampl+uns...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/ampl?hl=en.