Are you actually allowed to output both a continuous-time and discrete-time expression for the same equation?
Spec 3.8.3 says:
For an equation expr1 = expr2 where neither expression is of base type Real, both expressions must be discrete-time expressions.
Exceptions are only made for records.
That's a really good remark.
I changed the model a bit, so that the mode
has a discrete change of c while the
continues integration.
So I think you are right we need to handle
that whole equation as discrete.