Skip to content

Commit

Permalink
Merge pull request #222 from paulflang/pl/fix_seemsdefined
Browse files Browse the repository at this point in the history
use rule.variable instead of rule.id in seemsdefined
  • Loading branch information
exaexa authored Jul 17, 2022
2 parents 378a658 + fe1b3b2 commit 8705bd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ isfreein(id::String, expr::SBML.Math) = interpret_math(
Determine if an identifier seems defined or used by any Rules in the model.
"""
seemsdefined(id::String, m::SBML.Model) =
any(r.id == id for r in m.rules if r isa AssignmentRule) ||
any(r.id == id for r in m.rules if r isa RateRule) ||
any(r.variable == id for r in m.rules if r isa AssignmentRule) ||
any(r.variable == id for r in m.rules if r isa RateRule) ||
any(isfreein(id, r.math) for r in m.rules if r isa AlgebraicRule)

"""
Expand Down

0 comments on commit 8705bd1

Please sign in to comment.