Obtain reduced model after AMPL presolve

How can I obtain the reduced model — that is, the model after presolve has been applied by AMPL? It seems that I should use the solexpand command… Is this correct? Thanks.

EDIT: I applied solexpand - but this appears to be too weak… For example, I have 2 constraints in my model, (a) x_1 + x_2 + x_3 \le 1, and (b) x_1 + x_2 + x_3 + x_5 \le 1… (All variables are non-negative)… I expected solexpand to remove the first constraint, but it does not — it retains both constraints.

Gurobi presolve seems to work a lot better… I used their writepresolved option as follows:

option gurobi_options 'writepresolved="XYZ.lp"';

When I used the above option in my Integer Program (AMPL format), I was able to obtain a reduced model (XYZ.lp) with 30% of the constraints removed… For further details, see

Gurobi options in AMPL

AMPL only applies the presolve steps described in Experience with a Primal Presolve Algorithm. By setting option show_stats 1; before solving, you can see a summary that shows the numbers of variables and constraints that AMPL’s presolver has removed.

Gurobi has additional presolve steps sometimes remove many more variables and constraints. If you include outlev=1 in your gurobi_options string, the resulting log listing will include summary of Gurobi’s presolve reductions. Also Gurobi’s writepresolved option is exactly what we would recommend if you want to see a listing of Gurobi’s presolved problem in “lp” format.