Skip to content

Commit

Permalink
Fix substitutions into rate laws
Browse files Browse the repository at this point in the history
  • Loading branch information
bgyori committed Aug 7, 2023
1 parent 9feaccb commit 204bedd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mira/modeling/ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ def __init__(self, model: Model, initialized: bool):
for symbol in rate.free_symbols:
sym_str = str(symbol)
if sym_str in concept_map:
rate.subs(symbol,
self.y[self.vmap[concept_map[sym_str]]])
rate = rate.subs(symbol,
self.y[self.vmap[concept_map[sym_str]]])
elif sym_str in self.pmap:
rate.subs(symbol,
self.p[self.pmap[parameter_map[sym_str]]])
rate = rate.subs(symbol,
self.p[self.pmap[parameter_map[sym_str]]])
elif model.template_model.time and \
sym_str == model.template_model.time.name:
rate.subs(symbol, 't')
rate = rate.subs(symbol, 't')
else:
assert False
# Calculate the rate based on mass-action kinetics
Expand Down

0 comments on commit 204bedd

Please sign in to comment.