This is a follow-up question to my previous question: Modelica smoothOrder of cubic polynomial
I am contributing to a large existing library with maybe 50 smoothOrder annotations in functions. These are often piecewise defined function, with different function definitions in the different branches of an if-else statement.
A manual approach for checking the smoothness can be to evaluate and plot the function and all (partial) derivatives close to the switching condition of the if-else, up to the order that is defined. If the values and plots of derivatives are continuous, the annotation is correct.
But this manual approach is quite time consuming, so it would be great to have some kind of automated check. Does this exist, or can anyone share a sample script or model to help getting started?
