SpaceRelationType

Source:

Local role: Metadata definition for one relation type.

Big-picture role: Rule descriptor consumed by SpaceRelation and SpaceRelationGraph.

Inheritance:

  • frozen dataclass

Parameters and fields:

  • name: str
  • is_symmetric: bool
  • is_antisymmetric: bool
  • is_transitive: bool
  • is_reflexive: bool

Methods:

  • no custom methods

Example:

from ometeotl_core.model.space_relations import SpaceRelationType

# Symmetric undirected relation (e.g. two adjacent zones)
adjacent = SpaceRelationType(
    name="adjacent",
    is_symmetric=True,
    is_antisymmetric=False,
    is_transitive=False,
    is_reflexive=False,
)

# Antisymmetric transitive containment relation
contains = SpaceRelationType(
    name="contains",
    is_symmetric=False,
    is_antisymmetric=True,
    is_transitive=True,
    is_reflexive=False,
)

See also:

Ometeotl

A Python library to build complex multi-agent simulations, wargames, and AI-driven strategies