modelingtoolkitize requires a code is quasi-static, so the computation is not dependent on values.
modelingtoolkitize