Skip to content
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

Initialization warning when creating certain SDEProblems from Catalyst (but not corresponding ODEProblems #3331

Open
TorkelE opened this issue Jan 16, 2025 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@TorkelE
Copy link
Member

TorkelE commented Jan 16, 2025

Not sure why, but in this context, SDEProblems gives a warning, but not ODEProblems. Also, not too long ago neither of these cases generated warnings. Not sure what is going on.

using Catalyst

# Prepare model.
rn = @reaction_network begin
    (k1,k2), X1 <--> X2
end
u0 = [:X1 => 1.0, :X2 => 2.0]
tspan = (0.0, 1.0)
ps = [:k1 => 3.0, :k2 => 4.0]

ODEProblem(rn, u0, tspan, ps; remove_conserved = true, remove_conserved_warn = false) # No warning.
SDEProblem(rn, u0, tspan, ps; remove_conserved = true, remove_conserved_warn = false) # Gives a `Warning: Initialization system is overdetermined.`

Full warning:

┌ Warning: Initialization system is overdetermined. 1 equations for 0 unknowns. Initialization will default to using least squares. `SCCNonlinearProblem` can only be used for initialization of fully determined systems and hence will not be used here. To suppress this warning pass warn_initialize_determined = false. To make this warning into an error, pass fully_determined = true
└ @ ModelingToolkit ~/.julia/packages/ModelingToolkit/iQ7So/src/systems/diffeqs/abstractodesystem.jl:1349
@TorkelE TorkelE added the bug Something isn't working label Jan 16, 2025
@rveltz
Copy link
Contributor

rveltz commented Jan 16, 2025

why do you mention me?

@TorkelE
Copy link
Member Author

TorkelE commented Jan 16, 2025

Did I? If so it was highly unintentional, sorry! It might be because you commented on an issue in which I later linked to this issue (SciML/Catalyst.jl#1097), which seems a little bit excessive for you to be notified of.

@vyudu
Copy link
Contributor

vyudu commented Jan 16, 2025

Seemingly-related:

ssys = convert(SDESystem, rn)
ModelingToolkit.has_tearing_state(ssys) # false
osys = convert(ODESystem, rn)
ModelingToolkit.has_tearing_state(osys) # true

meaning that an InitializationProblem is not actually constructed for the ODESystem here but is constructed for the SDESystem.

@ChrisRackauckas
Copy link
Member

Looks like this is the last one for Catalyst v15 @TorkelE ?

@TorkelE
Copy link
Member Author

TorkelE commented Jan 21, 2025

Potentially #3347 might have some required remake changes. @AayushSabharwal do you know if there is anything left in remake that we might need? Once everything is done and we have a new MTK release I will go through everything, and then we should hopefully be able to do Catalyst v15 asap.

If Aayush thinks we might still be a while from remake working we might be able to do some Catalyst workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants