Compositional Modeling with Stock and Flow Diagrams

05/09/2022
by   John Baez, et al.
0

Stock and flow diagrams are widely used in epidemiology to model the dynamics of populations. Although tools already exist for building these diagrams and simulating the systems they describe, we have created a new package called StockFlow, part of the AlgebraicJulia ecosystem, which uses ideas from category theory to overcome notable limitations of existing software. Compositionality is provided by the theory of decorated cospans: stock and flow diagrams can be composed to form larger ones in an intuitive way formalized by the operad of undirected wiring diagrams. Our approach also cleanly separates the syntax of stock and flow diagrams from the semantics they can be assigned. We consider semantics in ordinary differential equations, although others are possible. As an example, we explain code in StockFlow that implements a simplified version of a COVID-19 model used in Canada.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/01/2022

A Categorical Framework for Modeling with Stock and Flow Diagrams

Stock and flow diagrams are already an important tool in epidemiology, b...
research
09/30/2022

SPRAT: A Spatially-Explicit Marine Ecosystem Model Based on Population Balance Equations

To successfully manage marine fisheries using an ecosystem-based approac...
research
06/07/2020

Contextualisation of Data Flow Diagrams for security analysis

Data flow diagrams (DFDs) are popular for sketching systems for subseque...
research
05/03/2023

Hierarchical and Upstream-Downstream Composition of Stock and Flow Models

The growing complexity of decision-making in public health and health ca...
research
01/31/2018

TikZ-FeynHand: Basic User Guide

This is a userguide for the LaTex package Tikz-FeynHand at https://ctan....
research
08/01/2022

Physics-informed Machine Learning of Parameterized Fundamental Diagrams

Fundamental diagrams describe the relationship between speed, flow, and ...
research
11/24/2020

Transforming Data Flow Diagrams for Privacy Compliance (Long Version)

Recent regulations, such as the European General Data Protection Regulat...

Please sign up or login with your details

Forgot password? Click here to reset