Capturing Result

29 views
Skip to first unread message

Nastaran Tork

unread,
Sep 8, 2023, 1:38:31 PM9/8/23
to AMPL Modeling Language
Hi,  I'm using path solver in my project but when I'm running the following script code in my .run file: 

model test14.mod;

solve;

display cost;

display x;

printf "cost,pathflows,\n" > "results.csv";

for {i in 1..Total_Num_Var} {

printf "%f,", cost[i] >> "results.csv";

printf "%f,", x[i] >> "results.csv";

}

for {i in 1..80} {

printf "%f\n", LinkFlows[i] >> "resultLinkFlow.csv";}

close "results.csv";

close "resultLinkFlow.csv";

close {results_out};

I received the following error:

 ** EXIT - solution found.

Major Iterations. . . . 34

Minor Iterations. . . . 30022

Restarts. . . . . . . . 2

Crash Iterations. . . . 4

Gradient Steps. . . . . 12

Function Evaluations. . 329

Gradient Evaluations. . 41

Basis Time. . . . . . . 182.244000

Total Time. . . . . . . 190.953000

Residual. . . . . . . . 8.398294e-09

Postsolved residual: 8.3983e-09

Path 5.0.05: Solution found.

38 iterations (4 for crash); 30022 pivots.

329 function, 41 gradient evaluations.

Error at _cmdno 174 executing "solve" command

(file temp.run, line 18, offset 409):

Solution obtained using an unauthorized or unknown solver. Please contact sup...@ampl.com.

So I can't capture my results to save in an Excel file.

I would appreciate it if you let me know how can I fix it.


AMPL Google Group

unread,
Sep 11, 2023, 10:53:20 PM9/11/23
to AMPL Modeling Language
Hi Nastaran,

The Path solver is not part of the solvers authorized to be used with AMPL CE licenses. You can use AMPL CE with selected open-source solvers (CBC, HiGHS, Couenne, Bonmin, Ipopt, SCIP, and GCG) and commercial solvers during solver trials. To use the Path solver you will need a full-featured AMPL license, which you can request at https://portal.ampl.com/user/ampl/request/trial


--
Filipe Brandão

We're switching to a new, enhanced user forum.
Join it now at discuss.ampl.com.
{#HS:2355548671-119298#}
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/ampl/0ee52410-c435-481e-af5e-4b0e0d5ed7bbn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages