sierra.plugins.engine.argos.variables.physics_engines#
Classes mapping an extent to a set of non-overlapping ARGoS physics engines.
Extent does not have to be the whole arena. 2D and 3D engines.
Classes#
Defines 2D/3D physics engines within ARGoS and how they are laid out. |
|
Specialization of |
|
Specialization of |
Module Contents#
- class sierra.plugins.engine.argos.variables.physics_engines.PhysicsEngines(engine_type: str, n_engines: int, iter_per_tick: int, layout: str, extents: list[sierra.core.utils.ArenaExtent])[source]#

Defines 2D/3D physics engines within ARGoS and how they are laid out.
- engine_type#
The type of physics engine to use (one supported by ARGoS).
- n_engines#
# of engines. Can be one of [1,4,8,16,24].
- iter_per_tick#
# of iterations physics engines should perform per tick. layout: Engine arrangement method. Can be one of:
uniform_grid2D: Arrange the engines in a uniform 2D grid that extends up to the maximum height in Z. For 2D engines, this is the maximum height of objects that can be present in the arena (I think).
- extents#
List of (X,Y,Zs) tuple of dimensions of area to assign to engines of the specified type.
- gen_attr_changelist() list[sierra.core.experiment.definition.AttrChangeSet][source]#
No effect.
All tags/attributes are either deleted or added.
- gen_element_addlist() list[sierra.core.experiment.definition.ElementAddList][source]#
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[source]#
Generate files to add to the batch experiment definition.
Presumably, the created files will be referenced in the
--expdef-templatefile by path.
- gen_single_engine(engine_id: int, extent: sierra.core.utils.ArenaExtent, n_engines_x: int, n_engines_y: int, forward_engines: list[int]) sierra.core.experiment.definition.ElementAddList[source]#
Generate definitions for a specific 2D/3D engine.
Volume is NOT divided equally among engines, but rather each of the engines is extended up to some maximum height in Z, forming a set of "silos".
- Parameters:
engine_id -- Numerical UUID for the engine.
extent -- The mapped extent for ALL physics engines.
n_engines_x -- # engines in the x direction.
n_engines_y -- # engines in the y direction.
forward_engines -- IDs of engines that are placed in increasing order in X when layed out L->R.
- gen_tag_rmlist() list[sierra.core.experiment.definition.ElementRmList][source]#
Remove the
<physics_engines>tag if it exists may be desirable.Obviously you must call this function BEFORE adding new definitions.
- class sierra.plugins.engine.argos.variables.physics_engines.PhysicsEngines2D(engine_type: str, n_engines: int, spatial_hash_info: dict[str, Any] | None, iter_per_tick: int, layout: str, extents: list[sierra.core.utils.ArenaExtent])[source]#

Specialization of
PhysicsEnginesfor 2D.- gen_attr_changelist() list[sierra.core.experiment.definition.AttrChangeSet]#
No effect.
All tags/attributes are either deleted or added.
- 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_single_engine(engine_id: int, extent: sierra.core.utils.ArenaExtent, n_engines_x: int, n_engines_y: int, forward_engines: list[int]) sierra.core.experiment.definition.ElementAddList[source]#
Generate definitions for a specific 2D/3D engine.
Volume is NOT divided equally among engines, but rather each of the engines is extended up to some maximum height in Z, forming a set of "silos".
- Parameters:
engine_id -- Numerical UUID for the engine.
extent -- The mapped extent for ALL physics engines.
n_engines_x -- # engines in the x direction.
n_engines_y -- # engines in the y direction.
forward_engines -- IDs of engines that are placed in increasing order in X when layed out L->R.
- gen_tag_rmlist() list[sierra.core.experiment.definition.ElementRmList]#
Remove the
<physics_engines>tag if it exists may be desirable.Obviously you must call this function BEFORE adding new definitions.
- class sierra.plugins.engine.argos.variables.physics_engines.PhysicsEngines3D(engine_type: str, n_engines: int, iter_per_tick: int, layout: str, extents: list[sierra.core.utils.ArenaExtent])[source]#

Specialization of
PhysicsEnginesfor 3D.- gen_attr_changelist() list[sierra.core.experiment.definition.AttrChangeSet]#
No effect.
All tags/attributes are either deleted or added.
- 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_single_engine(engine_id: int, extent: sierra.core.utils.ArenaExtent, n_engines_x: int, n_engines_y: int, forward_engines: list[int]) sierra.core.experiment.definition.ElementAddList#
Generate definitions for a specific 2D/3D engine.
Volume is NOT divided equally among engines, but rather each of the engines is extended up to some maximum height in Z, forming a set of "silos".
- Parameters:
engine_id -- Numerical UUID for the engine.
extent -- The mapped extent for ALL physics engines.
n_engines_x -- # engines in the x direction.
n_engines_y -- # engines in the y direction.
forward_engines -- IDs of engines that are placed in increasing order in X when layed out L->R.
- gen_tag_rmlist() list[sierra.core.experiment.definition.ElementRmList]#
Remove the
<physics_engines>tag if it exists may be desirable.Obviously you must call this function BEFORE adding new definitions.