Changes in mtkcompile between v9.54 and v11.26

I am in the process of updating from MTK version 9.54 to 11.26 for my model. In general it looks like many things have sped up, which is great!

There is one issue that I’m running into, namely that during mtkcompile I now get an ExtraEquationsException that did not get thrown in v9.54. My model is more than 6000 equations so I cannot easily create a MRE from this.

Do you have any suggestions about conceptual changes to the mtkcompile algorithm between MTK v9 and MTK v11 that could make it throw this ExtraEquationsException? I will start debugging the system myself, but as it’s such a large model it would be helpful if there are some pointers that can give me a direction in the search.

What is the exact error that you get? Does MTK say anything about which equations/variables it thinks are causing it?

I would recommend to take a quick look at the MTK v10 release notes and MTK v11 release notes. Do any of the changes seem to hit your model? You could try to partially upgrade to v10 first, and then v11. Or more generally bisect for versions in-between to try to locate the change that broke your model.

Also, does it happen when calling ssys = mtkcompile(sys), or when creating (say) initialization problems when calling ODEProblem(ssys, ...)? In particular, several initialization-related things have changed from v9-v10-v11 IIRC.

This also really sounds like a type of debugging problem where simply throwing an AI coding agent at it is worth a try. I would honestly try that first if you have access to one.

Thanks for your reply. It was happening during the mtkcompile(sys) call, but I think the issue was due to differences with the System() call compared to the ODESystem() call from v9.

I managed to find the equations that were the problem (the MTK suggestions were not the actual problem). I think I introduced an error while updating my model to make it work with the v11 of MTK!