AMPL IDE - Change Directory Problem

3,677 views
Skip to first unread message

mahraz amini

unread,
Feb 9, 2016, 10:22:20 AM2/9/16
to AMPL Modeling Language
Dear all

in AMPLE IDE when I want to change my directory I faced this problem for example : "Cannot change directory to /Users/Mahraz/Dropbox/new/AMPL/AMPL_EXAMPLES"
and it does not matter which folder I want to go , it does not let me to change. dose any body know the reason ?

Thanks,
Mahraz

Victor Zverovich

unread,
Feb 9, 2016, 5:06:27 PM2/9/16
to am...@googlegroups.com
Do you get this error when clicking on a folder in the Current Directory view? What happens if you run the following command in the AMPL console in the IDE:

  cd /Users/Mahraz/Dropbox/new/AMPL/AMPL_EXAMPLES;

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.

mahraz amini

unread,
Feb 10, 2016, 12:26:11 PM2/10/16
to AMPL Modeling Language
Hi Victor

When I write that code in the AMPL IDE, it accepted the code, I mean did not show any error but nothing changed...

Thanks,
Mahraz

Victor Zverovich

unread,
Feb 10, 2016, 8:27:41 PM2/10/16
to am...@googlegroups.com
What about the first question:

> Do you get this error when clicking on a folder in the Current Directory view?

And what output did you get after entering the cd command in the AMPL console in the IDE? Could you copy the output and post it here?

- Victor

mahraz amini

unread,
Feb 22, 2016, 9:45:45 AM2/22/16
to AMPL Modeling Language
Hi Victor

when entering the code in IDE it shows nothing... it does not show any error as well, just accept the code and do nothing

Thanks,
Mahraz

Victor Zverovich

unread,
Feb 23, 2016, 1:41:14 PM2/23/16
to am...@googlegroups.com
Doesn't it change the directory and print it back as shown in the attached screenshot?
Screenshot from 2016-02-23 10:38:54.png
- Victor

mahraz amini

unread,
Mar 3, 2016, 9:46:22 AM3/3/16
to AMPL Modeling Language
when I use that code it dose not show any error and it seems changing the directory


but when I click on the folder on the left to go to that folder I was faced this error:


do you have any idea why?


Thanks,

Mahraz

Victor Zverovich

unread,
Mar 4, 2016, 6:40:13 PM3/4/16
to am...@googlegroups.com
Thanks for providing additional details. Since AMPL's cd command works the problem must be somewhere on the IDE side.

Does the error occur only when you try to navigate to this directory (/Users/Mahraz/Dropbox/new/AMPL/cloud/IEEE14bus/AMPL_MATLAB) and what IDE version do you use?

- Victor

mahraz amini

unread,
Mar 10, 2016, 10:42:44 AM3/10/16
to AMPL Modeling Language
some times it works without a problem and I can change directory but most of the time I face this error and it does not happen only when I want to change to any specific directory but all the other directories have the same problem. 
ample ide version is : Eclipse 4.4 for Mac OS X, Copyright IBM Corp. and others 2002, 2014. All rights reserved.

Thanks
Mahraz

Victor Zverovich

unread,
Mar 10, 2016, 6:03:50 PM3/10/16
to am...@googlegroups.com
I meant not Eclipse version, but AMPL IDE version. You can find it in the About box (Main menu -> Help -> About). Could you post the text shown there or send a screenshot?

- Victor

mahraz amini

unread,
Mar 21, 2016, 5:56:37 PM3/21/16
to AMPL Modeling Language
Hi Victor

AMPL IDE


Version: 3.1.0.201510231952


Copyright (c) 2015 AMPL Optimization Inc.

http://www.ampl.com

This product was developed using the Eclipse platform, http://www.eclipse.org/platform/.


Thanks

Mahraz

Victor Zverovich

unread,
Mar 23, 2016, 2:41:56 PM3/23/16
to am...@googlegroups.com
Hi Mahraz,

Thanks for sending the version information. It appears that the error can occur when AMPL is in the process of executing some code and the IDE cannot communicate to it. We'll address this issue in the next release.

- Victor

carlos...@gmail.com

unread,
May 11, 2017, 8:14:07 AM5/11/17
to AMPL Modeling Language
The same issue is happening to me and the workaround solution I found is as follows:

restart ampl
before you do anything else, navigate to the desired directory on the left panel (via double click on the desired directory or copy paste the path)

now you can use the files on the directory selected. It will be saved as current directory even after restarting the ampl.

Additionally and at least for now, it is working as expected: I can run models, etc, and change directories whenever I need to without having to restart AMPL.

nicolaso...@hotmail.com

unread,
May 17, 2018, 10:35:07 AM5/17/18
to AMPL Modeling Language
PLEASE PLEASE HELP ME... I DONT KNOW WHY ONCE I PUT FOR EXAMPLE include whatever.run; and ENTER      INSTEAD OF RUNNING AND GIVING ME AN ANSWER, IT KEEPS SHOWING AMPLE ONE ROW BELOW!!!!!!

AMPL Google Group

unread,
May 17, 2018, 1:43:02 PM5/17/18
to Ampl Modeling Language
Do you have solve command in your '.run' file? It sounds that you are missing some commands in your run file.

--
Paras Tiwari
am...@googlegroups.com
{#HS:582812370-7948#}
--

florian....@gmail.com

unread,
Oct 22, 2018, 11:37:53 AM10/22/18
to AMPL Modeling Language
Hey Nicolaso,

Did you solve your problem ? I have the exact same thing. The program just seems not to respond...
THanks
Florian

AMPL Google Group

unread,
Oct 22, 2018, 2:54:52 PM10/22/18
to Ampl Modeling Language
The initial message by Nicolaso ask about Cannot change directory. But you said that the program just seems not to respond... It's not clear what problem you are facing. Are you getting cannot change directory error message or the IDE is not responding when you send some command to it? Please provide more detail about your problem.

Thanks,
Paras

--
Dr. Paras Tiwari
am...@googlegroups.com
{#HS:690907916-26555#}

Azadeh

unread,
Jan 29, 2019, 12:49:52 PM1/29/19
to AMPL Modeling Language
Hello,

I also am encountering similar problem with AMPL IDE. 

For instance, I ran my model (through a .run file) from the correct directory and I receive the message that CPLEX has solved the model. But afterwards when I simply use the display command or any other command for that matter, the IDE hangs and doesn't show anything. Moreover, at this point I am not able to change the directory as you guys were discussing.

I was wondering if you guys have a solution to address this issue.

Thank you in advance.

Best regards,

Azadeh

Ansuman Swain

unread,
Jan 29, 2019, 12:58:39 PM1/29/19
to AMPL Modeling Language
Hi,

Can you please post a screenshot here. Also the version of the IDE you are using. 

You can find the version information in 'Help-> About' section of the IDE.

Azadeh

unread,
Jan 29, 2019, 1:42:04 PM1/29/19
to AMPL Modeling Language
Hi,

Please kindly find the attached screenshot of my Console and the version of IDE.

Best regards,

Azadeh
Screenshot.png

Azadeh

unread,
Jan 30, 2019, 10:31:02 AM1/30/19
to AMPL Modeling Language
Hi,

I also have a newer version of AMPL2018 (please see the attached snapshot) for which I encounter the same problem. The problem does NOT disappear even if I restart AMPL or if I restart my laptop! It some times works and other times I stuck with this issue.

Please let me know if you have a recommendation to solve this issue.

Best regards,

Azadeh
AMPL IDE 2018 (Newer version ).png

Ansuman Swain

unread,
Jan 30, 2019, 10:48:39 AM1/30/19
to AMPL Modeling Language
Hi,

Can you confirm if you are restarting AMPL process from the IDE (by double clicking on interrupt icon). A recent bug fix was related to changing the directory after AMPL process is restarted from the IDE.

Is the execution of the .run file is complete when you are changing the directory.

Thanks,
Ansuman

Azadeh

unread,
Jan 30, 2019, 10:59:54 AM1/30/19
to AMPL Modeling Language
Hi,

I have tried both restarting AMPL by double clicking on interrupt icon and by closing the whole IDE and reopening it (none helps). The interrupt icon does not work at all, it looks like that the AMPL is stuck and no matter what I type in the command window or even double clicking on interrupt button, there is no reaction from AMPL.

I believe yes, this issue occurs when the execution of the .run file is completed; because I can see the result reported by CPLEX in the command window (please see the attached screenshot).

Best regards,

Azadeh
Screenshot (2).png

Azadeh

unread,
Jan 30, 2019, 11:14:24 AM1/30/19
to AMPL Modeling Language
Hi again,

My explanation in the previous post is for IDE 2015; for the IDE 2018 version, the restart button clears the command window but I cannot change the directory and I get the following message when I try (please see the attachment).

Moreover, in the 2018 version despite the fact that interrupt button restarts the AMPL, when I rerun my .run file (in the same directory), I still have the same issue that after solving the problem, AMPL stuck and whatever I type in the command window has no response from AMPL (e.g., when I try "display" results). This issue is an addition to not being able to change the directory.

Best regards,

Azadeh
Error.png

Ansuman Swain

unread,
Jan 30, 2019, 11:37:34 AM1/30/19
to AMPL Modeling Language

Can you please attach your model and data file here.

Thanks,
Ansuman

Azadeh

unread,
Jan 30, 2019, 11:40:37 AM1/30/19
to AMPL Modeling Language
Hi,

I would say there are two issues: (1) not being able to change the directory, (2) AMPL getting stuck when it has completed a .run file. The second one is in fact more problematic because I could put every needed file in the same directory.

One thing that I observe is that in both 2015 and 2018 IDEs, when I close AMPL entirely and reopen it I am able to change the directory (initially); but after running/completing my .run file the two above-mentioned problems occur. 

The only difference between 2015 and 2018 versions of IDE is that in the 2018 version I can restart the AMPL by double clicking on the interrupt button and rerun my .run file (without being able to change the directory) while for the 2015 version the interrupt button is completely useless in that situation. 

But in both versions after one time completing a .run file, the command window of AMPL stuck.

Best regards,

Azadeh
Message has been deleted

Azadeh

unread,
Jan 31, 2019, 10:53:20 AM1/31/19
to AMPL Modeling Language
Hi Ansuman,

I realized what was the problem and now it is fixed.

At the end of my .run file I commented some lines by using /* and # but I didn't close with */ (please see the attached screenshot). I didn't realize that could be problematic because I wasn't getting an error and the parts that I wanted to be as comment were in fact green.

Best regards,

Azadeh
Commenting.png
Reply all
Reply to author
Forward
0 new messages