Description Details Public fields Active bindings Methods See Also
Wrapper class for the parameters
C struct (params.h).
For a detailed explanation of the available parameters (including sources and references), please read the Online Documentation.
household_df
Household Data Frame.
c_params
the C param sR pointer object (SWIG wrapped)
new()
Parameters$new( input_param_file = NA_character_, param_line_number = 1, output_file_dir = "./", input_households = NA_character_, hospital_input_param_file = NA_character_, hospital_param_line_number = NA_integer_, read_param_file = TRUE, read_hospital_param_file = FALSE )
input_param_file
Input parameters CSV file path.
Optional, default:
system.file("default_params", "baseline_parameters.csv", package = "OpenABMCovid19")
param_line_number
Which column of the input param file to read.
output_file_dir
Where to write output files to.
input_households
Household demographics file.
Optional, default:
system.file("default_params", "baseline_household_demographics.csv", package = "OpenABMCovid19")
hospital_input_param_file
Hospital input parameters CSV file path.
Optional, default:
system.file("default_params", "hospital_baseline_parameters.csv", package = "OpenABMCovid19")
hospital_param_line_number
Which column of the hospital input param file to read.
read_param_file
A boolean. If TRUE
, read
input_param_file
. If FALSE
, ignore
input_param_file
.
read_hospital_param_file
A boolean. If TRUE
, read
hospital_input_param_file
. If FALSE
, ignore
hospital_input_param_file
.
get_param()
Get a C parameter by name.
Parameters$get_param(param)
param
A string representing the C parameter's name
set_param()
Set a C parameter by name.
Parameters$set_param(param, value)
param
A string representing the C parameter's name
value
The new value for the C parameter.
set_param_list()
Set C parameters from a list.
Parameters$set_param_list(params)
params
A named list with the name being the parameter
set_demographic_household_table()
Set the demographic_household_table
C struct (defined in
demographics.h). This function initializes the
self$c_params$demo_house
member.
Parameters$set_demographic_household_table(df_demo_house)
df_demo_house
A data-frame representation of the
demographic_household_table
C struct. The data-frame must contain
column names c("ID", "age_group", "house_no")
and the number of
rows must be equal to self$c_params$n_total
.
TRUE
on success, FALSE
on error.
set_occupation_network_table()
Set the demographic_occupation_network_table
C struct (defined in
demographics.h). This function initializes the
self$c_params$occupation_network_table
member.
Parameters$set_occupation_network_table( df_occupation_networks, df_occupation_network_properties )
df_occupation_networks
TODO(olegat)
df_occupation_network_properties
TODO(olegat)
return_param_object()
Run a check on the parameters and return if the C code doesn't bail. This function locks the parameter value (i.e. make this class read-only))
Parameters$return_param_object()
self$c_params
the C params R pointer object check the C params still exists
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.