Skip to content

Commit aa6910b

Browse files
authored
Merge pull request #944 from isaacsas/drop_unused_parametric_types
fix Catalyst using warning
2 parents dbce2fa + 840a188 commit aa6910b

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/spatial_reaction_systems/lattice_jump_systems.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ function DiffEqBase.DiscreteProblem(lrs::LatticeReactionSystem, u0_in, tspan,
1717
# Converts u0 and p to their internal forms.
1818
# u0 is [spec 1 at vert 1, spec 2 at vert 1, ..., spec 1 at vert 2, ...].
1919
u0 = lattice_process_u0(u0_in, species(lrs), lrs.num_verts)
20-
# Both vert_ps and edge_ps becomes vectors of vectors. Each have 1 element for each parameter.
21-
# These elements are length 1 vectors (if the parameter is uniform),
20+
# Both vert_ps and edge_ps becomes vectors of vectors. Each have 1 element for each parameter.
21+
# These elements are length 1 vectors (if the parameter is uniform),
2222
# or length num_verts/nE, with unique values for each vertex/edge (for vert_ps/edge_ps, respectively).
2323
vert_ps, edge_ps = lattice_process_p(p_in, vertex_parameters(lrs),
2424
edge_parameters(lrs), lrs)
@@ -40,7 +40,7 @@ function JumpProcesses.JumpProblem(lrs::LatticeReactionSystem, dprob, aggregator
4040
# Computes hopping constants and mass action jumps (requires some internal juggling).
4141
# Currently, JumpProcesses requires uniform vertex parameters (hence `p=first.(dprob.p[1])`).
4242
# Currently, the resulting JumpProblem does not depend on parameters (no way to incorporate these).
43-
# Hence the parameters of this one does nto actually matter. If at some point JumpProcess can
43+
# Hence the parameters of this one does nto actually matter. If at some point JumpProcess can
4444
# handle parameters this can be updated and improved.
4545
# The non-spatial DiscreteProblem have a u0 matrix with entries for all combinations of species and vertexes.
4646
hopping_constants = make_hopping_constants(dprob, lrs)
@@ -68,7 +68,7 @@ function make_hopping_constants(dprob::DiscreteProblem, lrs::LatticeReactionSyst
6868
# For each edge, finds each position in `hopping_constants`.
6969
for (e_idx, e) in enumerate(edges(lrs.lattice))
7070
dst_idx = findfirst(isequal(e.dst), lrs.lattice.fadjlist[e.src])
71-
# For each species, sets that hopping rate.
71+
# For each species, sets that hopping rate.
7272
for s_idx in 1:(lrs.num_species)
7373
hopping_constants[s_idx, e.src][dst_idx] = get_component_value(
7474
all_diff_rates[s_idx], e_idx)
@@ -124,7 +124,7 @@ end
124124
### Extra ###
125125

126126
# Temporary. Awaiting implementation in SII, or proper implementation withinCatalyst (with more general functionality).
127-
function int_map(map_in, sys) where {T, S}
127+
function int_map(map_in, sys)
128128
return [ModelingToolkit.variable_index(sys, pair[1]) => pair[2] for pair in map_in]
129129
end
130130

@@ -136,9 +136,9 @@ end
136136
# statetoid = Dict(ModelingToolkit.value(state) => i for (i, state) in enumerate(states(rs)))
137137
# eqs = equations(js)
138138
# invttype = non_spat_dprob.tspan[1] === nothing ? Float64 : typeof(1 / non_spat_dprob.tspan[2])
139-
#
139+
#
140140
# # Assembles the non-spatial mass action jumps.
141-
# p = (non_spat_dprob.p isa DiffEqBase.NullParameters || non_spat_dprob.p === nothing) ? Num[] : non_spat_dprob.p
141+
# p = (non_spat_dprob.p isa DiffEqBase.NullParameters || non_spat_dprob.p === nothing) ? Num[] : non_spat_dprob.p
142142
# majpmapper = ModelingToolkit.JumpSysMajParamMapper(js, p; jseqs = eqs, rateconsttype = invttype)
143143
# return ModelingToolkit.assemble_maj(eqs.x[1], statetoid, majpmapper)
144144
# end

test/runtests.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ using SafeTestsets, Test
3131
# Tests various miscellaneous features.
3232
@time @safetestset "API" begin include("miscellaneous_tests/api.jl") end
3333
@time @safetestset "Units" begin include("miscellaneous_tests/units.jl") end
34-
@time @safetestset "Steady State Stability Computations" begin include("miscellaneous_tests/stability_computation.jl") end
3534
@time @safetestset "Compound Species" begin include("miscellaneous_tests/compound_macro.jl") end
3635
@time @safetestset "Reaction Balancing" begin include("miscellaneous_tests/reaction_balancing.jl") end
3736
@time @safetestset "ReactionSystem Serialisation" begin include("miscellaneous_tests/reactionsystem_serialisation.jl") end
@@ -69,4 +68,7 @@ using SafeTestsets, Test
6968
@time @safetestset "HomotopyContinuation Extension" begin include("extensions/homotopy_continuation.jl") end
7069
@time @safetestset "Structural Identifiability Extension" begin include("extensions/structural_identifiability.jl") end
7170

71+
# test stability (uses HomotopyContinuation extension)
72+
@time @safetestset "Steady State Stability Computations" begin include("miscellaneous_tests/stability_computation.jl") end
73+
7274
end # @time

0 commit comments

Comments
 (0)