Constraint violation with Time-Scaled model

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)

Hi,

I think it is an interesting example!
I try to do some experiments with it soon!

Constraints are only enforced/evaluated at the shooting nodes in acados.
Thus, the solution that is found, is indeed feasible for the discretization.

One way to mitigate this issue is to put bounds on the ScaleFactor, to forbid very large time intervals as in your example.
However, this does require some prior knowledge of the solution, since a too low uppper bound might cause other problems.

I am working on a paper about a different cost and constraints discretization within acados.
A preprint will be available in a few weeks!

Best,
Jonathan