You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would allow MTK to specify boundary constraints that look like [x(t) < 3], where we want every value of the solution to be less than 3. Thinking the codegen would look like
That's not necessarily a good approximation and would converge as O(h) since it's equivalent to the maximum approximation given a linear interpolation. For a BVP intermediate solution, we don't just have a solution at points but a whole collocation polynomial. What you'd want to do is differentiate that polynomial w.r.t. t and solve for the roots. This can be done analytically ahead of time and stored. That would give the critical points. The maximum and minimum of the continuous solution is then O(h^n) approximated by the polynomial at the critical point. So then minsol(sol, (0., 1.)) would evaluate the interpolation at every interval at the critical points, and then take the min/max of the evaluated points.
We can start with just the discrete min/max as a starting point, but there are lots of scenarios where the latter would be much more accurate. And since this would be used for constraints, the more accurate form would likely be highly preferred down the line.
This would allow MTK to specify boundary constraints that look like
[x(t) < 3]
, where we want every value of the solution to be less than 3. Thinking the codegen would look likeThe text was updated successfully, but these errors were encountered: