Skip to content

Commit 0f74dd5

Browse files
authored
Merge pull request #108 from SciML/aj/askem
disable converting nonconstant parameters to states
2 parents a4fbe56 + dac84af commit 0f74dd5

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

src/SBMLToolkit.jl

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ using Catalyst
44
using SBML
55
using SymbolicUtils
66

7+
include("drafts.jl")
78
include("systems.jl")
89
include("reactions.jl")
910
include("rules.jl")

src/drafts.jl

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function is_event_assignment(k, model)
2+
for ev in values(model.events)
3+
for as in ev.event_assignments
4+
if as.variable == k
5+
return true
6+
end
7+
end
8+
end
9+
return false
10+
end

src/systems.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function get_mappings(model::SBML.Model)
8282
end
8383
end
8484
for (k, v) in model.parameters
85-
if v.constant == false && SBML.seemsdefined(k, model)
85+
if v.constant == false && (SBML.seemsdefined(k, model) || is_event_assignment(k, model))
8686
var = create_var(k, IV; isbcspecies = true)
8787
push!(u0map, var => v.value)
8888
else

0 commit comments

Comments
 (0)