sierra.plugins.engine.ros1robot.variables.population_size#
Classes for the population size batch criteria.
See Population Size for usage documentation.
Classes#
A univariate range of system sizes used to define batch experiments. |
Module Contents#
- class sierra.plugins.engine.ros1robot.variables.population_size.PopulationSize(cli_arg: str, main_config: sierra.core.types.YAMLDict, batch_input_root: pathlib.Path, robot: str, sizes: list[int])[source]#

A univariate range of system sizes used to define batch experiments.
This class is a base class which should (almost) never be used on its own. Instead, the
factory()function should be used to dynamically create derived classes expressing the user's desired size distribution.Note: Usage of this class assumes homogeneous systems.
- size_list#
List of integer system sizes defining the range of the variable for the batch experiment.
- 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][source]#
Generate XML modifications to set system sizes.
- 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.
- n_agents(exp_num: int) int[source]#
Return the # of agents used for a given Experiment.
- 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.