Implementing Piecewise through sp.Piecewise is not a good idea if the arguments change dynamically, as this leads to poor integration accurracy (see https://github.com/AMICI-dev/AMICI/blob/master/documentation/implementation_discontinuities.rst). Wondering whether the feature shouldn't be disabled for the time being.