Resource

Source:

Local role: Represents modeled resources with rivalry and transferability semantics.

Big-picture role: Constraint and capability component used by Action and related to Actor.

Inheritance:

Parameters and fields:

  • object_type: str = "resource"
  • resource attributes: kind, resource_mode, rivalry, transferability, divisibility, composite

Methods:

  • attribute properties with setters for each resource attribute
  • generated relation methods: add_user/remove_user, add_owner/remove_owner, add_dependency/remove_dependency, and related pairs
  • from_dict(...)

Example:

from ometeotl_core.model.resources import Resource

resource = Resource(id="fuel-1", kind="fuel")
resource.rivalry = "rival"
resource.transferability = "transferable"
resource.divisibility = "divisible"
resource.add_owner("actor-1")
resource.set_attribute("label", "Fuel Tank A")

data = resource.to_dict()

See also:

Ometeotl

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