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

Documentation of initial conditions that depend on a parameter #681

Merged
merged 2 commits into from
Sep 19, 2023

Conversation

TorkelE
Copy link
Member

@TorkelE TorkelE commented Sep 18, 2023

It is possible for an initial condition to be a parameter:

using Catlyst
rn = @reaction_network begin
  @species X(t)=1.0
  @parameters p=1.0 d=0.1
  p, 0 --> X
  d, X -->end

using DifferentialEquations, Plots
u0 = []
tspan = (0.0, 10.0)
p = []
oprob = ODEProblem(rn, u0, tspan, p)
sol = solve(oprob)
plot(sol)

which is actually quite neat. We don't document (or test) this feature though, so I have added both.

Copy link
Member

@isaacsas isaacsas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from that one comment LGTM. Thanks!

Co-authored-by: Sam Isaacson <isaacsas@users.noreply.github.com>
@TorkelE TorkelE merged commit 401a775 into master Sep 19, 2023
8 of 9 checks passed
@TorkelE TorkelE deleted the parametric_initialconditions_doc branch September 19, 2023 11:40
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

Successfully merging this pull request may close these issues.

2 participants