resplab / epicR

R package for the Evaluation Platform in COPD (EPIC), an agent-based whole-disease model for projection of health and economic outcomes and COPD interventions.
11 stars 11 forks source link

Number of base agents #128

Open rachaelmountain opened 2 years ago

rachaelmountain commented 2 years ago

epic adds 1 to whatever you give as the starting number in settings$n_base_agents

aminadibi commented 2 years ago

@rachaelmountain can you please share a reproducible example demonstrating this issue?

rachaelmountain commented 2 years ago
settings <- get_default_settings()
settings$n_base_agents <- 1000
init_session(settings=settings)
input <- Cget_inputs()
input$values$global_parameters$time_horizon <- 5
run(input=input$values)
output_ex <- Cget_output_ex()
terminate_session()
rowSums(output_ex$n_alive_by_ctime_sex)

I'm assuming n_alive_by_ctime reports the number alive at the start of each year?