Hi. I’m trying to solve problem with floating time horizon. Since acados doesn’t allow to leave time horizon free, I’ve ended up with time-scaled model. Here’s the hitch. When I constraint state variable there violations have their place (Look at picture: velocity is bounded at |V_max| = 2)

The interesting fact is that at the pic above is interpolated data (Interpolated by model via optimized control inputs)

The raw solution on horizon = 50 is on the plot below

So when it’s not interpolated - the constraints look just fine. But if I interpolate it with control (that’s given me by solver) the constraints are being violated.

Am I too stupid to have no clue how it could be, or there’s flaw in solver?

Here’s my problem formulation (Maxim Shcherbakov / Speed_profile_acados · GitLab)

Thanks in advance)