When I set option substout 1, why doesn AMPL make the substitutions that I expect?
A variable is ineligible to be substituted out of a problem if (a) it is subject to any bounds or integrality conditions, or (b) it has already appeared on the right-hand side of a constraint that was used to make a substitution. Case (a) includes bounds or integrality conditions specified in the variable’s declaration, and also bounds that are added by AMPL’s presolve phase. Thus turning presolve off (by setting option presolve 0) may permit a greater number of substitutions. For constraints indexed over a set, the incidence of case (b) may depend on the ordering of the set.