| GenericManager | R Documentation |
R6 class to represent a generic (abstract) manager for
generating or processing simulation results, as well as optionally generating values
via generators.
poems::GenericClass -> GenericManager
attachedA list of dynamically attached attributes (name-value pairs).
sample_dataA data frame of sampled parameters for each simulation/result.
generatorsA list of generators (Generator or inherited class) objects for generating simulation model values.
parallel_coresNumber of cores for running the simulations in parallel.
results_dirResults directory path.
results_extResult file extension (default is .RData).
results_filename_attributesA vector of: prefix (optional); attribute names (from the sample data frame); postfix (optional); utilized to construct results filenames.
error_messagesA vector of error messages encountered.
warning_messagesA vector of warning messages encountered.
new()Initialization method sets any included attributes (sample_data, generators, parallel_cores, results_dir, results_filename_attributes) and attaches other attributes individually listed.
GenericManager$new(...)
...Parameters listed individually.
get_attribute()Returns a named manager or attached attribute.
GenericManager$get_attribute(param)
paramCharacter string name of the attribute.
Selected attribute value.
get_message_sample()Substitutes the specified sample details into a status message (using sprintf) and returns the result.
GenericManager$get_message_sample(status_message, sample_index)
status_messageCharacter string message with a placeholder for sample details.
sample_indexRow index of sample data frame containing details of substitution parameters.
Status message with substituted sample details.
get_results_filename()Constructs and returns the results filename based on the sample data frame index and results filename attributes.
GenericManager$get_results_filename(sample_index)
sample_indexRow index of sample data frame containing details of substitution parameters.
Results filename with substituted sample details.
clone()The objects of this class are cloneable with this method.
GenericManager$clone(deep = FALSE)
deepWhether to make a deep clone.
generic_manager <- GenericManager$new(
attr1 = 22:23,
results_filename_attributes = c("attr1", "example")
)
generic_manager$get_results_filename(1)
generic_manager$get_results_filename(2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.