GenericObject

Source:

Local role: First semantic layer above ModelObject.

Big-picture role: Shared convenience API inherited by Actor, Resource, and Space.

Inheritance:

Parameters and fields:

  • inherited base fields

Methods:

  • metadata properties: label, description, tags, profile
  • metadata mutators: add_tag, remove_tag, set_profile_item
  • space binding helpers: add_space_membership, remove_space_membership via SpaceObjectGraph

Example:

from ometeotl_core.model.objects import GenericObject

obj = GenericObject(id="landmark-1", object_type="generic")
obj.set_attribute("label", "City Center")
obj.set_attribute("description", "Main urban hub")
obj.add_tag("urban")
obj.add_tag("landmark")
obj.set_profile_item("population", 50_000)

print(obj.label)   # "City Center"
print(obj.tags)    # ["urban", "landmark"]

See also:

Ometeotl

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