(I don't think I have push access to this repo - may I get it?)
library(macpan2)
library(macpan2helpers)
## with birth (D0)/death (D) distinct
sir1 <- Compartmental("examples/sir_open1")
visCompartmental(sir1)
## with all fake compartments distinct
sir2 <- Compartmental("examples/sir_open2")
visCompartmental(sir2)
Setting up an 'open' SIR model (with births/deaths) with separate fake birth and death compartments gives this:
all the correct arrows are actually there, and can be seen if you manipulate the diagram by dragging the boxes around, but the hierarchical layout doesn't do anything about trying to position bins so that arrows don't coincide
Adding a separate fake compartment for birth (D0) and each death flow (D1, D2, D3) gives something prettier (but doing this is annoying)
This is obviously low priority but might be something for a small student project (i.e. see if there's any way to adapt the visNetwork layout algorithms so we can get something that works better out of the box ...)
(I don't think I have push access to this repo - may I get it?)
Setting up an 'open' SIR model (with births/deaths) with separate fake birth and death compartments gives this:
all the correct arrows are actually there, and can be seen if you manipulate the diagram by dragging the boxes around, but the hierarchical layout doesn't do anything about trying to position bins so that arrows don't coincide
Adding a separate fake compartment for birth (D0) and each death flow (D1, D2, D3) gives something prettier (but doing this is annoying)
This is obviously low priority but might be something for a small student project (i.e. see if there's any way to adapt the
visNetwork
layout algorithms so we can get something that works better out of the box ...)