Skip to content

Commit

Permalink
Fix a major bug in _dydt
Browse files Browse the repository at this point in the history
This solves a *major bug* in the code. The properly adjusted reaction rate constants weren't used, but they are now.
  • Loading branch information
schneiderfelipe committed Nov 26, 2021
1 parent 69379a7 commit 7db8feb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion overreact/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def get_dydt(scheme, k, ef=EF):
k_adj = _adjust_k(scheme, k, ef=ef)

def _dydt(t, y):
r = k * jnp.prod(jnp.power(y, M), axis=1)
r = k_adj * jnp.prod(jnp.power(y, M), axis=1)
return jnp.dot(A, r)

if _found_jax:
Expand Down

0 comments on commit 7db8feb

Please sign in to comment.