Skip to content

Commit

Permalink
Merge pull request #5 from SABS-R3-Epidemiology/full_functionality_k
Browse files Browse the repository at this point in the history
Fixed the toy population
  • Loading branch information
anitaapplegarth authored Jan 23, 2025
2 parents 4d3184b + 518427d commit cee0855
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions R/simulation.r
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

source("R/wrapper.R")
# Example usage:
run_complete_simulation <- function(output_dir,
output_file = "output.csv",
Expand All @@ -9,6 +9,15 @@ run_complete_simulation <- function(output_dir,
# Initialize environment
pe <- initialize_simulation_env()

# User defined variables - see README for instructions
input_dir <- ""
config_parameters <- "data/simple_parameters.json"
epigeopop_file <- ""
seed <- 42
output_dir <- "data/simulation_outputs"
simulation_duration <- 60
initial_infected <- 10

pe <- configure_parameters(pe, input_dir, config_parameters)

# Create all parameter sets
Expand Down Expand Up @@ -51,17 +60,7 @@ run_complete_simulation <- function(output_dir,
generation_time_output = TRUE
)

# User defined variables - see README for instructions
input_dir <- "./data/Andorra/inputs"
config_parameters <- ".data/Andorra/inputs/simple_parameters"
epigeopop_file <- "./data/Andorra/inputs/Andorra_microcells.csv"
seed <- 42
output_dir <- "./data/Andorra/simulation_outputs"
simulation_duration <- 60
initial_infected <- 10

# Run simulation
source(wrapper.R)
sim <- run_simulation(pe, sim_params, file_params, dem_file_params,
inf_history_params, pop_params,
epigeopop_file = epigeopop_file, seed,
Expand Down

0 comments on commit cee0855

Please sign in to comment.