gabm.abm.attributes.health module
Health module for GABM.
- class gabm.abm.attributes.health.Health(health_id: HealthID, description: str)
Bases:
GABMAttributeFor representing health.
- Attributes:
id (HealthID): Unique identifier for the health. description (str): The description of the health.
- class gabm.abm.attributes.health.HealthID(health_id: int)
Bases:
GABMAttributeIDA unique identifier for a Health attribute.
- Attributes:
id (int): The unique identifier for the health attribute.
- BAD = HealthID(4)
- FAIR = HealthID(3)
- GOOD = HealthID(2)
- UNKNOWN = HealthID(0)
- VERY_BAD = HealthID(5)
- VERY_GOOD = HealthID(1)
- class gabm.abm.attributes.health.HealthMap
Bases:
GABMAttributeMapA mapping of HealthIds to Health.
By default, the map is initialized as follows:
h0 = HealthID(0) h1 = HealthID(1) h2 = HealthID(2) h3 = HealthID(3) h4 = HealthID(4) h5 = HealthID(5) items: Dict[HealthID, Health] = { h0: Health(h0, "unknown"), h1: Health(h1, "very good"), h2: Health(h2, "good"), h3: Health(h3, "fair"), h4: Health(h4, "bad"), h5: Health(h5, "very bad") } super().__init__(items)