@@ -60,15 +60,10 @@ struct Reaction{S, T <: Number}
60
60
`true` if `rate` represents the full reaction rate law.
61
61
"""
62
62
only_use_rate:: Bool
63
- """
64
- type: type of the system
65
- """
66
- connection_type:: Any
67
63
end
68
64
69
65
function Reaction (rate, subs, prods, substoich, prodstoich;
70
66
netstoich= nothing , only_use_rate= false ,
71
- connection_type= nothing ,
72
67
kwargs... )
73
68
74
69
(isnothing (prods)&& isnothing (subs)) && error (" A reaction requires a non-nothing substrate or product vector." )
@@ -86,7 +81,7 @@ function Reaction(rate, subs, prods, substoich, prodstoich;
86
81
subs = value .(subs)
87
82
prods = value .(prods)
88
83
ns = isnothing (netstoich) ? get_netstoich (subs, prods, substoich, prodstoich) : netstoich
89
- Reaction (value (rate), subs, prods, substoich, prodstoich, ns, only_use_rate, connection_type )
84
+ Reaction (value (rate), subs, prods, substoich, prodstoich, ns, only_use_rate)
90
85
end
91
86
92
87
@@ -154,14 +149,19 @@ struct ReactionSystem <: AbstractSystem
154
149
parameters are not supplied in `ODEProblem`.
155
150
"""
156
151
defaults:: Dict
152
+ """
153
+ type: type of the system
154
+ """
155
+ connection_type:: Any
156
+
157
157
158
- function ReactionSystem (eqs, iv, states, ps, observed, name, systems, defaults)
158
+ function ReactionSystem (eqs, iv, states, ps, observed, name, systems, defaults, connection_type )
159
159
iv′ = value (iv)
160
160
states′ = value .(states)
161
161
ps′ = value .(ps)
162
162
check_variables (states′, iv′)
163
163
check_parameters (ps′, iv′)
164
- new (collect (eqs), iv′, states′, ps′, observed, name, systems, defaults)
164
+ new (collect (eqs), iv′, states′, ps′, observed, name, systems, defaults, connection_type )
165
165
end
166
166
end
167
167
@@ -171,10 +171,11 @@ function ReactionSystem(eqs, iv, species, params;
171
171
name = gensym (:ReactionSystem ),
172
172
default_u0= Dict (),
173
173
default_p= Dict (),
174
- defaults= _merge (Dict (default_u0), Dict (default_p)))
174
+ defaults= _merge (Dict (default_u0), Dict (default_p)),
175
+ connection_type= nothing )
175
176
176
177
# isempty(species) && error("ReactionSystems require at least one species.")
177
- ReactionSystem (eqs, iv, species, params, observed, name, systems, defaults)
178
+ ReactionSystem (eqs, iv, species, params, observed, name, systems, defaults, connection_type )
178
179
end
179
180
180
181
function ReactionSystem (iv; kwargs... )
0 commit comments