@@ -4,30 +4,40 @@ components : area
4
4
5
5
[area ]
6
6
type : cell
7
- width : 21
8
- height : 21
7
+ width : 50
8
+ height : 50
9
9
delay : transport
10
- defaultDelayTime : 100
10
+ defaultDelayTime : 1
11
11
border : wrapped
12
12
neighbors : area (- 1 ,0 )
13
13
neighbors : area (0 ,- 1 ) area (0 ,0 ) area (0 ,1 )
14
14
neighbors : area (1 ,0 )
15
- initialvalue : 0
15
+ initialvalue : - 1
16
16
17
17
18
18
localtransition : sir - hoya - rule
19
19
20
- statevariables : population v c m
21
- statevalues : 10 0.6 1 1
20
+ statevariables : population v c m i_ infec i_ rec i_ sus
21
+ statevalues : 100 0.6 1.0 0.5 0.0 0.0 1.0
22
+ initialvariablesvalue : SIR_ Hoya .var
22
23
23
-
24
- neighborports : value infec rec pop sus
24
+ neighborports : initial infec rec pop sus
25
25
26
26
[sir - hoya - rule ]
27
- rule : { ~pop := $population ;
28
- ~infec := (1 - # macro (e )) * (0 ,0 )~infec + $v * (0 ,0 )~sus * (0 ,0 )~infec + (0 ,0 )~sus * # macro (effect_ neighbours );
29
- ~sus := (0 ,0 )~sus - $v * (0 ,0 )~sus * (0 ,0 )~infec - (0 ,0 )~sus * # macro (effect_ neighbours );
30
- ~rec := (0 ,0 )~rec + # macro (e )* (0 ,0 )~infec ;
31
- } 100 { t }
27
+ rule : {~initial := 0 ; ~pop := $population ; ~infec := $i_ infec ; ~sus := $i_ sus ; ~rec := $i_ rec ; }
28
+ 1 {(0 ,0 )~initial = - 1 }
29
+
30
+ rule : {~pop := $population ; ~infec := $i_ infec ; ~sus := $i_ sus ; ~rec := $i_ rec ; }
31
+ {$i_ infec := trunc (min ((1 - # macro (e )) * (0 ,0 )~infec + $v * (0 ,0 )~sus * (0 ,0 )~infec + (0 ,0 )~sus * # macro (effect_ neighbours ),1 )* 100 )/ 100 ;
32
+ $i_ rec := trunc (min ((0 ,0 )~rec + # macro (e )* (0 ,0 )~infec ,1 )* 100 )/ 100 ;
33
+ $i_ sus := 1 - $i_ rec - $i_ infec ; }
34
+ 1 { (0 ,0 )~initial != - 1 }
35
+
36
+
37
+
38
+
39
+
40
+
41
+
32
42
33
43
0 commit comments