### Epidemiological Modeling With Structured Cospans

#### Posted by John Baez

This is a wonderful development! Micah Halter and Evan Patterson have taken my work on structured cospans with Kenny Courser and open Petri nets with Jade Master, together with Joachim Kock’s whole-grain Petri nets, and turned them into a practical software tool!

Then they used *that* to build a tool for ‘compositional’ modeling of the spread of infectious disease. By ‘compositional’, I mean that they make it easy to build more complex models by sticking together smaller, simpler models.

Even better, they’ve illustrated the use of this tool by rebuilding part of the model that the UK has been using to make policy decisions about COVID19.

All this software was written in the programming language Julia.

I had expected structured cospans to be useful in programming and modeling, but I didn’t expect it to happen so fast!

For details, read this great article:

- Micah Halter and Evan Patterson, Compositional epidemiological modeling using structured cospans, October 17, 2020.

Abstract.The field of applied category theory (ACT) aims to put the compositionality inherent to scientific and engineering processes on a firm mathematical footing. In this post, we show how the mathematics of ACT can be operationalized to build complex epidemiological models in a compositional way. In the first two sections, we review the idea of structured cospans, a formalism for turning closed systems into open ones, and we illustrate its use in Catlab through the simple example of open graphs. Finally, we put this machinery to work in the setting of Petri nets and epidemiological models. We construct a portion of the COEXIST model for the COVID-19 pandemic and we simulate the resulting ODEs.

You can also see related articles by James Fairbanks, Owen Lynch and Evan Patterson here:

Also try these videos:

James Fairbanks, AlgebraicJulia: Applied category theory in Julia, July 29, 2020.

Evan Patterson, Realizing applied category theory in Julia, January 16, 2020.

I’m biased, but I think this is really cool cutting-edge stuff. If you want to do work along these lines let me know here and I’ll get Patterson to take a look.

Here’s part of a network created using their software:

## Jeffery

Here is a talk where they apply topology to studying COVID-19, the evolution of the virus, and the current pandemic.

https://www.youtube.com/watch?v=PUXYLsaNdQg&feature=youtu.be