Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ BifurcationKit = "0.4.4, 0.5"
CairoMakie = "0.12, 0.13, 0.14, 0.15"
Combinatorics = "1.0.2"
DataStructures = "0.18, 0.19"
DiffEqBase = "6.165.0"
DiffEqBase = "6.165.0, 7"
DocStringExtensions = "0.8, 0.9"
DynamicPolynomials = "0.6"
DynamicQuantities = "1"
Expand All @@ -65,14 +65,19 @@ MacroTools = "0.5.5"
Makie = "0.22.1, 0.23, 0.24"
ModelingToolkitBase = "1.17"
NetworkLayout = "0.4.7"
OrdinaryDiffEqCore = "3.22"
OrdinaryDiffEqBDF = "1, 2"
OrdinaryDiffEqCore = "3.22, 4"
OrdinaryDiffEqDefault = "1, 2"
OrdinaryDiffEqRosenbrock = "1, 2"
OrdinaryDiffEqTsit5 = "1, 2"
OrdinaryDiffEqVerner = "1, 2"
Parameters = "0.12"
Reexport = "1.0"
RuntimeGeneratedFunctions = "0.5.12"
SciMLBase = "2.84"
SciMLBase = "2.84, 3"
SciMLPublic = "1"
Setfield = "1"
StochasticDiffEq = "6.101"
StochasticDiffEq = "6.101, 7"
StructuralIdentifiability = "0.5.11"
SymbolicIndexingInterface = "0.3"
SymbolicUtils = "4.9.1"
Expand Down
20 changes: 10 additions & 10 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ CairoMakie = "0.15"
Catalyst = "16"
DataFrames = "1.6"
DataInterpolations = "7.2, 8"
DiffEqBase = "6.159.0"
DiffEqBase = "6.159.0, 7"
DiffEqNoiseProcess = "5.31.1"
Distributions = "0.25"
Documenter = "1.11.1"
Expand All @@ -88,25 +88,25 @@ OptimizationLBFGSB = "1"
OptimizationNLopt = "0.3"
OptimizationOptimJL = "0.4"
OptimizationOptimisers = "0.3"
OrdinaryDiffEqBDF = "1"
OrdinaryDiffEqDefault = "1"
OrdinaryDiffEqNonlinearSolve = "1"
OrdinaryDiffEqRosenbrock = "1"
OrdinaryDiffEqSDIRK = "1"
OrdinaryDiffEqTsit5 = "1"
OrdinaryDiffEqVerner = "1"
OrdinaryDiffEqBDF = "1, 2"
OrdinaryDiffEqDefault = "1, 2"
OrdinaryDiffEqNonlinearSolve = "1, 2"
OrdinaryDiffEqRosenbrock = "1, 2"
OrdinaryDiffEqSDIRK = "1, 2"
OrdinaryDiffEqTsit5 = "1, 2"
OrdinaryDiffEqVerner = "1, 2"
PEtab = "5"
Plots = "1.40"
QuasiMonteCarlo = "0.3"
ReactionNetworkImporters = "1.1.0"
SBMLImporter = "4.0.0"
SciMLBase = "2.46"
SciMLBase = "2.46, 3"
SciMLSensitivity = "7.60"
SpecialFunctions = "2.4"
StaticArrays = "1.9"
StatsPlots = "0.15.8"
SteadyStateDiffEq = "2.2"
StochasticDiffEq = "6.65"
StochasticDiffEq = "6.65, 7"
StructuralIdentifiability = "0.5.11"
SymbolicIndexingInterface = "0.3"
Symbolics = "7.13"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,14 @@ rebuild_spat_internals!(oprob)
```
"""
function rebuild_spat_internals!(oprob::ODEProblem)
rebuild_spat_internals!(oprob.f.f, oprob.p, oprob.f.f.dsrs)
lt_ofun = SciMLBase.unwrapped_f(oprob.f.f)
rebuild_spat_internals!(lt_ofun, oprob.p, lt_ofun.dsrs)
end

# Function for rebuilding a `DiscreteSpaceReactionSystem` integrator after it has been updated.
function rebuild_spat_internals!(integrator::SciMLBase.AbstractODEIntegrator)
rebuild_spat_internals!(integrator.f.f, integrator.p, integrator.f.f.dsrs)
lt_ofun = SciMLBase.unwrapped_f(integrator.f.f)
rebuild_spat_internals!(lt_ofun, integrator.p, lt_ofun.dsrs)
end

# Function which rebuilds a `LatticeTransportODEFunction` functor for a new parameter set.
Expand Down
4 changes: 2 additions & 2 deletions test/simulation_and_solving/hybrid_models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ let

# Solves and checks values of solution (do this before integrator mutation test
# since integrator mutation affects shared parameter state).
sol = solve(prob, Tsit5(); maxiters = 10, verbose = false)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is verobes = false now the default for solve?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it doesn't use booleans at all.

sol = solve(prob, Tsit5(); maxiters = 10)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still confussed here, verbose = false (or whatever is the new syntax) is not the default, right? I.e. we would need to put whatever is the new thing here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verbose = DEVerbosity(SciMLLogging.None())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's if you want literally everything off, though it's probably not a good idea to always do that 😅

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, not sure what the intention is for these tests, I didn't write them

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it needs verbosity turned off.

@test sol[:X][1] == 1.0
@test sol[:X2][1] == 0.0
@test sol[:Y][1] == 0.0
Expand All @@ -215,7 +215,7 @@ let
@test prob2.ps[:d] == 0.5 # not changed

# Test that we can solve the remade problem and verify solution values.
sol2 = solve(prob2, Tsit5(); maxiters = 10, verbose = false)
sol2 = solve(prob2, Tsit5(); maxiters = 10)
@test sol2[:X][1] == 3.0
@test sol2[:X2][1] == 2.0
@test sol2[:Y][1] == 1.0
Expand Down
4 changes: 2 additions & 2 deletions test/simulation_and_solving/simulate_SDEs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,8 @@ let
cat_sol = solve(cat_ensemble, EM(); dt = 0.001, trajectories = N, saveat = 20.0)
hand_sol = solve(hand_ensemble, EM(); dt = 0.001, trajectories = N, saveat = 20.0)

cat_endpoints = [sol[1, end] for sol in cat_sol]
hand_endpoints = [sol[1, end] for sol in hand_sol]
cat_endpoints = [sol[1, end] for sol in cat_sol.u]
hand_endpoints = [sol[1, end] for sol in hand_sol.u]

cat_mean = mean(cat_endpoints)
hand_mean = mean(hand_endpoints)
Expand Down
14 changes: 10 additions & 4 deletions test/simulation_and_solving/simulate_jumps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Fetch packages.
using Catalyst, JumpProcesses, ModelingToolkitBase, OrdinaryDiffEqTsit5, Statistics, Test
using SymbolicIndexingInterface: setp

# Sets stable rng number.
using StableRNGs
Expand Down Expand Up @@ -447,8 +448,9 @@ end
jprob_cb = JumpProblem(rn, u0, (0.0, 200.0), ps;
aggregator = Direct(), save_positions = (false, false))
condit(u, t, integrator) = t == 100.0
setk! = setp(jprob_cb, :k)
function affect_cb!(integrator)
integrator.ps[:k] = 24.0
setk!(integrator, 24.0)
reset_aggregated_jumps!(integrator)
end
cb = DiscreteCallback(condit, affect_cb!)
Expand Down Expand Up @@ -496,8 +498,9 @@ end
jprob_cb = JumpProblem(rn, u0, (0.0, 200.0), ps;
aggregator = Direct(), save_positions = (false, false))
condit(u, t, integrator) = t == 100.0
setk! = setp(jprob_cb, :k)
function affect_cb!(integrator)
integrator.ps[:k] = 24.0
setk!(integrator, 24.0)
reset_aggregated_jumps!(integrator)
end
cb = DiscreteCallback(condit, affect_cb!)
Expand Down Expand Up @@ -541,8 +544,9 @@ end
jprob_cb = JumpProblem(rn, u0, (0.0, 200.0), ps;
aggregator = Direct(), save_positions = (false, false))
condit(u, t, integrator) = t == 100.0
setk1! = setp(jprob_cb, :k1)
function affect_cb!(integrator)
integrator.ps[:k1] = 24.0
setk1!(integrator, 24.0)
reset_aggregated_jumps!(integrator)
end
cb = DiscreteCallback(condit, affect_cb!)
Expand Down Expand Up @@ -641,8 +645,10 @@ end
aggregator = Direct(), save_positions = (false, false))
condit(u, t, integrator) = t == 100.0
new_k_true = 24.0
new_k_val = rn === rn_true ? new_k_true : new_k_true / factorial(3)
setk! = setp(jp, :k)
function affect_equiv!(integrator)
integrator.ps[:k] = rn === rn_true ? new_k_true : new_k_true / factorial(3)
setk!(integrator, new_k_val)
reset_aggregated_jumps!(integrator)
end
cb = DiscreteCallback(condit, affect_equiv!)
Expand Down
Loading