API#
This section contains the API reference for BAM Engine.
Core Classes#
Main classes for running simulations and collecting results.
Main simulation facade for BAM Engine. |
|
Container for simulation results with convenient data access methods. |
|
|
Immutable bundle of extension components. |
ECS Base Classes#
Base classes for creating custom components in the ECS architecture.
Base class for all roles (components) in the BAM-ECS architecture. |
|
Base class for all events (systems) in the BAM-ECS architecture. |
|
Base class for defining relationships between roles. |
Agent Roles#
Built-in role components for the three agent types. See Roles for all available roles.
Relationships#
Built-in relationship types for agent connections. See Relationships for details.
Core Infrastructure#
Pipeline, economy state, and agent management infrastructure.
Agent identity types (Agent, AgentType) are defined in bamengine.core.agent.
Decorators#
Simplified syntax for defining custom components.
Decorator to define a Role with automatic inheritance and dataclass. |
|
Decorator to define an Event with automatic inheritance and dataclass. |
|
Decorator to define a Relationship with automatic inheritance and registration. |
Registry Functions#
Functions for retrieving and listing registered components.
Retrieve a role class from the registry by name. |
|
Retrieve an event class from the registry by name. |
|
Retrieve a relationship class from the registry by name. |
|
Return sorted list of all registered role names. |
|
Return sorted list of all registered event names. |
|
Return sorted list of all registered relationship names. |
Operations Module#
NumPy-free operations for writing custom events. See bamengine.ops for the full module documentation.
Arithmetic: add, subtract, multiply, divide
Assignment: assign
Comparisons: equal, not_equal, less, less_equal, greater, greater_equal
Logical: logical_and, logical_or, logical_not
Conditional: where
Element-wise: maximum, minimum, clip
Aggregation: sum, mean, std, min, max, any, all
Array creation: zeros, ones, full, empty, arange
Mathematical: log, exp
Utilities: unique, bincount, isin, argsort, sort
Random: uniform
Type System#
Type aliases for defining custom roles without NumPy knowledge. See Type System for details.
Float, Int, Bool, AgentId, Rng
Configuration#
Configuration and validation classes.
Immutable configuration for BAM simulation parameters. |
Utilities#
Helper functions and utilities.
Create a new random number generator. |