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

small vis issues with open systems #4

Open
bbolker opened this issue Jun 24, 2023 · 1 comment
Open

small vis issues with open systems #4

bbolker opened this issue Jun 24, 2023 · 1 comment

Comments

@bbolker
Copy link
Collaborator

bbolker commented Jun 24, 2023

(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:

Screenshot from 2023-06-24 19-09-57

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)

Screenshot from 2023-06-24 19-11-24

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 ...)

@stevencarlislewalker
Copy link
Member

Thanks @bbolker. I think that this is related to canmod/macpan2#56.

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

2 participants