# Hierarchical and Upstream-Downstream Composition of Stock and Flow Models

arXiv: https://arxiv.org/abs/2305.02136 · HTML: https://mlsanity.com/paper/2305.02136/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 3 May 2023.

## Built on by (most cited first, 1 of 1)

- [CogNarr Ecosystem: Facilitating Group Cognition at Scale](https://mlsanity.com/paper/2407.18945/) (2024)

## Abstract (arXiv)

The growing complexity of decision-making in public health and health care has motivated an increasing use of mathematical modeling. An important line of health modeling is based on stock & flow diagrams. Such modeling elevates transparency across the interdisciplinary teams responsible for most impactful models, but existing tools suffer from a number of shortcomings when used at scale. Recent research has sought to address such limitations by establishing a categorical foundation for stock & flow modeling, including the capacity to compose a pair of models through identification of common stocks and sum variables. This work supplements such efforts by contributing two new forms of composition for stock & flow diagrams. We first describe a hierarchical means of diagram composition, in which a single existing stock is replaced by a diagram featuring compatible flow structure. Our composition method offers extra flexibility by allowing a single flow in the stock being replaced to split into several flows totalling to the same overall flow rate. Secondly, to address the common need of docking a stock & flow diagram with another "upstream" diagram depicting antecedent factors, we contribute a composition approach that allows a flow out of an upstream stock in one diagram to be connected to a downstream stock in another diagram. Both of these approaches are enabled by performing colimit decomposition of stock & flow diagrams into single-stock corollas and unit flows.
