@@ -186,10 +186,10 @@ function numericnstoich(mtrs::Vector{Pair{V,W}}, statetoid) where {V,W}
186
186
end
187
187
188
188
# assemble a numeric MassActionJump from a MT symbolics MassActionJumps
189
- function assemble_maj (majv:: Vector{U} , statetoid, pmapper, params ) where {U <: MassActionJump }
189
+ function assemble_maj (majv:: Vector{U} , statetoid, pmapper) where {U <: MassActionJump }
190
190
rs = [numericrstoich (maj. reactant_stoch, statetoid) for maj in majv]
191
191
ns = [numericnstoich (maj. net_stoch, statetoid) for maj in majv]
192
- MassActionJump (rs, ns; param_mapper = pmapper, params = params, scale_rates = false , nocopy= true )
192
+ MassActionJump (rs, ns; param_mapper= pmapper, nocopy= true )
193
193
end
194
194
195
195
"""
@@ -278,7 +278,7 @@ function DiffEqJump.JumpProblem(js::JumpSystem, prob, aggregator; kwargs...)
278
278
p = (prob. p isa DiffEqBase. NullParameters || prob. p === nothing ) ? Num[] : prob. p
279
279
280
280
majpmapper = JumpSysMajParamMapper (js, p; jseqs= eqs, rateconsttype= invttype)
281
- majs = isempty (eqs. x[1 ]) ? nothing : assemble_maj (eqs. x[1 ], statetoid, majpmapper, p )
281
+ majs = isempty (eqs. x[1 ]) ? nothing : assemble_maj (eqs. x[1 ], statetoid, majpmapper)
282
282
crjs = ConstantRateJump[assemble_crj (js, j, statetoid) for j in eqs. x[2 ]]
283
283
vrjs = VariableRateJump[assemble_vrj (js, j, statetoid) for j in eqs. x[3 ]]
284
284
((prob isa DiscreteProblem) && ! isempty (vrjs)) && error (" Use continuous problems such as an ODEProblem or a SDEProblem with VariableRateJumps" )
@@ -294,7 +294,8 @@ function DiffEqJump.JumpProblem(js::JumpSystem, prob, aggregator; kwargs...)
294
294
vtoj = nothing ; jtov = nothing ; jtoj = nothing
295
295
end
296
296
297
- JumpProblem (prob, aggregator, jset; dep_graph= jtoj, vartojumps_map= vtoj, jumptovars_map= jtov, kwargs... )
297
+ JumpProblem (prob, aggregator, jset; dep_graph= jtoj, vartojumps_map= vtoj, jumptovars_map= jtov,
298
+ scale_rates= false , nocopy= true , kwargs... )
298
299
end
299
300
300
301
@@ -349,8 +350,14 @@ function updateparams!(ratemap::JumpSysMajParamMapper{U,V,W}, params) where {U <
349
350
sympar = ratemap. sympars[i]
350
351
ratemap. subdict[sympar] = p
351
352
end
353
+ nothing
352
354
end
353
355
356
+ function updateparams! (:: JumpSysMajParamMapper{U,V,W} , params:: Nothing ) where {U <: AbstractArray , V <: AbstractArray , W}
357
+ nothing
358
+ end
359
+
360
+
354
361
# create the initial parameter vector for use in a MassActionJump
355
362
function (ratemap:: JumpSysMajParamMapper{U,V,W} )(params) where {U <: AbstractArray , V <: AbstractArray , W}
356
363
updateparams! (ratemap, params)
0 commit comments