babylon.models.components.spatial
SpatialComponent - Location and mobility of an entity.
SpatialComponent represents the spatial position and movement capability of an entity in the Babylon simulation. It tracks the geographic or topological location and the ability to relocate.
This component enables modeling of migration, geographic constraints, and spatial relationships in the world system.
Classes
|
Location and mobility of an entity. |
- class babylon.models.components.spatial.SpatialComponent(**data)[source]
Bases:
BaseModelLocation and mobility of an entity.
Tracks the spatial state of an entity: - Geographic/topological location identifier (string) - Ability to relocate (Probability)
All numeric values use constrained types for automatic validation: - mobility: Probability [0, 1]
This component is immutable (frozen) to ensure state integrity.
- location_id
Geographic or topological location identifier (default: “”)
- mobility
Ability to relocate [0=immobile, 1=fully mobile] (default: 0.5)
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].