Skip to content

small vis issues with open systems #4

@bbolker

Description

@bbolker

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions