Skip to content

Commit bb39d56

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents b6afe87 + 1029128 commit bb39d56

File tree

15 files changed

+77
-80
lines changed

15 files changed

+77
-80
lines changed

carleton/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Disease Spread Model in Carleton Campus
2+
3+
This is a simple SIR model for spread disease in Carleton.
4+
5+
## Parameters:
6+
7+
**Neighborhood:** Von Neumann
8+
**Delay:** Transport
9+
**Death Rate:** 0.01
10+
**Transmission Rate:** 0.4
11+
12+
# How to run the model:
13+
In a BASH terminal, simply run the main shell script:
14+
```shell
15+
> ./run_carleton.sh
16+
```
17+
The main output log file of the simulation will be stored in the `carleton.log` file. You can use this file, together with `carleton.ma`, `carleton.val`, and `covid.pal` for visualizing the outcome of your simulation in the [CD++ Cell DEVS Web Viewer](https://omarhesham.com/arslab/webviewer/).
18+
File renamed without changes.

carleton/carleton.ma

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#include(VN.inc)
2+
[top]
3+
components : campus
4+
5+
[campus]
6+
type : cell
7+
dim : (59,100)
8+
delay : transport
9+
defaultDelayTime : 1000
10+
border : nonwrapped
11+
12+
neighbors : campus(-1,0)
13+
neighbors : campus(0,-1) campus(0,0) campus(0,1)
14+
neighbors : campus(1,0)
15+
16+
initialValue : 0
17+
initialCellsValue : carleton.val
18+
localtransition : rules
19+
20+
[rules]
21+
22+
rule : {if( #macro(gotInfected), #macro(infected), (0,0))} 1
23+
{ (0,0)=0 and #macro(anyNeighborIsInfected)}
24+
25+
rule : { #macro(sick) } 7 { #macro(imAsymp) }
26+
27+
rule : {if( #macro(died), #macro(dead), (0,0)+1)} 1
28+
{#macro(imInfected)}
29+
30+
rule : {(0,0)} 1000 { t }

model/carleton/sustain.val renamed to carleton/carleton.val

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
(40, 18) = 1
2+
(40, 47) = 1
3+
(10, 60) = 1
4+
15
(41, 19) = -10
26
(42, 19) = -10
37
(43, 19) = -10
File renamed without changes.

carleton/run_carleton.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!bin/bash
2+
mkdir results
3+
../cd++ -m"carleton.ma" -l"results/carleton.log"
4+
cp results/carleton.log01 ./carleton.log
5+
rm -r results
6+

cd++

100644100755
File mode changed.

clean_covid.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

covid.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

covid_store/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ This is a simple SIR model for spread disease inside a store.
99
** Death Rate: ** 0.01
1010
** Transmission Rate: ** 0.4
1111

12-
## How to run the model:
12+
# How to run the model:
13+
In a BASH terminal, simply run the main shell script:
14+
```shell
15+
> ./run_covid_store.sh
16+
```
17+
The main output log file of the simulation will be stored in the `covid_store.log` file. You can use this file, together with `covid_store.ma`, `covid_store.val`, and `covid.pal` for visualizing the outcome of your simulation in the [CD++ Cell DEVS Web Viewer](https://omarhesham.com/arslab/webviewer/).
1318

14-
If it does not already exists, create a folder in this level named *results*, type in the linux terminal:
15-
> mkdir results
16-
17-
Type in the linux terminal:
18-
> ./../cd++ -mcovid_store.ma -lresults/covid_store.log

0 commit comments

Comments
 (0)