-
Notifications
You must be signed in to change notification settings - Fork 3
Description
"Contact rate" is a concept which is familiar to epidemiologists but doesn't neatly fit into the present "pattern match" based timing of AlgebraicABMs. The phenomenon we want to capture is that, at some frequency for each infected person, they interact with an arbitrary other person. That other person gets infected iff they are susceptible (only under that circumstance is there an infection event).
If we naively try to make the pattern be "S + I", then the rate of (attempted) events is proportional to the number of susceptible people (imagine a simulation with one infected person and a trillion susceptibles).
Thus the idea of a "basis"
One way to further refine this idea of a basis is to split it into two components:
Another way to address this is to 'bite the bullet' and implement #19. A simple wiring diagram program with one Query box and one Rewrite box would be sufficient to express this scenario.
(note this is using Query in a common-but-idiosyncratic way: the standard use is looping through all the possible matches of some particular way of extending the current 'agent' (AKA 'distinguished focus'); however, if we pass through it once and never loop back through it, it has the effect of extending the current agent with an arbitrary choice)
(also, in this scenario, the "input agent" of the rule is I+P (it will only rewrite this particular infected + person pair), but the actual