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
throw(UndeclaredSymbolicError("Unrecognized variables$(join(species, ", ")) detected in reaction expression: \"$(string(reaction.rxexpr))\". Since the flag @require_declaration is declared, all species must be explicitly declared with the @species macro."))
475
+
throw(UndeclaredSymbolicError("Unrecognized reactant$(join(species, ", ")) detected in reaction expression: \"$(string(reaction.rxexpr))\". Since the flag @require_declaration is declared, all species must be explicitly declared with the @species option."))
476
476
end
477
477
union!(excluded_syms, species)
478
478
@@ -481,11 +481,11 @@ function extract_sps_and_ps(reactions, excluded_syms; requiredec = false)
throw(UndeclaredSymbolicError("Unrecognized parameter$(join(parameters, ", ")) detected in rate expression: $(reaction.rate) for the following reaction expression: \"$(string(reaction.rxexpr))\". Since the flag @require_declaration is declared, all parameters must be explicitly declared with the @parameters macro."))
484
+
throw(UndeclaredSymbolicError("Unrecognized symbol$(join(parameters, ", ")) detected in rate expression: $(reaction.rate) for the following reaction expression: \"$(string(reaction.rxexpr))\". Since the flag @require_declaration is declared, all parameters must be explicitly declared with the @parameters option."))
485
485
for reactant in Iterators.flatten((reaction.substrates, reaction.products))
throw(UndeclaredSymbolicError("Unrecognized parameters$(join(parameters, ", ")) detected in the stoichiometry for reactant $(reactant.reactant) in the following reaction expression: \"$(string(reaction.rxexpr))\". Since the flag @require_declaration is declared, all parameters must be explicitly declared with the @parameters macro."))
488
+
throw(UndeclaredSymbolicError("Unrecognized symbol$(join(parameters, ", ")) detected in the stoichiometry for reactant $(reactant.reactant) in the following reaction expression: \"$(string(reaction.rxexpr))\". Since the flag @require_declaration is declared, all parameters must be explicitly declared with the @parameters option."))
489
489
end
490
490
end
491
491
@@ -728,7 +728,7 @@ function read_equations_options!(diffsexpr, options, syms_unavailable, tiv; requ
728
728
# Any undeclared symbolic variables encountered should be extracted as variables.
"Unrecognized symbolic variables$(join(vs_inferred, ", ")) detected in equation expression: \"$(string(eq))\". Since the flag @require_declaration is declared, all symbolic variables must be explicitly declared with the @species, @variables, and @parameters options."))
731
+
"Unrecognized symbol$(join(vs_inferred, ", ")) detected in equation expression: \"$(string(eq))\". Since the flag @require_declaration is declared, all symbolic variables must be explicitly declared with the @species, @variables, and @parameters options."))
732
732
end
733
733
734
734
# If `D` differential is used, add it to differential expression and inferred differentials list.
@@ -804,7 +804,7 @@ function read_observed_options(options, all_ivs, us_declared, all_syms; required
804
804
805
805
# Error checks.
806
806
(requiredec &&!in(obs_name, us_declared)) &&
807
-
throw(UndeclaredSymbolicError("An undeclared variable ($obs_name) was declared as an observable in the following observable equation: \"$obs_eq\". Since the flag @require_declaration is set, all variables must be declared with the @species, @parameters, or @variables macros."))
807
+
throw(UndeclaredSymbolicError("An undeclared symbol ($obs_name) was used as an observable in the following observable equation: \"$obs_eq\". Since the flag @require_declaration is set, all observables must be declared with either the @speciesor @variables options."))
808
808
isempty(ivs) ||
809
809
error("An observable ($obs_name) was given independent variable(s). These should not be given, as they are inferred automatically.")
810
810
isnothing(defaults) ||
@@ -937,6 +937,9 @@ function make_reaction(ex::Expr)
error("The following symbol(s) are used as species or parameters: $(intersect(forbidden_symbols_error, union([species], parameters)))), this is not permitted.")
0 commit comments