Skip to content

Commit

Permalink
try upper bounding SciMLBase
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacsas committed Oct 29, 2024
1 parent 78218f1 commit 6dd11e9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Parameters = "0.12"
Reexport = "0.2, 1.0"
Requires = "1.0"
RuntimeGeneratedFunctions = "0.5.12"
SciMLBase = "2.46"
SciMLBase = "<=2.57.1"
Setfield = "1"
# StructuralIdentifiability = "0.5.8"
SymbolicUtils = "2.1.2, 3.3.0"
Expand Down
3 changes: 0 additions & 3 deletions src/steady_state_stability.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ function steady_state_stability(u::Vector, rs::ReactionSystem, ps;

# Generates the Jacobian at the steady state (technically, `ss_jac` is an `ODEProblem` with dummy values for `u0` and `p`).
J = zeros(length(u), length(u))
@show u
@show ps
@show parameters(ss_jac)
ss_jac = remake(ss_jac; u0 = u, p = ps)
ss_jac.f.jac(J, ss_jac.u0, ss_jac.p, Inf)

Expand Down
1 change: 0 additions & 1 deletion test/extensions/stability_computation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ let
# Computes stability using various input forms, and checks that the output is correct.
sss = hc_steady_states(rn, ps_1; u0 = u0_1, show_progress = false)
for u0 in [u0_1, u0_2, u0_3, u0_4], ps in [ps_1, ps_2, ps_3]
@show eltype(first(u0)),eltype(first(ps))
stab_1 = [steady_state_stability(ss, rn, ps) for ss in sss]
ss_jac = steady_state_jac(rn; u0 = u0)
stab_2 = [steady_state_stability(ss, rn, ps; ss_jac = ss_jac) for ss in sss]
Expand Down
16 changes: 8 additions & 8 deletions test/upstream/mtk_problem_inputs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,35 +64,35 @@ begin
# Vectors not providing default values.
[kp => 1.0, kd => 0.1, k1 => 0.25, Z0 => 10],
[model.kp => 1.0, model.kd => 0.1, model.k1 => 0.25, model.Z0 => 10],
#[:kp => 1.0, :kd => 0.1, :k1 => 0.25, :Z0 => 10],
[:kp => 1.0, :kd => 0.1, :k1 => 0.25, :Z0 => 10],
# Vectors providing default values.
[kp => 1.0, kd => 0.1, k1 => 0.25, k2 => 0.5, Z0 => 10],
[model.kp => 1.0, model.kd => 0.1, model.k1 => 0.25, model.k2 => 0.5, model.Z0 => 10],
#[:kp => 1.0, :kd => 0.1, :k1 => 0.25, :k2 => 0.5, :Z0 => 10],
[:kp => 1.0, :kd => 0.1, :k1 => 0.25, :k2 => 0.5, :Z0 => 10],
# Static vectors not providing default values.
SA[kp => 1.0, kd => 0.1, k1 => 0.25, Z0 => 10],
SA[model.kp => 1.0, model.kd => 0.1, model.k1 => 0.25, model.Z0 => 10],
#SA[:kp => 1.0, :kd => 0.1, :k1 => 0.25, :Z0 => 10],
SA[:kp => 1.0, :kd => 0.1, :k1 => 0.25, :Z0 => 10],
# Static vectors providing default values.
SA[kp => 1.0, kd => 0.1, k1 => 0.25, k2 => 0.5, Z0 => 10],
SA[model.kp => 1.0, model.kd => 0.1, model.k1 => 0.25, model.k2 => 0.5, model.Z0 => 10],
#SA[:kp => 1.0, :kd => 0.1, :k1 => 0.25, :k2 => 0.5, :Z0 => 10],
SA[:kp => 1.0, :kd => 0.1, :k1 => 0.25, :k2 => 0.5, :Z0 => 10],
# Dicts not providing default values.
Dict([kp => 1.0, kd => 0.1, k1 => 0.25, Z0 => 10]),
Dict([model.kp => 1.0, model.kd => 0.1, model.k1 => 0.25, model.Z0 => 10]),
#Dict([:kp => 1.0, :kd => 0.1, :k1 => 0.25, :Z0 => 10]),
Dict([:kp => 1.0, :kd => 0.1, :k1 => 0.25, :Z0 => 10]),
# Dicts providing default values.
Dict([kp => 1.0, kd => 0.1, k1 => 0.25, k2 => 0.5, Z0 => 10]),
Dict([model.kp => 1.0, model.kd => 0.1, model.k1 => 0.25, model.k2 => 0.5, model.Z0 => 10]),
#Dict([:kp => 1.0, :kd => 0.1, :k1 => 0.25, :k2 => 0.5, :Z0 => 10]),
Dict([:kp => 1.0, :kd => 0.1, :k1 => 0.25, :k2 => 0.5, :Z0 => 10]),
# Tuples not providing default values.
(kp => 1.0, kd => 0.1, k1 => 0.25, Z0 => 10),
(model.kp => 1.0, model.kd => 0.1, model.k1 => 0.25, model.Z0 => 10),
#(:kp => 1.0, :kd => 0.1, :k1 => 0.25, :Z0 => 10),
(:kp => 1.0, :kd => 0.1, :k1 => 0.25, :Z0 => 10),
# Tuples providing default values.
(kp => 1.0, kd => 0.1, k1 => 0.25, k2 => 0.5, Z0 => 10),
(model.kp => 1.0, model.kd => 0.1, model.k1 => 0.25, model.k2 => 0.5, model.Z0 => 10),
#(:kp => 1.0, :kd => 0.1, :k1 => 0.25, :k2 => 0.5, :Z0 => 10),
(:kp => 1.0, :kd => 0.1, :k1 => 0.25, :k2 => 0.5, :Z0 => 10),
]
end

Expand Down

0 comments on commit 6dd11e9

Please sign in to comment.