Skip to content

Commit

Permalink
Updating readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Feb 3, 2024
1 parent 5804778 commit c643039
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ int main()
// with 100,000 individuals, in this case
hello.agents_smallworld(100000, 4L, false, .01);

// Setting the number of days (100) and seed (122)
hello.init(100, 122);

// Running the model and printing the results
hello.run();
// Setting the number of days (100) and seed (122)
hello.run(100, 122);
hello.print();

return 0;
Expand All @@ -64,36 +62,41 @@ int main()
Compiling (with `make helloworld.o`) and running the problem yields the following result:

```bash
Running the model...
_________________________________________________________________________
Running the model...
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| done.

done.
________________________________________________________________________________
________________________________________________________________________________
SIMULATION STUDY

Name of the model : Susceptible-Infected-Recovered (SIR)
Population size : 100000
Number of entitites : 0
Agents' data : (none)
Number of entities : 0
Days (duration) : 100 (of 100)
Number of variants : 1
Last run elapsed t : 211.00ms
Last run speed : 47.28 million agents x day / second
Number of viruses : 1
Last run elapsed t : 103.00ms
Last run speed : 96.34 million agents x day / second
Rewiring : off
Global events:
(none)
Virus(es):
- COVID-19 (baseline prevalence: 1.00%)
Tool(s):
(none)
Model parameters:
- Infectiousness : 0.9000
- Prob. of Recovery : 0.3000
- Recovery rate : 0.3000
- Transmission rate : 0.9000
Distribution of the population at time 100:
- (0) Susceptible : 99000 -> 2565
- (1) Infected : 1000 -> 366
- (2) Recovered : 0 -> 97069
- (0) Susceptible : 99000 -> 2565
- (1) Infected : 1000 -> 366
- (2) Recovered : 0 -> 97069
Transition Probabilities:
- Susceptible 0.96 0.04 0.00
Expand Down
15 changes: 6 additions & 9 deletions readme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ int main()
// - Infected: Status 1
// - Recovered: Status 2
Model<> model;
model.add_status("Susceptible", default_update_susceptible<>);
model.add_status("Infected", default_update_exposed<>);
model.add_status("Recovered");
model.add_state("Susceptible", default_update_susceptible<>);
model.add_state("Infected", default_update_exposed<>);
model.add_state("Recovered");

// Desgining a virus: This virus will:
// - Have a 90% transmission rate
Expand All @@ -25,18 +25,15 @@ int main()
virus.set_prob_infecting(.90);
virus.set_prob_recovery(.30);

virus.set_status(1, 2);
virus.set_state(1, 2);

model.default_add_virus<TSeq>n(virus, 1000);
model.add_virus_n(virus, 1000);

// Generating a random pop from a smallworld network
model.agents_smallworld(100000, 4L, false, .01);

// Initializing setting days and seed
model.init(100, 122);

// Running the model
model.run();
model.run(100, 122);
model.print();

}

0 comments on commit c643039

Please sign in to comment.