Hope all is well.
I want to compare the performances of a lot of different solvers, so I tried these commands in the console. However, it did not work. Is there any other way to avoid setting up the solver repeatedly?
set SOLVERS = {“minos”, “baron”, “gurobi”};
model ‘ex1.mod’;
data ‘ex1.dat’;
for {i in SOLVERS}{
option solver i;
solve;
display cost >> output.txt;
}
When your specify “option solver i;” AMPL sets option solver to the literal character string “i”. To instead set option solver to the value of index i, use this command: