diff --git a/README.md b/README.md index c303f83e..eeb2f4bc 100644 --- a/README.md +++ b/README.md @@ -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; @@ -64,22 +62,27 @@ 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%) @@ -87,13 +90,13 @@ 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 diff --git a/readme.cpp b/readme.cpp index e02c5d09..4f05c939 100644 --- a/readme.cpp +++ b/readme.cpp @@ -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 @@ -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_virusn(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(); } \ No newline at end of file