-1

I use pyomo.dae to solve differential equation optimization I defined a set

m.e = ContinuousSet(bounds=(e0, ef))

But I want ef to be free as variable. It's a flexible end points differential problem. How can I accomplish it?

htam_ujn
  • 23
  • 5

1 Answers1

0

You change your differential equation

y'(x) = f(x,y(x))

over a flexible interval [e0, ef] to a version over the standard interval [0,1] via

u'(s) = T*f(e0+T*s, u(s))

where now e0 and T=ef-e0 can be treated like any other parameter.

Lutz Lehmann
  • 25,219
  • 2
  • 22
  • 51
  • `ef` is a flexible point during the optimization, it means `T` is not a constant value. I think I should call it FREE end point. – htam_ujn Nov 25 '19 at 04:58
  • Yes. This way the integrator has a fixed end point and the optimizator can change the true end-point by manipulating `T`. – Lutz Lehmann Nov 25 '19 at 10:47
  • You can find this "trick" also in the second part of this example: https://nbviewer.jupyter.org/github/jckantor/ND-Pyomo-Cookbook/blob/master/notebooks/06.03-Path-Planning-for-a-Simple-Car.ipynb – Lutz Lehmann Nov 25 '19 at 11:48