Possible indexation problem
KarasevPavel opened this issue · 2 comments
Line 48 in 302e12a
I think, there is an indexation problem here in the fullsize branch, when we want to get initial_guess_[i+1]
and i == N, because initial_guess_
array has only "N+1" elements in it
Thanks for pointing this out, I will have a look. The only place "N+2" element is used is to generate the dynamics of the N+1 step, which is not used in the MPC formulation. But if the code is really stepping over the index length this is still bad, and I will add a fix as soon as I have time.
There is a very simple solution to this problem, just use initial_guess_[std::min(i+1, N)]
as done in the dev/docker-cppad brunch. I will add the fix as soon as possible to the other brunches.