Mathematical and Minischeme Appendix

Main Menu           Previous Topic                                                           Next Topic


Minischeme Definitions of Sharing Functions

All the sharing production functions are derived by the procedure described on the previous slide. Here they are:

Agent 1 (S1). Function corresponds to the negative term in equation 9.
(* (cond (= (getpartnerid) 10)
        (* beta (self) (I-3))
        1 0)
    time-step)

Agent 5 (I04) - see equation 4
(* (cond (= (getpartnerid) 15)
        (* (- 1 delta) r4 (self))
        (= (getpartnerid) 16)
        (* delta r4 (self))
        1 0)
    time-step)

Agent 6 (Q0) - see equation 5
(* (cond (= (getpartnerid) 1)
        (* (- 1 f) (- 1 nu0) mu (self) (min 1 (/ nv (q-sum))))
        (= (getpartnerid) 7)
        (* beta (I-3) (self))
        (= (getpartnerid) 15)
        (* (- 1 f) nu0 mu (self) (min 1 (/ nv (q-sum))))
        (= (getpartnerid) 16)
        (* f mu (self) (min 1 (/ nv (q-sum))))
        1 0)
    time-step)

Agent 7 (Q1) - see equation 6
(* (cond (= (getpartnerid) 8)
        (* r1 (self))
        (= (getpartnerid) 10)
        (* (- 1 f) (- 1 nu1) mu (self) (min 1 (/ nv (q-sum))))
        (= (getpartnerid) 15)
        (* (- 1 f) nu1 mu (self) (min 1 (/ nv (q-sum))))
        (= (getpartnerid) 16)
        (* f mu (self) (min 1 (/ nv (q-sum))))
        1 0)
    time-step)

Agent 8 (Q2) - see equation 7
(* (cond (= (getpartnerid) 9)
        (* r2 (self))
        (= (getpartnerid) 11)
        (* (- 1 f) mu (self) (min 1 (/ nv (q-sum))))
        (= (getpartnerid) 16)
        (* f mu (self) (min 1 (/ nv (q-sum))))
        1 0)
    time-step)

Agent 9 (Q3) - see equation 7
(* (cond (= (getpartnerid) 12)
        (* (- 1 f) (- 1 h) mu (self) (min 1 (/ nv (q-sum))))
        (= (getpartnerid) 13)
        (* r3 (self))
        (= (getpartnerid) 14)
        (* (- 1 f) h mu (self) (min 1 (/ nv (q-sum))))
        (= (getpartnerid) 16)
        (* f mu (self) (min 1 (/ nv (q-sum))))
        1 0)
    time-step)

Agent 10 (I11) - see equation 10
(* (cond (= (getpartnerid) 11)
        (* r1 (self))
        1 0)
    time-step)

Agent 11 (I12) - see equation 11
(* (cond (= (getpartnerid) 12)
        (* r2 (self))
        1 0)
    time-step)

Agent 12 (I13) - see equation 12
(* (cond (= (getpartnerid) 13)
        (* r3 (self))
        1 0)
    time-step)

Agent 13 (I14) - see equation 13
(* (cond (= (getpartnerid) 15)
        (* (- 1 delta) r4 (self))
        (= (getpartnerid) 16)
        (* delta r4 (self))
        1 0)
    time-step)

Agent 14 (H) - see equation 8
(* (cond (= (getpartnerid) 12)
        (* alpha (self))
        (= (getpartnerid) 13)
        (* r3 (self))
        1 0)
    time-step)

Agent 15 (Z) - see equation 14
0

Agent 16 (D) - see equation 15
0

Production functions for agents 0, 2, 3, and 4 will be different for the cases of Trace and Mass Vaccination.

Sharing Functions for agents 0, 2, 3, and 4 in the case of Trace Vaccination (TV):

Agent 0 (S0) - see equation 1
(* (cond (= (getpartnerid) 2)
        (* beta (I-3) (self))
        (and (= (getpartnerid) 6) (>= (gettime) (/ tau time-step)))
        (* (CPRN) (self) r3 (I-3))
        1 0)
    time-step)

Agent 2 (I01) - see equation 2
(* (cond (and (= (getpartnerid) 7) (>= (gettime) (/ tau time-step)))
        (* (+ (* (CPRN) (self)) (* p (lambda 1))) r3 (I-3))
        (= (getpartnerid) 3)
        (* r1 (self))
        1 0)
    time-step)

Agent 3 (I02) - see equation 3
(* (cond (and (= (getpartnerid) 8) (>= (gettime) (/ tau time-step)))
        (* (+ (* (CPRN) (self)) (* p (lambda 2))) r3 (I-3))
        (= (getpartnerid) 4)
        (* r2 (self))
        1 0)
    time-step)

Agent 4 (I03) - see equation 4
(* (cond (and (= (getpartnerid) 9) (>= (gettime) (/ tau time-step)))
        (* (+ (* (CPRN) (self)) (* p (lambda 3))) r3 (I-3))
        (= (getpartnerid) 5)
        (* r3 (self))
        1 0)
    time-step)

Sharing functions for agents 0, 2, 3, and 4 in the case of mass vaccination (MV):

Agent 0 (S0) - see equation 1
(* (cond (and (= (getpartnerid) 2) (< (gettime) (/ tau time-step)))
        (* beta (I-3) (self))
        (and (= (getpartnerid) 6) (>= (gettime) (/ tau time-step)))
        (/ (self) time-step)
        1 0)
    time-step)

Agent 2 (I01) - see equation 2
(* (cond (and (= (getpartnerid) 7) (>= (gettime) (/ tau time-step)))
        (/ (self) time-step)
        (and (= (getpartnerid) 3) (< (gettime) (/ tau time-step)))
        (* r1 (self))
        1 0)
    time-step)

Agent 3 (I02) - see equation 3
(* (cond (and (= (getpartnerid) 8) (>= (gettime) (/ tau time-step)))
        (/ (self) time-step)
        (and (= (getpartnerid) 4) (< (gettime) (/ tau time-step)))
        (* r2 (self))
        1 0)
    time-step)

Agent 4 (I03) - see equation 4
(* (cond (and (= (getpartnerid) 9) (>= (gettime) (/ tau time-step)))
        (/ (self) time-step)
        (and (= (getpartnerid) 5) (< (gettime) (/ tau time-step)))
        (* r3 (self))
        1 0)
    time-step)

There is an important difference between the mathematical model described in “Smallpox Attack” and our simulation: the former is a continuous model, while the latter relies on discrete time steps. Our approximation is performed by linearizing the differential equations over some small but definite period of time. This small period of time, measured in days, is stored in the global variable “time-step”. For example, if time-step is equal to 0.04 days, then the passage of 100 days will be represented by stepping through 100/0.04 = 2,500 time intervals in the simulator.

The smaller we make the time step, the closer our simulator's model approximates the continuous model in “Smallpox Attack.” In fact, if its value is too high, the program runs into overflow errors, as various agents achieve extremely high or low values. On the other hand, making the value of time-step too small makes running the society unpractically slow. After sampling a wide range of values, we found that 0.03 days/time-unit = 43.2 min/time-unit is a reasonable value to use for the trace vaccination scenario, and 0.005 days/time-unit = 7.2 min/time-unit for the mass vaccination scenario. These values are small enough that results do not change significantly by further lowering the time-step. However, if very precise measurements are required, these levels should be re-evaluated.

                   Previous Slide                                                           Next Slide