Can't find file

1,971 views
Skip to first unread message

Aristide GIULIANO

unread,
May 15, 2016, 6:21:55 PM5/15/16
to am...@googlegroups.com, sup...@ampl.com

Morning,

I'm a PhD student of University of Salerno. I have problem with AMPL software.

When I'm in AMPL console I write my code, for example:

ampl: model 3iter_261115.mod

but the software shows me this message:

 

Can't find file "3iter_261115.mod"

context: model >>> 3iter_261115.mod <<<

 

What I have to do to solve this problem?

Thanks.

--
Aristide Giuliano
PhD in Chemical Engineering
University of Salerno
phone: +39 320 25 15 454
mail: agiu...@unisa.it - aristide...@sensesquare.eu

Robert Fourer

unread,
May 15, 2016, 6:35:56 PM5/15/16
to am...@googlegroups.com
AMPL is looking for your file 3iter_261115.mod the current folder or directory, but is not finding the file there. If you are using Windows, be sure that the file is not actually named something different like 3iter_261115.mod.txt (right click the file icon, select Properties, and check that the "Type of file" is "MOD file (.mod)" and not something else). Beyond that it is hard to be helpful without more information, however:

-- Are you using command-line AMPL, or the AMPL IDE?
-- What type of computer are you using?
-- What is the folder/directory where 3iter_261115.mod is located?
-- What is the folder/directory where you installed your AMPL files?

Bob Fourer
am...@googlegroups.com

=======

Aristide GIULIANO

unread,
May 24, 2016, 9:26:37 AM5/24/16
to Ampl

Morning,

I'm a PhD student of University of Salerno. I have problem with AMPL software.

When I'm in AMPL console I write my code, for example:

ampl: model 3iter_261115.mod

but the software shows me this message:

 

Can't find file "3iter_261115.mod"

context: model >>> 3iter_261115.mod <<<

 

What I have to do to solve this problem?

Thanks.

 

Aristide GIULIANO

unread,
May 25, 2016, 5:01:14 PM5/25/16
to Ampl

I resolved the problem. I'm using AMPL IDE.

But, now I can't use AMPL-cplex because this sentence appears: "Cannot invoke cplexamp: no such program."

Where I make a mistake?

I am attaching the screenshot of my screen.

Thanks.

--
stamp.docx

Victor Zverovich

unread,
May 26, 2016, 1:31:21 PM5/26/16
to am...@googlegroups.com
If you are using the CPLEX solver distributed by AMPL you should replace "cplexamp" with "cplex".

HTH,
Victor

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.

Aristide GIULIANO

unread,
May 30, 2016, 8:12:21 AM5/30/16
to Ampl

Also if I write "option solver cplex" appears: "Cannot invoke cplexamp: no such program."

What I have to do??

Thanks.

Aristide

Robert Fourer

unread,
May 30, 2016, 11:54:19 PM5/30/16
to am...@googlegroups.com
If you see "Cannot invoke cplexamp" then the solver option is still being set to cplexamp. If you are running a script (run file) then "option solver cplexamp;" may be appearing after "option solver cplex;" and overriding the solver setting. Or "option solver cplexamp;" may appear in your model file or data file.

Probably you can fix this problem by searching for (and removing) all references to "cplexamp" in all your files. If you still get the "Cannot invoke" message then try giving the command "option solver cplex;" immediately before your first "solve".

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of Aristide GIULIANO
Sent: Monday, May 30, 2016 1:44 AM
To: Ampl
Subject: [AMPL 12037] Re: Can't find file
Importance: High

bnmou...@gmail.com

unread,
Oct 18, 2017, 8:32:09 AM10/18/17
to AMPL Modeling Language
hello,

i faced the same problem and to solve it, i copied the files directory then paste it in the "AMPL IDE" current directory then include the file name in console.

BR,
Reply all
Reply to author
Forward
0 new messages