Skip to content

Commit

Permalink
sir example
Browse files Browse the repository at this point in the history
  • Loading branch information
stevencarlislewalker committed Dec 14, 2023
1 parent ebe247a commit 58d31ed
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion inst/starter_models/sir/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,19 @@ computations = list(
)

## absolute flow rates (per time only)

## engine-agnostic (not done)
## infection = mp_flow(~ I * beta / N, from = S, to = I)
## recovery = mp_flow(~ gamma, from = I, to = R)
## state_update = mp_update(type = "R4K")

## engine-specific
flow_rates = list(
infection ~ S * I * beta / N
, recovery ~ gamma * I
)

## state updates
##
state_updates = list(
S ~ S - infection
, I ~ I + infection - recovery
Expand Down

0 comments on commit 58d31ed

Please sign in to comment.