Batches
Overview Structs
Overview Functions
Base.append!Base.mergeGEMS.GEMS_versionGEMS.allocationsGEMS.attack_rateGEMS.cpu_dataGEMS.cumulative_casesGEMS.cumulative_disease_progressionsGEMS.cumulative_quarantinesGEMS.dark_figureGEMS.dataframesGEMS.effectiveRGEMS.execution_dateGEMS.exportJLDGEMS.free_mem_sizeGEMS.generation_timesGEMS.git_branchGEMS.git_commitGEMS.git_repoGEMS.idGEMS.import_batchdataGEMS.infoGEMS.julia_versionGEMS.kernelGEMS.median_runGEMS.meta_dataGEMS.number_of_runsGEMS.process!GEMS.runsGEMS.runtimeGEMS.seedGEMS.sim_dataGEMS.simconfigsGEMS.system_dataGEMS.testsGEMS.threadsGEMS.tick_casesGEMS.total_infectionsGEMS.total_mem_sizeGEMS.total_quarantinesGEMS.total_testsGEMS.word_size
Batch
Constructors
GEMS.Batch — Type
BatchA container for running and analyzing multiple simulations. Stores simulation configurations that are executed sequentially by process!.
Functions
Missing docstring for add!(::NamedTuple, ::Batch). Check Documenter's build log for details.
Base.append! — Method
Base.append!(batch1::Batch, batch2::Batch)Append all simulation configs and setups from batch2 to batch1.
Base.merge — Method
merge(batches::Batch...)
merge(batches::Vector{Batch})Generates a new Batch that contains all simulation configs of the input Batches.
GEMS.process! — Method
process!(batch::Batch; keep_rundata=true, rd_style="LightRD", median_by=nothing, group_by=nothing, seed=nothing, customlogger=nothing, on_run=nothing)Processes all simulation configurations in batch sequentially, accumulating results into a BatchProcessor.
Keyword Arguments
keep_rundata: iftrue, every run'sResultDatais stored inbp.rundata. Default:true.rd_style: theResultDatastyle for individual and median runs. Default:"LightRD".median_by: a functionpp::PostProcessor -> scalarfor selecting the median run. The simulation with criterion closest to the median across all runs is re-run and stored. For multi-group batches one median run per group is computed. Default:nothinggroup_by: aSymbolnaming a field in each simulation configNamedTupleto use as the grouping key. Whennothing(default), no per-group tracking is performed. Pass e.g.group_by = :labelto group by the:labelfield.seed: seed for reproducibility. Passing the same value produces the same results. Ifnothing, a random seed is generated. Retrieve the used seed viaseed(bp).customlogger: aCustomLoggerto attach to each simulation. An independent copy is created per run so data is not mixed across runs. Default:nothing.on_run: a callback(rd::ResultData, i::Integer) -> ...invoked as each run finishes, receiving that run'sResultData. Lets callers consume runs in a streaming fashion without retaining them all. Default:nothing.
GEMS.simconfigs — Method
simconfigs(batch::Batch)Returns the vector of simulation configuration NamedTuples in this Batch.
BatchProcessor
Constructors
Functions
Missing docstring for attack_rate(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for cumulative_cases(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for cumulative_disease_progressions(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for cumulative_quarantines(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for dark_figure(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for effectiveR(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for generation_times(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for n_runs(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for median_run(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for r0(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for rundata(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for seed(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for tests(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for tick_cases(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for tick_unit(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for total_infections(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for total_quarantines(::BatchProcessor). Check Documenter's build log for details.
Missing docstring for total_tests(::BatchProcessor). Check Documenter's build log for details.
Several functions available on BatchProcessor in earlier versions (config_files, pathogens, settingdata, population_pyramid, setting_age_contacts, strategies, etc.) are no longer available because BatchProcessor no longer stores individual ResultData objects by default.
Alternatives:
- Configuration metadata (config files, pathogens, strategies, …): use
simconfigs(batch)— the simulation keyword arguments are stored in theBatchobject. - Post-simulation per-run data (setting data, population pyramid, …): process with
keep_rundata = trueand access viarundata(bp).
BatchData
Constructors
GEMS.BatchData — Type
BatchData <: AbstractResultDataA struct that stores all processed data of a batch of simulation runs. It holds four internal dictionaries with meta-, simulation-, system- and data as well as multiple DataFrames that are the BatchProcessor outcomes. Note that some information (i.e., execution date or GEMS version) is only read out upon generation of this BatchData object. Thus, there can be inconsistencies if the BatchData object is not generated right after simulation execution.
Functions
GEMS.allocations — Method
allocations(bd::BatchData)Returns allocation data of the simulation runs in this batch. (Note: This data is only available if the simulation runs were done via the main() function)
GEMS.attack_rate — Method
attack_rate(bd::BatchData)Returns aggregated values for the attack_rate accross the simulation runs in this batch. It returns mean, standard deviation, range, and confidence intervals.
GEMS.cpu_data — Method
cpu_data(bd::BatchData)Returns the processor information (not available for ARM Macs)
GEMS.cumulative_cases — Method
cumulative_cases(bd::BatchData)Returns aggregated cumulative case counts per tick across simulation runs. Returns a Dict{String, DataFrame} keyed by column name (e.g. exposed_cum, recovered_cum, deaths_cum).
GEMS.cumulative_disease_progressions — Method
cumulative_disease_progressions(bd::BatchData)Returns aggregated values for cumulativediseaseprogressions per tick accross the simulation runs in this batch. It returns mean, standard deviation, range, and confidence intervals.
GEMS.cumulative_quarantines — Method
cumulative_quarantines(bd::BatchData)Returns aggregated values cumulative_quarantines per tick accross the simulation runs in this batch. It returns mean, standard deviation, range, and confidence intervals.
GEMS.dark_figure — Method
dark_figure(bd::BatchData)Returns aggregated dark figure fractions per tick across simulation runs as a DataFrame. Columns: tick, minimum, maximum, mean, std, lower_95, upper_95.
GEMS.dataframes — Method
dataframes(batchData)Returns the dataframes dict of the batch data object.
GEMS.effectiveR — Method
effectiveR(bd::BatchData)Returns aggregated values for the effective R value for each tick accross the simulation runs in this batch. It returns mean, standard deviation, range, and confidence intervals.
GEMS.execution_date — Method
execution_date(bd::BatchData)Returns the timestamp of batch data generation.
GEMS.exportJLD — Method
exportJLD(batchData, directory)Exports the BatchData object as a JLD2 file, storing it in the specified directory.
GEMS.free_mem_size — Method
free_mem_size(bd::BatchData)Returns the available system memory
GEMS.generation_times — Method
generation_times(bd::BatchData)Returns aggregated mean generation times per tick across simulation runs as a DataFrame. Columns: tick, minimum, maximum, mean, std, lower_95, upper_95.
GEMS.GEMS_version — Method
GEMS_version(bd::BatchData)Returns the GEMS version this BatchData object was generated with.
GEMS.git_branch — Method
git_branch(bd::BatchData)Returns the current git branch.
GEMS.git_commit — Method
git_commit(bd::BatchData)Returns the current git commit.
GEMS.git_repo — Method
git_repo(bd::BatchData)Returns the current git repository.
GEMS.id — Method
id(bd::BatchData)Returns the stringified SHA1 hash that serves as a unique identifier.
GEMS.import_batchdata — Method
import_batchdata(filepath::AbstractString)Import the BatchData object from a jld2 file. Returns the BatchData object.
GEMS.info — Method
info(bd::BatchData)Prints info about available fields in the BatchData object.
GEMS.julia_version — Method
julia_version(bd::BatchData)Returns the Julia version that was used to generate this result data object.
GEMS.kernel — Method
kernel(bd::BatchData)Returns the system kernel information
Missing docstring for merge(::BatchData...; ::String). Check Documenter's build log for details.
GEMS.meta_data — Method
meta_data(bd::BatchData)Returns the metadata dict of the batch data object.
GEMS.number_of_runs — Method
number_of_runs(bd::BatchData)Returns the number of runs in this batch.
Missing docstring for per_label(::BatchData). Check Documenter's build log for details.
GEMS.median_run — Method
median_run(bd::BatchData)Returns the ResultData of the simulation whose criterion is the median across all runs, or nothing if median_by was not set.
GEMS.runs — Method
runs(bd::BatchData)Returns the ResultData objects of each of the runs in the the batch data object.
GEMS.runtime — Method
runtime(bd::BatchData)Returns runtime data of the simulation runs in this batch. (Note: This data is only available if the simulation runs were done via the main() function)
GEMS.seed — Method
seed(bd::BatchData)Returns the master seed used to derive per-simulation seeds for this batch, or 0 if the batch was processed without explicit seeding.
GEMS.sim_data — Method
sim_data(bd::BatchData)Returns the simdata dict of the batch data object.
GEMS.system_data — Method
system_data(bd::BatchData)Returns the systemdata dict of the batch data object.
GEMS.tests — Method
tests(bd::BatchData)Returns aggregated values for tests per tick accross the simulation runs in this batch. It returns mean, standard deviation, range, and confidence intervals.
GEMS.tick_cases — Method
tick_cases(bd::BatchData)Returns aggregated values for newly exposed inviduals per tick accross the simulation runs in this batch. It returns mean, standard deviation, range, and confidence intervals.
GEMS.threads — Method
threads(bd::BatchData)Returns the number of threads this Julia instance was started with
GEMS.total_infections — Method
total_infections(bd::BatchData)Returns aggregated values for total_infections accross the simulation runs in this batch. It returns mean, standard deviation, range, and confidence intervals.
GEMS.total_mem_size — Method
total_mem_size(bd::BatchData)Returns the total system memory
GEMS.total_quarantines — Method
total_quarantines(batchData)Returns aggregated values for total_quarantines accross the simulation runs in this batch. It returns mean, standard deviation, range, and confidence intervals.
GEMS.total_tests — Method
total_tests(bd::BatchData)Returns aggregated values for total_tests accross the simulation runs in this batch. It returns mean, standard deviation, range, and confidence intervals.
GEMS.word_size — Method
word_size(bd::BatchData)Returns the system word size
BatchDataStyle
GEMS.DefaultBatchData — Type
DefaultBatchData <: BatchDataStyleThe default style for BatchData objects. It contains all that can currently be calculated from a BatchProcessor.
Fields
data::Dict{String, Any}meta_data::Dict{String, Any}execution_date::String: Time this BatchData object was generatedGEMS_version::VersionNumber: GEMS version this BatchData object was generated with
system_data::Dict{String, Any}kernel::String: System kerneljulia_version::String: Julia version that was used to generate this data objectword_size::Int64: System word sizethreads::Int64: Number of threads this Julia instance was started withcpu_data::Markdown.MD: Information on the processor (not available for ARM Macs)total_mem_size::Float64: Total system memoryfree_mem_size::Float64: Available system memorygit_repo::SubString{String}: Current Git repositorygit_branch::SubString{String}: Current Git branchgit_commit::SubString{String}: Current Git commit ID
sim_data::Dict{String, Any}runs::Union{Nothing, Vector{ResultData}}: Individual ResultData objects, ornothingifkeep_rundatawasfalseduring the batch runmedian_run::Union{Nothing, ResultData}: The run whose criterion is closest to the median across all runs, ornothingifmedian_bywas not setnumber_of_runs::Int64: Number of simulation runstotal_infections::Dict{Int8, Dict{String, Real}}: Per-pathogen summary statistics on total infections across simulation runsattack_rate::Dict{Int8, Dict{String, Real}}: Per-pathogen summary statistics on attack rates across simulation runsr0::Dict{Int8, Dict{String, Real}}: Per-pathogen summary statistics on the basic reproduction number (R0)total_quarantines::Dict{String, Real}: Summary statistics on total quarantines across simulation runstotal_tests::Dict{String, Dict{String, Real}}: Summary statistics on total tests per TestType
dataframes::Dict{String, Any}tick_cases::DataFrame: Aggregated data on infections per tick across simulation runseffectiveR::DataFrame: Aggregated data on the effective reproduction number per tick across simulation runstests::Dict{String, Dict{String, DataFrame}}: Aggregated data on tests per tick across simulation runscumulative_quarantines::DataFrame: Aggregated data on cumulative quarantines per tick across simulation runscumulative_disease_progressions::Dict{String, DataFrame}: Aggregated data on cumulative disease progressions per tick across simulation runs