[Vp-integration-subgroup] Composition Example 1 -- Papst's model

Jacob Barhak jacob.barhak at gmail.com
Mon Apr 26 04:38:25 PDT 2021


Thanks William,

Your example is simple, yet there is a simpler example of an SIR model
without any function composition where E(p) is composed with itself - this
should be example 0 if you ever intend to write a textbook.

However, your example is simple enough to understand the concepts of:
1. Composition - combining function operators
2. Annotation - the need to determine what element in the vector means what
so that you can transmit it
3. Language independent - Your model is defined mathematically in an
abstract way so that it can be implemented easily by different languages


If we ever to document this further and build more examples, I suggest we
stick to even simpler examples and elaborate them further and actually
define the functions and sample values - those do not have to be real, just
good enough so people can follow the numbers if the example is actually
solved. Some people have difficulty with math yet once you plug in the
numbers, things become clear to them when they see what happens step by
step. Also some diagrams may help those people.

I am not sure you or people in this group wish to spend more time
developing those examples towards some documentation that includes
terminology and definitions. If you do, it can become a base for a future
standard and we can discuss this with people who wrote those.

I know that this example can be expanded in many directions with many types
of compositions - I actually use some of those.

I wonder what other people think on this - I hope many like this type of
example like I do.

            Jacob





On Mon, Apr 26, 2021 at 4:09 AM William Waites <wwaites at ieee.org> wrote:

> This example comes from the paper by Irena Papst, Kevin O’Keefe and Steve
> Strogatz:
>
>     http://export.arxiv.org/abs/2101.07926
>
> This is a simple example because it is a composition of two models: a
> standard SIR epidemic and a decision process.
>
> One time-step for this model is one year. The epidemic is run from some
> initial conditions to steady state to find the final size. Then the
> decision-model uses the final size to work out how many individuals are
> likely to get vaccinated the following year. The details of how this works
> are given in the paper. Here I focus on the high-level structure.
>
> The state space of the model is just the cartesian product X = S ⨉ I ⨉ R
> where S, I and R are the fraction of the population that is susceptible,
> infectious and removed and are each real numbers, e.g. S = I = R = ℝ.
>
> The epidemic model is transformed to the propagator E(p) : X → X for some
> parameters p (e.g. the various rates). It decides, giving a population that
> is some mix of S and R, how many I to have initially and then simulates the
> epidemic deterministically to completion.
>
> The decision model is also just a function D(q): X → X for some parameters
> q (e.g. costs and efficacy of vaccines). It is defined initially as D(1, 0,
> 0) = (1, 0, 0).
>
> The composition DE(p,q) : X → X is simply DE(p,q) = E(p)∘D(q).
>
> A simulation could be a function from initial conditions and time to a
> state: Sim : X ⨉ ℕ → X. It gives the system state at a particular time.
> Time is discrete here, measured in years, so is a natural number ℕ.
>
> It is given by Sim(p,q)(x₀, n) = DE(p,q)ⁿ(x₀) where x₀ is the initial
> state and n is the time. The superscript n means “compose DE(p,q) with
> itself n times”.
>
> This is described in more or less formal language. However, there are some
> things to point out that connect to the standards discussion.
>
> I was careful to specify propagators as functions and to be explicit about
> their types. This is a simple case where all propagators have the same
> type. The low-level standard for this is just the calling convention for
> whatever programming language it’s implemented in, but if we imagine that E
> and D are implemented in different languages then we need to be able to say
> “these functions take and return a vector of three floating point numbers”.
>
> The order of the coordinates in the state space matters. If S and R were
> swapped for one of the processes, that would give confusion and wrong
> results. So we would want to annotate each propagator to make sure that the
> space was presented in the right order. So really we want the composition
> operator ∘ to be clever enough to permute the space appropriately.
>
> _______________________________________________
> Vp-integration-subgroup mailing list
> Vp-integration-subgroup at lists.simtk.org
> https://lists.simtk.org/mailman/listinfo/vp-integration-subgroup
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.simtk.org/pipermail/vp-integration-subgroup/attachments/20210426/1aab2041/attachment.html>


More information about the Vp-integration-subgroup mailing list