Re: [AMPL 6291] How to execute ".run" on Linux

1,743 views
Skip to first unread message

victor.z...@gmail.com

unread,
Nov 3, 2012, 8:39:00 PM11/3/12
to am...@googlegroups.com
Are you running "cplexamp filename.run"? You should run "ampl filename.run" instead.

To use cplexamp, which is a CPLEX solver driver for AMPL, add the following command to your run file before the solve command:

  option solver cplexamp;

HTH,
Victor


On Sat, Nov 3, 2012 at 2:13 PM, Edil Demirel <edild...@gmail.com> wrote:
Hi,

I've recently started using CPLEX on Linux. I would like to execute ".run" file but haven't succeeded so far. Previously, on windows, "ampl filename.run" was just working fine. While I know that cplexamp command is some sort of a connector between AMPL and CPLEX, I keep getting the "can't open filename.run.nl" error when I use that. Am I missing a specific command here?  I would really appreciate any leads.

Thanks in advance!

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ampl/-/hSWKFgJhRF0J.
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.

victor.z...@gmail.com

unread,
Nov 4, 2012, 6:31:24 PM11/4/12
to am...@googlegroups.com
Most likely the directory containing the ampl executable is not on your PATH or the ampl binary doesn't have the execute permission. In the first case you can either put ampl in the directory on the PATH like /usr/bin or specify the full path in the command - something like /path/to/your/ampl/directory/ampl. As a special case if the ampl executable is in the current directory you can run it with the command ./ampl

Victor


On Sun, Nov 4, 2012 at 10:19 AM, Edil Demirel <edild...@gmail.com> wrote:
Hi Victor,

Yes I have the option solver cplexamp command in my run file. I tried running "ampl filename.run" like you suggested, it says command 
bash: ampl: command not found. Any thoughts?

Thanks.
To view this discussion on the web visit https://groups.google.com/d/msg/ampl/-/E-4rko1cg88J.
Reply all
Reply to author
Forward
0 new messages