From 04007b4359929290f31515f04fbfa821665d8ed3 Mon Sep 17 00:00:00 2001 From: Torkel Loman Date: Wed, 8 Jan 2025 13:54:31 +0000 Subject: [PATCH 01/10] add `warn_initialize_determined = false` --- test/network_analysis/conservation_laws.jl | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/network_analysis/conservation_laws.jl b/test/network_analysis/conservation_laws.jl index 31736d8fa2..d4545b273a 100644 --- a/test/network_analysis/conservation_laws.jl +++ b/test/network_analysis/conservation_laws.jl @@ -84,14 +84,14 @@ let end # Tests that `conservationlaws`'s caches something. -let +let # Creates network with/without cached conservation laws. rn = @reaction_network rn begin (k1,k2), X1 <--> X2 end rn_cached = deepcopy(rn) conservationlaws(rn_cached) - + # Checks that equality is correct (currently equality does not consider network property caching). @test rn_cached == rn @test Catalyst.get_networkproperties(rn_cached) != Catalyst.get_networkproperties(rn) @@ -175,10 +175,10 @@ end # Tests simulations for various input types (using X, rn.X, and :X forms). # Tests that conservation laws can be generated for system with non-default parameter types. -let +let # Prepares the model. rn = @reaction_network rn begin - @parameters kB::Int64 + @parameters kB::Int64 (kB,kD), X + Y <--> XY end sps = species(rn) @@ -211,7 +211,7 @@ let end # Checks that the conservation law parameter's value can be changed in simulations. -let +let # Prepares `ODEProblem`s. rn = @reaction_network begin (k1,k2), X1 <--> X2 @@ -309,7 +309,7 @@ end # Checks that conservation law elimination warnings are generated in the correct cases. let # Prepare model. - rn = @reaction_network begin + rn = @reaction_network begin (k1,k2), X1 <--> X2 end u0 = [:X1 => 1.0, :X2 => 2.0] @@ -324,12 +324,12 @@ let @test_nowarn convert(XSystem, rn; remove_conserved = true, remove_conserved_warn = false) end - # Checks during problem creation (separate depending on whether they have a time span or not). + # Checks during problem creation (separate depending on whether they have a time span or not). # Checks during problem creation (separate depending on whether they have a time span or not). for XProblem in [ODEProblem, SDEProblem] - @test_nowarn XProblem(rn, u0, tspan, ps) - @test_logs (:warn, r"You are creating a system or problem while eliminating conserved quantities. Please *") XProblem(rn, u0, tspan, ps; remove_conserved = true) - @test_nowarn XProblem(rn, u0, tspan, ps; remove_conserved_warn = false) - @test_nowarn XProblem(rn, u0, tspan, ps; remove_conserved = true, remove_conserved_warn = false) + @test_nowarn XProblem(rn, u0, tspan, ps, warn_initialize_determined = false) + @test_logs (:warn, r"You are creating a system or problem while eliminating conserved quantities. Please *") XProblem(rn, u0, tspan, ps; remove_conserved = true, warn_initialize_determined = false) + @test_nowarn XProblem(rn, u0, tspan, ps; remove_conserved_warn = false, warn_initialize_determined = false) + @test_nowarn XProblem(rn, u0, tspan, ps; remove_conserved = true, remove_conserved_warn = false, warn_initialize_determined = false) end for XProblem in [NonlinearProblem, SteadyStateProblem] @test_nowarn XProblem(rn, u0, ps) @@ -340,7 +340,7 @@ let end # Conservation law simulations for vectorised species. -let +let # Prepares the model. t = default_t() @species (X(t))[1:2] From 29c2ba15643660ba9537857d0467ac1d68182b06 Mon Sep 17 00:00:00 2001 From: Torkel Loman Date: Wed, 8 Jan 2025 16:01:57 +0000 Subject: [PATCH 02/10] mark broken tests as broken. Links relevant issues. --- test/network_analysis/conservation_laws.jl | 3 ++- test/upstream/mtk_structure_indexing.jl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/network_analysis/conservation_laws.jl b/test/network_analysis/conservation_laws.jl index d4545b273a..4390abe323 100644 --- a/test/network_analysis/conservation_laws.jl +++ b/test/network_analysis/conservation_laws.jl @@ -324,7 +324,8 @@ let @test_nowarn convert(XSystem, rn; remove_conserved = true, remove_conserved_warn = false) end - # Checks during problem creation (separate depending on whether they have a time span or not). # Checks during problem creation (separate depending on whether they have a time span or not). + # Checks during problem creation (separate depending on whether they have a time span or not). + @test_broken false # SDEProblems generate anacounted for warnings here. These should be figured out and `warn_initialize_determined = false` removed (https://github.com/SciML/Catalyst.jl/pull/1159). for XProblem in [ODEProblem, SDEProblem] @test_nowarn XProblem(rn, u0, tspan, ps, warn_initialize_determined = false) @test_logs (:warn, r"You are creating a system or problem while eliminating conserved quantities. Please *") XProblem(rn, u0, tspan, ps; remove_conserved = true, warn_initialize_determined = false) diff --git a/test/upstream/mtk_structure_indexing.jl b/test/upstream/mtk_structure_indexing.jl index 7e65ca6d54..a5ce015d51 100644 --- a/test/upstream/mtk_structure_indexing.jl +++ b/test/upstream/mtk_structure_indexing.jl @@ -117,7 +117,8 @@ end # Test remake function. let @test_broken false # Cannot check result for JumpProblem: https://github.com/SciML/ModelingToolkit.jl/issues/2838 - for prob in deepcopy([oprob, sprob, dprob, nprob, ssprob, eoprob, esprob, edprob, enprob, essprob]) + @test_broken false # Broken for SDEProblems: https://github.com/SciML/ModelingToolkit.jl/issues/3295, https://github.com/SciML/Catalyst.jl/pull/1159 + for prob in deepcopy([oprob, dprob, nprob, ssprob, eoprob, edprob, enprob, essprob]) # Remake for all u0s. rp = remake(prob; u0 = [X => 1, Y => 2]) @test rp[[X, Y]] == [1, 2] From 162eeffea6f1c1e5efcfc4de033ba41108648f71 Mon Sep 17 00:00:00 2001 From: Torkel Loman Date: Wed, 8 Jan 2025 16:59:01 +0000 Subject: [PATCH 03/10] mark another case as broken --- test/upstream/mtk_problem_inputs.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/upstream/mtk_problem_inputs.jl b/test/upstream/mtk_problem_inputs.jl index 83f5ea52a8..2c980a190c 100644 --- a/test/upstream/mtk_problem_inputs.jl +++ b/test/upstream/mtk_problem_inputs.jl @@ -131,7 +131,8 @@ let end # Perform jump simulations (singular and ensemble). -let +# Currently broken due to https://github.com/SciML/ModelingToolkit.jl/issues/3297 +@test_broken let # Creates normal and ensemble problems. base_dprob = DiscreteProblem(model, u0_alts[1], tspan, p_alts[1]) base_jprob = JumpProblem(model, base_dprob, Direct(); rng) From 2026b9ccd4794d740084cc74af3ba74fe37a52a1 Mon Sep 17 00:00:00 2001 From: Torkel Loman Date: Thu, 9 Jan 2025 10:38:16 +0000 Subject: [PATCH 04/10] rebase and update caps --- Project.toml | 4 ++-- docs/Project.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 6af1959171..0f6cedf0c6 100644 --- a/Project.toml +++ b/Project.toml @@ -58,7 +58,7 @@ JumpProcesses = "9.13.2" LaTeXStrings = "1.3.0" Latexify = "0.16.5" MacroTools = "0.5.5" -ModelingToolkit = "< 9.60" +ModelingToolkit = "<= 9.60" NetworkLayout = "0.4.7" Parameters = "0.12" Reexport = "0.2, 1.0" @@ -67,7 +67,7 @@ RuntimeGeneratedFunctions = "0.5.12" SciMLBase = "2.57.2" Setfield = "1" # StructuralIdentifiability = "0.5.8" -SymbolicUtils = "< 3.8" +SymbolicUtils = "<= 3.8.1" Symbolics = "6.22" Unitful = "1.12.4" julia = "1.10" diff --git a/docs/Project.toml b/docs/Project.toml index 73163c65ef..afb57dda41 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -61,7 +61,7 @@ IncompleteLU = "0.2" JumpProcesses = "9.13.2" Latexify = "0.16.5" LinearSolve = "2.30" -ModelingToolkit = "< 9.60" +ModelingToolkit = "<= 9.60" NonlinearSolve = "3.12, 4" Optim = "1.9" Optimization = "4" From 26ba3f4c53e0c88d3d6b8368a4e8286bffff516a Mon Sep 17 00:00:00 2001 From: Torkel Loman Date: Thu, 9 Jan 2025 10:59:03 +0000 Subject: [PATCH 05/10] update versioing --- Project.toml | 4 ++-- docs/Project.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 0f6cedf0c6..22998c392e 100644 --- a/Project.toml +++ b/Project.toml @@ -58,7 +58,7 @@ JumpProcesses = "9.13.2" LaTeXStrings = "1.3.0" Latexify = "0.16.5" MacroTools = "0.5.5" -ModelingToolkit = "<= 9.60" +ModelingToolkit = "< 9.60, =9.60" NetworkLayout = "0.4.7" Parameters = "0.12" Reexport = "0.2, 1.0" @@ -67,7 +67,7 @@ RuntimeGeneratedFunctions = "0.5.12" SciMLBase = "2.57.2" Setfield = "1" # StructuralIdentifiability = "0.5.8" -SymbolicUtils = "<= 3.8.1" +SymbolicUtils = "< 3.8.1, = 3.8.1" Symbolics = "6.22" Unitful = "1.12.4" julia = "1.10" diff --git a/docs/Project.toml b/docs/Project.toml index afb57dda41..6e5e7f0329 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -61,7 +61,7 @@ IncompleteLU = "0.2" JumpProcesses = "9.13.2" Latexify = "0.16.5" LinearSolve = "2.30" -ModelingToolkit = "<= 9.60" +ModelingToolkit = "< 9.60, =9.60" NonlinearSolve = "3.12, 4" Optim = "1.9" Optimization = "4" From 304f5d5183e1ccb3a93079d184fc392d80e8a09e Mon Sep 17 00:00:00 2001 From: Torkel Loman Date: Thu, 9 Jan 2025 14:05:15 +0000 Subject: [PATCH 06/10] Update docs/Project.toml Co-authored-by: Sam Isaacson --- docs/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Project.toml b/docs/Project.toml index 6e5e7f0329..be4b212c66 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -61,7 +61,7 @@ IncompleteLU = "0.2" JumpProcesses = "9.13.2" Latexify = "0.16.5" LinearSolve = "2.30" -ModelingToolkit = "< 9.60, =9.60" +ModelingToolkit = "9.60" NonlinearSolve = "3.12, 4" Optim = "1.9" Optimization = "4" From 6db7524209d4dd89a1545535b03089a8e8340fd2 Mon Sep 17 00:00:00 2001 From: Torkel Loman Date: Thu, 9 Jan 2025 14:05:26 +0000 Subject: [PATCH 07/10] Update Project.toml Co-authored-by: Sam Isaacson --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 22998c392e..d03093679a 100644 --- a/Project.toml +++ b/Project.toml @@ -58,7 +58,7 @@ JumpProcesses = "9.13.2" LaTeXStrings = "1.3.0" Latexify = "0.16.5" MacroTools = "0.5.5" -ModelingToolkit = "< 9.60, =9.60" +ModelingToolkit = "9.60" NetworkLayout = "0.4.7" Parameters = "0.12" Reexport = "0.2, 1.0" From 7af9107067184654c603156fff79fc3ee21049ab Mon Sep 17 00:00:00 2001 From: Torkel Loman Date: Thu, 9 Jan 2025 14:05:32 +0000 Subject: [PATCH 08/10] Update Project.toml Co-authored-by: Sam Isaacson --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index d03093679a..ee2191cfcb 100644 --- a/Project.toml +++ b/Project.toml @@ -67,7 +67,7 @@ RuntimeGeneratedFunctions = "0.5.12" SciMLBase = "2.57.2" Setfield = "1" # StructuralIdentifiability = "0.5.8" -SymbolicUtils = "< 3.8.1, = 3.8.1" +SymbolicUtils = "3.8.1" Symbolics = "6.22" Unitful = "1.12.4" julia = "1.10" From 196ee1a5955f56edbd4f40ed80f487c0eeca4e35 Mon Sep 17 00:00:00 2001 From: Torkel Loman Date: Thu, 9 Jan 2025 16:52:45 +0000 Subject: [PATCH 09/10] comment out stability tutorial --- docs/pages.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages.jl b/docs/pages.jl index bc77aaf459..e17fbbe7b4 100644 --- a/docs/pages.jl +++ b/docs/pages.jl @@ -40,7 +40,7 @@ pages = Any[ "Steady state analysis" => Any[ "steady_state_functionality/homotopy_continuation.md", "steady_state_functionality/nonlinear_solve.md", - "steady_state_functionality/steady_state_stability_computation.md", + #"steady_state_functionality/steady_state_stability_computation.md", "steady_state_functionality/bifurcation_diagrams.md", "steady_state_functionality/dynamical_systems.md" ], From 320303736476ab6c697a7226eaf7fda87e42cfa0 Mon Sep 17 00:00:00 2001 From: Torkel Loman Date: Thu, 9 Jan 2025 17:49:07 +0000 Subject: [PATCH 10/10] remove cross ref --- docs/src/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/index.md b/docs/src/index.md index 03977c127f..13ba9fb56b 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -29,7 +29,7 @@ etc). - Models can be [coupled with events](@ref constraint_equations_events) that affect the system and its state during simulations. - By leveraging ModelingToolkit, users have a variety of options for generating optimized system representations to use in solvers. These include construction of [dense or sparse Jacobians](@ref ode_simulation_performance_sparse_jacobian), [multithreading or parallelization of generated derivative functions](@ref ode_simulation_performance_parallelisation), [automatic classification of reactions into optimized jump types for Gillespie type simulations](https://docs.sciml.ai/JumpProcesses/stable/jump_types/#jump_types), [automatic construction of dependency graphs for jump systems](https://docs.sciml.ai/JumpProcesses/stable/jump_types/#Jump-Aggregators-Requiring-Dependency-Graphs), and more. - [Symbolics.jl](https://github.com/JuliaSymbolics/Symbolics.jl) symbolic expressions and Julia `Expr`s can be obtained for all rate laws and functions determining the deterministic and stochastic terms within resulting ODE, SDE, or jump models. -- [Steady states](@ref homotopy_continuation) (and their [stabilities](@ref steady_state_stability)) can be computed for model ODE representations. +- [Steady states](@ref homotopy_continuation) can be computed for model ODE representations. #### [Features of Catalyst composing with other packages](@id doc_index_features_composed) - [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) Can be used to numerically solve generated reaction rate equation ODE models.