I'm trying to debug an issue with transitions in a HybridModel. The problem is as follows (simplified):

I have to state variables, say x_1 and x_2. When the event occurs, they have values x_1 = 1.0, x_2 = 2.0. The EvMapping defines the maps

"x_2": "0" "x_1": "x_1/x_2"

After the eventmapping is applied, I would expext x_1 to be 0.5 and x_2 to be 0. However, I get x_1 = NaN, making me believe that a division-by-zero has occurred.

In the internals of EvMapping, a function evmapping(…) is created, but as far as I can tell it implements exactly the mapping that I define.

Is it possible that in applying the map, the numerical values are used that are obtain while applying the map? This would explain why I get a division-by-zero.