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
error("The following symbol(s) are used as species or parameters: "*((map(s ->"'"*string(s)*"', ",intersect(forbidden_symbols,union(species,parameters)))...))*"this is not permited.")
267
267
@@ -290,7 +290,7 @@ function make_reaction(ex::Expr)
290
290
# parse DSL lines
291
291
reaction =get_reaction(ex)
292
292
allspecies =get_reactants(reaction) # species defined by stoich
293
-
parameters =get_rate_species([reaction],Symbol[]) # anything in a rate is a parameter
293
+
parameters =get_rx_species([reaction],Symbol[]) # anything in a rate is a parameter
error("The following symbol(s) are used as species or parameters: "*((map(s ->"'"*string(s)*"', ",intersect(forbidden_symbols,union(species,parameters)))...))*"this is not permited.")
296
296
@@ -305,11 +305,17 @@ function make_reaction(ex::Expr)
@@ -387,18 +393,31 @@ function push_reactions!(reactions::Vector{ReactionStruct}, sub_line::ExprValues
387
393
end
388
394
end
389
395
396
+
functionprocessmult(op, mult, stoich)
397
+
if (mult isa Number) && (stoich isa Number)
398
+
op(mult, stoich)
399
+
else
400
+
:($op($mult,$stoich))
401
+
end
402
+
end
403
+
390
404
#Recursive function that loops through the reaction line and finds the reactants and their stoichiometry. Recursion makes it able to handle weird cases like 2(X+Y+3(Z+XY)).
0 commit comments