I have a function that does or does not have a derivative and inverse, depending on values of some parameters/coefficients. Can I make the annotations derivative and inverse conditional somehow? Something like
function y_from_x
input Real x;
input Boolean hasInverse;
output Real y;
...
equation
...
annotation(inverse(x=x_from_y(y=y) if hasInverse));
end y_from_x;