sierra.core.variables.population_size#
Reusable classes related to the homogeneous populations of agents.
Classes#
Base class for changing the # agents/robots to reduce code duplication. |
Functions#
|
Generate the system sizes for each experiment in a batch. |
Module Contents#
- class sierra.core.variables.population_size.PopulationSize(*args, **kwargs)[source]#

Base class for changing the # agents/robots to reduce code duplication.
- arena_dims(cmdopts: sierra.core.types.Cmdopts) list[sierra.core.utils.ArenaExtent]#
Get the arena dimensions used for each experiment in the batch.
Not applicable to all criteria.
Must be implemented on a per-engine basis, as different engines have different means of computing the size of the arena.
- gen_attr_changelist() list[sierra.core.experiment.definition.AttrChangeSet]#
Generate expdef attributes to change in a batch experiment definition.
Modifications are sets, one per experiment in the batch, because the order you apply them doesn't matter.
- gen_element_addlist() list[sierra.core.experiment.definition.ElementAddList]#
Generate expdef elelemnts to add to the batch experiment definition.
Modifications are lists, one per experiment in the batch, because the order you apply them matters.
- gen_files() None#
Generate files to add to the batch experiment definition.
Presumably, the created files will be referenced in the
--expdef-templatefile by path.
- gen_tag_rmlist() list[sierra.core.experiment.definition.ElementRmList]#
Generate expdef tags to remove from the batch experiment definition.
Modifications are lists, one per experiment in the batch, because the order you apply them matters.
- graph_info(cmdopts: sierra.core.types.Cmdopts, batch_output_root: pathlib.Path | None = None, exp_names: list[str] | None = None) sierra.core.graphs.bcbridge.GraphInfo[source]#
Return graph info for base classes to use if they wish.
- populations(cmdopts: sierra.core.types.Cmdopts, exp_names: list[str] | None = None) list[int]#
Calculate system sizes used the batch experiment, sorted.
- Parameters:
cmdopts -- Dictionary of parsed command line options.
exp_names -- If is not None, then these directories will be used to calculate the system sizes, rather than the results of
gen_exp_names().
- scaffold_exps(batch_def: sierra.core.experiment.definition.BaseExpDef, cmdopts: sierra.core.types.Cmdopts) None#
Scaffold a batch experiment.
Takes the raw template input file and apply expdef modifications from the batch criteria for all experiments, and save the result in each experiment's input directory.