1
+ # include (SIR_Hoya_ macros .inc )
1
2
[top ]
2
3
components : population
3
4
@@ -12,13 +13,47 @@ neighbors : population(-1,0)
12
13
neighbors : population (1 ,0 )
13
14
14
15
initialvalue : 0
15
- InitialCellsValue : SIR_ Hoya .val
16
+ %InitialCellsValue : SIR_ Hoya .val
17
+
18
+ statevariables : people %population in the cell
19
+ statevariables : c %connectivy between cells
20
+ % 1 - 3 ways of transportation
21
+ % 0.6 - 2 ways of transportation
22
+ % 0.3 - 1 way of transportation
23
+ % 0 - no transportation
24
+ % We are assuming same connectivity for all cell , but in the original model , we should have a c for each neighbour cell
25
+
26
+ statevariables : m
27
+ %movement factor [0 , 1 ] probability of an infected individual from a neighbour cell moved to here . We are assuming same for all cells , but we may have a different one for each cell .
28
+
29
+ statevariables : i_ sus i_ inf i_ rec
30
+ statevalues : 10 1 0.5 0.9 0.1 0
31
+
32
+ NeighborPorts : sus inf rec pop
16
33
17
34
localtransition : infections
18
35
36
+
19
37
[infections ]
20
38
21
- rule : {(0 ,0 )} 1000 { t }
39
+ %IT DOES NOT WORK
40
+ %rule : {~pop := $people ; } { $i_ rec := (# macro (e )+ (0 ,1 )~inf ); } 1000 { t }
41
+
42
+ %IT DOES WORK
43
+ %rule : {~pop := $people ; } { $i_ rec := # macro (e ); } 1000 { t }
44
+
45
+ %IT DOES WORK
46
+ rule : {~pop := $i_ rec ; } { $i_ rec := # macro (e ); } 1000 { t }
47
+
48
+ %IT DOES NOT WORK
49
+ %rule : {~pop := $i_ rec + (0 ,1 )~inf ; } { $i_ rec := # macro (e ); } 1000 { t }
50
+
51
+ %IT DOES WORK
52
+ rule : {~pop := $i_ rec ; } { $i_ rec := # macro (e ); } 1000 { (0 ,0 )~pop = 10 }
53
+
54
+ %
55
+ %~inf := (1 - # macro (e )) * (0 ,0 )~inf + # macro (v )* (0 ,0 )~sus * (0 ,0 )~inf + (0 ,0 )~sus * # macro (effect_ neighbours );
56
+ %~sus := (0 ,0 )~sus - # macro (v )* (0 ,0 )~sus * (0 ,0 )~inf - (0 ,0 )~sus * # macro (effect_ neighbours );
22
57
23
58
% neighbors : population (- 1 ,- 1 ) population (- 1 ,0 ) population (- 1 ,1 )
24
59
% neighbors : population (1 ,- 1 ) population (1 ,0 ) population (1 ,1 )
0 commit comments