Presolve request

23 views
Skip to first unread message

seba...@sager1.de

unread,
Jul 27, 2016, 1:03:41 PM7/27/16
to AMPL Modeling Language
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



Victor Zverovich

unread,
Jul 28, 2016, 1:18:05 PM7/28/16
to am...@googlegroups.com
Setting option substout to 1 will do the trick, but note that it will keep variable x[3] eliminating x[1] and x[2] in your example:

  var x{1..3};
  minimize objective: x[3]^2;
  subject to
    ode:  x[3] = x[2];
    user: x[2] = x[1];
  option substout 1;
  solexpand;

will print

  minimize objective:
x[3]^2;

HTH,
Victor

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages