Dear AMPL team,
could you kindly include a presolve option that removes all explicitly defined variables and constraints? Example:
minimize objective: x[3]^2;
subject to
ode: x[3] = x[2];
user: x[2] = x[1];
should become
minimize objective: x[1]^2;
after preprocessing. Only linear, explicit definitions like the above would be sufficient - quickly implementable, but really helpful.
Background: I am working on a problem-independent optimal control package on top of ampl. As there are no function handles, I use such lifted or slack variables for the definitions of functions. There are many thousands of them in my models. Sometimes this lifting is benefitial (compare Lifted Newton SIOPT paper by Albersmeyer and Diehl), but often there are simply too many, despite the sparsity structure. An option to be able to turn this feature on would be perfect.
Thanks,
Sebastian Sager