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

Circular dependencies in initial condition are are not an error #132

Closed
richfitz opened this issue Oct 1, 2018 · 0 comments
Closed

Circular dependencies in initial condition are are not an error #132

richfitz opened this issue Oct 1, 2018 · 0 comments

Comments

@richfitz
Copy link
Member

@richfitz richfitz commented Oct 1, 2018

gen <- odin::odin({
  deriv(S) <- Births - b * S - beta * S * I / N + delta * R
  deriv(I) <- beta * S * I / N - (b + sigma) * I
  deriv(R) <- sigma * I - b * R-delta * R
  
  N <- S + I + R
  
  initial(S) <- N0 - I0
  initial(I) <- I0
  initial(R) <- R
  
  b <- 1/75
  I0 <- user(1)
  N0 <- 1e7
  Births <- N * b
  beta <- user(24)
  sigma <- user(12)
  delta <- user(0.2)
})

The initial(R) <- R line here should be an error

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.