From 2cd18fa4a9e2ccf43566a120896a521f116d2368 Mon Sep 17 00:00:00 2001 From: Sam Isaacson Date: Mon, 25 Mar 2024 16:30:03 -0400 Subject: [PATCH] use SII.finalize_parameters_hook --- Project.toml | 2 +- src/problem.jl | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Project.toml b/Project.toml index 29081479..b27e02b6 100644 --- a/Project.toml +++ b/Project.toml @@ -41,7 +41,7 @@ RecursiveArrayTools = "3.12" Reexport = "1.0" SciMLBase = "2.30.1" StaticArrays = "1.9" -SymbolicIndexingInterface = "0.3.11" +SymbolicIndexingInterface = "0.3.13" UnPack = "1.0.2" julia = "1.10" diff --git a/src/problem.jl b/src/problem.jl index 9b4eccdf..016570c4 100644 --- a/src/problem.jl +++ b/src/problem.jl @@ -125,14 +125,11 @@ function Base.setindex!(prob::JumpProblem, args...; kwargs...) end # for updating parameters in JumpProblems to update MassActionJumps -function SII.set_parameter!(prob::JumpProblem, val, idx) - ans = SII.set_parameter!(SII.parameter_values(prob), val, idx) - +function SII.finalize_parameters_hook!(prob::JumpProblem, p) if using_params(prob.massaction_jump) update_parameters!(prob.massaction_jump, prob.prob.p) end - - ans + nothing end # when getindex is used.