@@ -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)
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]
129129end
130130
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
0 commit comments