Change the solvers using loop

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:

option solver (i);

The general rules for this situation are given in the subsection on String expressions in AMPL commands in Chapter 13 of the AMPL book.

1 Like