You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -239,7 +242,8 @@ function fluxmat(::Type{SparseMatrixCSC{T, Int}}, rcmap, rates) where T
239
242
end
240
243
241
244
functionfluxmat(::Type{Matrix{T}}, rcmap, rates) where T
242
-
nr =length(rates); nc =length(rcmap)
245
+
nr =length(rates)
246
+
nc =length(rcmap)
243
247
K =zeros(T, nr, nc)
244
248
for (i, (complex, rxs)) inenumerate(rcmap)
245
249
for (rx, dir) in rxs
@@ -260,7 +264,7 @@ function fluxmat(rn::ReactionSystem, pmap::Tuple; sparse = false)
260
264
end
261
265
262
266
# Helper to substitute values into a (vector of) symbolic expressions. The syms are the symbols to substitute and the symexprs are the expressions to substitute into.
length(map) !=length(syms) &&error("Incorrect number of parameter-value pairs were specified.")
265
269
map =symmap_to_varmap(rn, map)
266
270
map =Dict(ModelingToolkit.value(k) => v for (k, v) in map)
@@ -272,11 +276,13 @@ end
272
276
273
277
Return the vector whose entries correspond to the "mass action products" of each complex. For example, given the complex A + B, the corresponding entry of the vector would be ``A*B``, and for the complex 2X + Y, the corresponding entry would be ``X^2*Y``. The ODE system of a chemical reaction network can be factorized as ``\frac{dx}{dt} = Y A_k Φ(x)``, where ``Y`` is the [`complexstoichmat`](@ref) and ``A_k`` is the negative of the [`laplacianmat`](@ref). This utility returns ``Φ(x)``.
274
278
Returns a symbolic vector by default, but will return a numerical vector if species concentrations are specified as a tuple, vector, or dictionary via scmap.
275
-
If the `combinatoric_ratelaws` option is set, will include prefactors for that (see [introduction to Catalyst's rate laws](@ref introduction_to_catalyst_ratelaws).
279
+
If the `combinatoric_ratelaws` option is set, will include prefactors for that (see [introduction to Catalyst's rate laws](@ref introduction_to_catalyst_ratelaws). Will default to the default for the system.
0 commit comments