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 support@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.