I need to detect whenever there is a change in a RealInput value X. I habe tried to check if X == pre(X), but only receive an error and a warning that Real cannot be compared for equality. I also thought about using the derivative of X, but there is no explicit expression for this.
Other thoughts of mine have been to try to sample the continuous input into discrete variables that I can compare. Could this work in some way?