jpfairbanks / SemanticModels.jl

A julia package for representing and manipulating model semantics
MIT License
77 stars 17 forks source link

Add a theory for modeling SEIRD diseases w/ primitive transmision model (covid?) #241

Closed jpfairbanks closed 4 years ago

jpfairbanks commented 4 years ago

Now that I understand how to define theories and syntaxes, I think this is a better theory of compartmental models.

jpfairbanks commented 4 years ago

It makes the following model with two copies of the SEIR system with spontaneous flows between cities.

image

jpfairbanks commented 4 years ago

Now supporting n cities and SEIRD basis. If you start from here image

and plug in SEIRD:

image

you get

image

jpfairbanks commented 4 years ago

The next step is to hook it up to the existing PetriNet code to functorially map from that WD into a PN and then start solving some DiffEQs.

jpfairbanks commented 4 years ago

@mehalter please take a look at the latest two commits. Commit https://github.com/jpfairbanks/SemanticModels.jl/pull/241/commits/4c3b62f9c2a2cb2d6ceadca172499093e0b81051 is using the old API that the malaria notebook uses and I think should work. Commit https://github.com/jpfairbanks/SemanticModels.jl/pull/241/commits/85987d1adb5afe21bf6917bc214e46e2ea6cee6a is attempting to eliminate the dependency on ModelingToolkit, which is a hack that we don't really need, but is a little farther from working. If we could have at lease one of these approaches working by early afternoon tomorrow, that would be helpful for a demo.

jpfairbanks commented 4 years ago

I think I might just have left and right backwards when doing the Span Cospan thing.