An error occurs when the.run file is written in matlab

I am a new user of ampl and recently tried to make calls in matlab. This is the.run file I wrote.

reset;
model model.mod;
include data.INIVAL;
#option solver path “E:/AMPL/amplbundle.mswin64/ampl.mswin64”;
#option solver path ‘E:/AMPL/amplbundle.mswin64/ampl.mswin64’;
option solver ipopt;
solve;

However, when I run it, I get an error with the following message:

Ipopt 3.12.13:
Error at _cmdno 507 executing “solve” command
(file r0.run, line 7, offset 194):
can’t open C:\Users\WYM\AppData\Local\Temp\at2444.sol .

I would appreciate it if anyone could give me some answers.

1 Like

Hi @Yuanmin,

It looks like ipopt crashed. What happens when you run it directly from the AMPL prompt? Isn’t there any additional output from ipopt?

Thank you very much for your reply.
Typing directly at the ampl command line looks like this

ampl: model E:/AMPL/ampl_model/M0.mod
ampl: data E:/AMPL/ampl_model/ig0.dat
ampl: solve;
MINOS 5.51:
Sorry, a demo license is limited to 300 variables and
300 constraints and objectives.
You have 1111 variables, 808 constraints, and 1 objective.
exit value 1

I am a graduate student. Can I apply for such a free license?

Hi @Yuanmin,

That error message is due to minos being the default solver. Could you please set option solver ipopt; before solve; and send us the output?

Hello, I‘m writing to see whether you solve this problem, I am also encountered a similar problem.

It seems that Yuanmin had two different problems — a crash in Ipopt, and “option solver ipopt;” not being set. Which of these problems are you having?

Also since your problem may not be exactly the same, it may help if you can show an example of what you are running and what error messages you are seeing.