-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in function generation with Catalyst.jl v14 #1009
Comments
It looks like the vector is just in a different order. Did you check the symbol order is as you expected? Are you using |
I checked for the symbol order, will update the MWE. Anyway, the vector is ones(7), so the IMHO order should not matter. |
Both of your outputs are the same, one is just in a different order. |
But I do't see the 44.949999999999996 value in the output from v14. |
Oh interesting, I see now. Are you sure it's function generation? Did you check the generated ODEs? |
@ChrisRackauckas can’t parameter order also change? (And change from the ordering within Catalyst.) |
@j-fu what happens if you instead pass probv.p to f? |
oh yes that's probably it. |
(Sorry I’m traveling and have cell phone only connectivity till Sunday.) |
I'm actually surprised it didn't just error, since it should use the split form and separate the integer parameters from the float ones. |
At some low level everything is now upconverted to floats if the symbolics are not explicitly declared as integers. I’m not sure I agree with this behavior but it is happening in MTK or lower now. |
Yeah this helps indeed! Thinking about it, it seems that it should be logical Thanks for the quick response! |
Yeah, you can’t rely on the Catalyst order any more being preserved in generated functions. So using the initial condition and parameter objects from generated problems is the way to go. |
I’m going to close this issue but feel free to reopen if there are further issues. |
Describe the bug 🐞
There seems to be an error with function generation in Catalyst.jl v14.
With Catalyst.jl v13, my code shows correct behavior, while with v14,
things appear to be wrong. I tried to cook down to the essentials, resulting
in the MRE below which looks at the output of the generated ODE description
function. We indeed see a difference of results between v13 and v14.
Minimal Reproducible Example 👇
Expected behavior
With Catalyst.jl v13 this prints
which is correct judging from the results of my example (which is too complex to reproduced here).
With Catalyst.jl v14 this prints
and my example fails.
Environment (please complete the following information):
using Pkg; Pkg.status()
for Catalyst.jl v14using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
for Catalyst.jl v14Additional context
@smaasz
The text was updated successfully, but these errors were encountered: