Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in deterministic model #270

Open
bad-ants-fleet opened this issue May 5, 2022 · 0 comments
Open

Bug in deterministic model #270

bad-ants-fleet opened this issue May 5, 2022 · 0 comments

Comments

@bad-ants-fleet
Copy link

Hey all,

The deterministic simulations of the Brusselator model are broken. I presume there is a bug in the generated ODE system? You should see oscillations, ....

The model I want to simulate:
2X + Y -{1}-> 3 X
X -{2.5}-> Y
X -{1}->
-{1}-> X

Below you find code to reproduce the problem, I don't know how to extract the simulated ODE system, but it should be:
dXdt = X^2 Y - 3.5 X + 1
dYdt = -X^2 Y + 2.5 X

The Brusselator CRN

X = Species("X")
Y = Species("Y")

R1 = Reaction.from_massaction([X,X,Y], [X,X,X], k_forward = 1.)
R2 = Reaction.from_massaction([X], [Y], k_forward = 2.5)
R34 = Reaction.from_massaction([X], [], k_forward = 1., k_reverse = 1.)
CRN = ChemicalReactionNetwork(species = [X,Y], reactions = [R1,R2,R34])

initcond = {str(X):3, str(Y):2}
time = np.linspace(0, 50, 1000)

R = CRN.simulate_with_bioscrape_via_sbml(time, initial_condition_dict = initcond, stochastic = False)

plt.plot(R['time'], R[str(X)])
plt.plot(R['time'], R[str(Y)])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant