Created
June 6, 2022 22:06
-
-
Save paulflang/da6d17a632bb2736c828d38f4529b878 to your computer and use it in GitHub Desktop.
structural_simplify complains about extra variables despite ODEProblem does just fine, even when checkl_length_true
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Downloads, SBMLToolkit#pl-refactor_v0.1.13 | |
using OrdinaryDiffEq, ModelingToolkit | |
case = "00023" | |
sbml_url = "https://raw.githubusercontent.com/sbmlteam/sbml-test-suite/master/cases/semantic/$case/$case"*"-sbml-l3v2.xml" | |
sbml = String(take!(Downloads.download(sbml_url, IOBuffer()))) | |
ml = readSBMLFromString(sbml, doc -> begin | |
set_level_and_version(3, 2)(doc) | |
convert_simplify_math(doc) | |
end) | |
rs = ReactionSystem(ml) | |
sys = convert(ODESystem, rs; include_zero_odes = true) | |
equations(sys) | |
states(sys) | |
ssys = structural_simplify(sys) | |
prob = ODEProblem(sys, Pair[], (0, 1); check_length=true) | |
sol = solve(prob, Tsit5()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment