Unverified Commit ea39152c authored by Miroslav Kratochvil's avatar Miroslav Kratochvil Committed by GitHub
Browse files

Merge pull request #116 from LCSB-BioCore/mk-stoichiometry-quickfix

quickfix: do not break stoichiometry if 2 species references are present
parents 70778a8c e6681aa3
......@@ -334,11 +334,13 @@ function extractModel(mdl::VPtr)::SBML.Model
# extract stoichiometry
stoi = Dict{String,Float64}()
add_stoi =
(sr, factor) ->
stoi[get_string(sr, :SpeciesReference_getSpecies)] =
add_stoi(sr, factor) = begin
s = get_string(sr, :SpeciesReference_getSpecies)
stoi[s] =
get(stoi, s, 0) +
ccall(sbml(:SpeciesReference_getStoichiometry), Cdouble, (VPtr,), sr) *
# reactants and products
for j = 1:ccall(sbml(:Reaction_getNumReactants), Cuint, (VPtr,), re)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment