Time dependent PDE-constrained optimal control problem with a cost function including control function

Issue #16 resolved
cansu evcin created an issue

Dear Team,

I'm dealing with the solution of the optimal control of the convective FitzHugh-Nagumo equation in the attached code. The code is working well for the cost function without the term

inner(f,f)dxdt, (f is the control function)

but when I include it, then it gives me the following error (just the end of the error)

libadjoint.exceptions.LibadjointErrorInvalidInputs: Error in adj_iteration_count: No iteration found for supplied variable control:1:0:Forward.

I couldn't figure out how to solve this.

Thanks in advance for any advice, Cansu

Comments (4)

  1. Simon Funke

    Hi Cansu,

    It looks like your control f is not time-dependent but you are integrating it over time in the functional with f*dt. The code works if you use inner(f, f)*dx*dt["START_TIME"] instead.

    Simon

  2. cansu evcin reporter

    Hi Simon, Thanks for your reply, but if my aim is to use a time dependent control function f and have an integral over all time, then how should I define this function f? Thanks in advance, Cansu

  3. Simon Funke

    Then you need to create a separate f Function for each timestep. Your control to optimise is then a list of these fs. In the functional you can use a sum over all fs.

  4. Log in to comment