Minimal example for time varying control

Asked by Peter Maday

I was wondering if there was a minimal example for a time varying control problem?

As far as I can tell using time varying control variables is possible, however a little bit more involved at the moment than in static cases. Based on the "" example ( it seems to me that it can essentially be accomplished using a vector of control variables for each timestep with some juggling around inside the forward loop to make sure the control variables' effect is temporally localized. Is this the suggested example to study, or maybe there is a simpler one with less complexity?

Thanks a lot!

Question information

English Edit question
dolfin-adjoint Edit question
No assignee Edit question
Solved by:
Simon Funke
Last query:
Last reply:
Revision history for this message
Nico Schlömer (nschloe) said :

I'd also be very much interested in this.

Revision history for this message
Best Simon Funke (simon-funke) said :

Hi Peter and Nico,

I wrote a (relatively) small example for a time-dependent control optimisation. You can get it here:

The way it works is that I create a list of control variables, for each timestep one. In the timeloop I then update the form such that it uses the correct control variable of that timestep.

Hope this helps,


Revision history for this message
Peter Maday (madapeti) said :

Thanks Simon Funke, that solved my question.