|
1 |
| -[top] |
2 |
| -components : population |
3 |
| - |
4 |
| -[population] |
5 |
| -type : cell |
6 |
| -dim : (100,100) |
7 |
| -delay : transport |
8 |
| -defaultDelayTime : 1 |
9 |
| -border : nowrapped |
10 |
| -neighbors : population(0,-1) population(0,0) population(0,1) |
11 |
| -neighbors : population(-1,0) |
12 |
| -neighbors : population(1,0) |
13 |
| - |
14 |
| -initialvalue : 0 |
15 |
| -InitialCellsValue : SIR_Hoya.val |
16 |
| - |
17 |
| -localtransition : infections |
18 |
| - |
19 |
| -[infections] |
20 |
| - |
21 |
| -rule : {(0,0)} 1000 { t } |
22 |
| - |
23 |
| -% neighbors : population(-1,-1) population(-1,0) population(-1,1) |
24 |
| -% neighbors : population(1,-1) population(1,0) population(1,1) |
| 1 | +#include(SIR_Hoya_macros.inc) |
| 2 | +[top] |
| 3 | +components : area |
| 4 | + |
| 5 | +[area] |
| 6 | +type : cell |
| 7 | +width : 50 |
| 8 | +height : 50 |
| 9 | +delay : transport |
| 10 | +defaultDelayTime : 1 |
| 11 | +border : wrapped |
| 12 | +neighbors : area(-1,0) |
| 13 | +neighbors : area(0,-1) area(0,0) area(0,1) |
| 14 | +neighbors : area(1,0) |
| 15 | +initialvalue : -1 |
| 16 | + |
| 17 | + |
| 18 | +localtransition : sir-hoya-rule |
| 19 | + |
| 20 | +statevariables: population virulence connection movement i_sus i_infec i_rec |
| 21 | +statevalues: 100 0.6 1.0 0.5 1.0 0.0 0.0 |
| 22 | +initialvariablesvalue: SIR_Hoya.var |
| 23 | + |
| 24 | +neighborports : initial infec rec pop sus |
| 25 | + |
| 26 | +[sir-hoya-rule] |
| 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 + $virulence*(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 | + |
| 42 | + |
| 43 | + |
0 commit comments