Getting warning, but model works well

I am getting this warning during mtkcompile, while I was not getting it before. It might be related to an update in StructuralTransformations. The model still works fine. How can I disable the warning?

┌ Warning: Internal error: Variable (l0(t))[8] was marked as being in 0 ~ -(stiffness(t))[8] + ifelse(
(len(t))[8] > (l0(t))[8], (0.7853981633974483stiffness_frac*SymbolicAWEModels.get_e_tether(pset)*(Symb
olicAWEModels.get_diameter(psys, 8)^2)) / (len(t))[8], (0.7853981633974483stiffness_frac*SymbolicAWEMo
dels.get_e_tether(pset)*(SymbolicAWEModels.get_diameter(psys, 8)^2)*SymbolicAWEModels.get_compression_
frac(psys, 8)) / (len(t))[8]), but was actually zero
└ @ ModelingToolkit.StructuralTransformations ~/.julia/packages/ModelingToolkit/vyvd9/src/structural_t
ransformation/utils.jl:291

Warning are not error so your code is working fine. You simply ignore warning.

I am getting this warning hundreds of times, so it is definitely an issue for me, and it is not clear to me what is wrong with my code.

Does it happen with @register_array_symbolics ?
In my case, the easiest solution was to use Suppressor.jl.

Yes, I do use @register_array_symbolics. I did not have this warning before, it came after an update of some package, therefore I don’t want to suppress it.

Open an issue with a reproducer. Generally this message is harmless but it likely shouldn’t be there…

1 Like