论文标题

用库存和流程图的组成建模

Compositional Modeling with Stock and Flow Diagrams

论文作者

Baez, John, Li, Xiaoyan, Libkind, Sophie, Osgood, Nathaniel D., Patterson, Evan

论文摘要

库存和流程图在流行病学中广泛用于模拟人群的动力学。 尽管已经存在用于构建这些图表并模拟其描述的系统的工具,但我们创建了一个名为Stockflow的新软件包,该软件包是代数的生态系统的一部分,该系统使用类别理论的想法来克服现有软件的显着限制。组成性是由装饰的Cospans理论提供的:可以组成库存和流程图,以由无方向图的执行形式形式形式的直观方式形成较大的组合。我们的方法还将库存和流程图的语法与可以分配的语义分开。我们考虑在普通微分方程中的语义,尽管有可能。例如,我们在Stockflow中解释代码,该代码实现了加拿大使用的Covid-19模型的简化版本。

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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源