[HW6] Evaluation & initial guess

[HW6] Evaluation & initial guess

by Yazykov Vladyslav -
Number of replies: 4

Hi,

do I understand correctly that the result of our solution depends on the way we initialize the solver? Is there any guide on how to do it? Also, does "this week's lab exercise problem" mean the LQ_fixed_final_state_BVP file which is in the "M-files for the lectures"?

Or maybe it's possible to tell from the plot whether the result is correct? The input going up to 60 seems relatively high for me, but perhaps it is due to my initialization? BVP resulting plot

Thanks in advance.

In reply to Yazykov Vladyslav

Re: [HW6] Evaluation & initial guess

by Hurák Zdeněk -
As for the location of "this week's lab exercise problem", it is (now) at the usual place (or go directly to https://moodle.fel.cvut.cz/mod/folder/view.php?id=220069). Incidentally it was hidden. Sorry for the confusion. Anyway, we only planned to use it on Wednesday, we would uncover it in time.
In reply to Hurák Zdeněk

Re: [HW6] Evaluation & initial guess

by Chaloupecký Tomáš -
I'd like to ask too whether is there some way to initialize the solver properly. After about 30 minutes of guessing numbers I have got something somewhat similar to the optimum, but this catching of ghosts certainly is not the correct approach. Or is it?
My result vs the optimal one
In reply to Chaloupecký Tomáš

Re: [HW6] Evaluation & initial guess

by Gurtner Martin -
Unfortunately, there is no better way. The optimization problemat hand has more local minima and whether you find the best one (i.e. the the global one) or not depends on the initial solution. If you have no idea how the final solution actually look, you must guess the initial solution. If you think that your final solution is suboptimal, you must try some other initial guess. Engineering is sometimes messy.

Anyway, your solution is so close that the problem probably lies somewhere else. My guess is that the solver used more or less discretization points. In any case, I will grade it as correct and check what is the cause of the small deviations.
In reply to Gurtner Martin

Re: [HW6] Evaluation & initial guess

by Chaloupecký Tomáš -
Actually I figured it out. The issue was I got in the process so confused I did not realise that time t_star is provided by the function as solution.x. I instead decided to make my own vector like this
t_star = linspace(0,5,length(sol.x)).
Don't ask me how this came to my mind more naturaly than just taking sol.x.... But that could work in case the sol.x would have consistent sampling.