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 independent variable(S) provided to the compound ($(arguments(ModelingToolkit.unwrap($species_name)))), and those of its components ($($ivs_get_expr)))), are not identical.")))
130
+
error("The independent variable(S) provided to the compound ($(arguments(ModelingToolkit.unwrap($species_name)))), and those of its components ($($ivs_get_expr)))), are not identical.")))
131
131
compound_designation_expr =Expr(:escape,
132
132
:($species_name = ModelingToolkit.setmetadata(
133
133
$species_name, Catalyst.CompoundSpecies, true)))
@@ -197,7 +197,7 @@ function make_compounds(expr)
197
197
198
198
# The output needs to be converted to Vector{Num} (from Vector{SymbolicUtils.BasicSymbolic{Real}}) to be consistent with e.g. @variables.
# Loops through all equations, checks for lhs of the form `D(X) ~ ...`.
677
675
# When this is the case, the variable X and differential D are extracted (for automatic declaration).
@@ -689,7 +687,7 @@ function read_equations_options(options, variables_declared)
689
687
lhs = eq.args[2]
690
688
# if lhs: is an expression. Is a function call. The function's name is D. Calls a single symbol.
691
689
if (lhs isa Expr) && (lhs.head ==:call) && (lhs.args[1] ==:D) &&
692
-
(lhs.args[2] isa Symbol)
690
+
(lhs.args[2] isa Symbol)
693
691
diff_var = lhs.args[2]
694
692
ifin(diff_var, forbidden_symbols_error)
695
693
error("A forbidden symbol ($(diff_var)) was used as an variable in this differential equation: $eq")
@@ -749,15 +747,15 @@ function read_observed_options(options, species_n_vars_declared, ivs_sorted)
749
747
error("An observable ($obs_name) was given independent variable(s). These should not be given, as they are inferred automatically.")
750
748
isnothing(defaults) ||
751
749
error("An observable ($obs_name) was given a default value. This is forbidden.")
752
-
in(obs_name, forbidden_symbols_error) &&
750
+
(obs_namein forbidden_symbols_error) &&
753
751
error("A forbidden symbol ($(obs_eq.args[2])) was used as an observable name.")
754
752
755
753
# Error checks.
756
754
if (obs_name in species_n_vars_declared) &&is_escaped_expr(obs_eq.args[2])
757
755
error("An interpoalted observable have been used, which has also been explicitly delcared within the system using eitehr @species or @variables. This is not permited.")
758
756
end
759
757
if ((obs_name in species_n_vars_declared) ||is_escaped_expr(obs_eq.args[2])) &&
760
-
!isnothing(metadata)
758
+
!isnothing(metadata)
761
759
error("Metadata was provided to observable $obs_name in the `@observables` macro. However, the obervable was also declared separately (using either @species or @variables). When this is done, metadata should instead be provided within the original @species or @variable declaration.")
762
760
end
763
761
@@ -773,10 +771,10 @@ function read_observed_options(options, species_n_vars_declared, ivs_sorted)
773
771
# Adds a line to the `observed_vars` expression, setting the ivs for this observable.
774
772
# Cannot extract directly using e.g. "getfield.(dependants_structs, :reactant)" because
775
773
# then we get something like :([:X1, :X2]), rather than :([X1, X2]).
0 commit comments