babylon.models.entities.organization
Organization entity models for the Babylon simulation (Feature 031).
Defines the Organization base class and four frozen Pydantic subtypes: StateApparatus, Business, PoliticalFaction, CivilSocietyOrg. Also defines IntelMethodology (supporting model) and KeyFigure (separate graph node).
The OrganizationType discriminated union dispatches on org_type
for automatic subtype selection during deserialization.
Module Attributes
Discriminated union dispatching on |
Classes
|
Business organization (Feature 031). |
|
Civil society organization (Feature 031). |
|
Intelligence methodology capabilities (Sparrow-grounded). |
|
Individual node within organizational topology (Feature 031). |
|
Base organization entity for the Babylon simulation. |
|
Political faction organization (Feature 031). |
|
State apparatus organization (Feature 031). |
- class babylon.models.entities.organization.IntelMethodology(**data)[source]
Bases:
BaseModelIntelligence methodology capabilities (Sparrow-grounded).
Defines which social network analysis techniques an intelligence agency can employ and the maximum fraction of true topology observable.
- Parameters:
- centrality_analysis
Can identify hub nodes and bridges.
- equivalence_analysis
Can find structurally equivalent positions.
- template_matching
Can match against known org templates.
- temporal_analysis
Can detect activation pattern changes over time.
- observation_ceiling
Max fraction of true topology observable [0, 1].
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- centrality_analysis: bool
- equivalence_analysis: bool
- template_matching: bool
- temporal_analysis: bool
- observation_ceiling: Probability
- classmethod local_pd(defines=None)[source]
Local PD preset: centrality only, low ceiling.
- Parameters:
defines (
OrganizationDefines|None) – Optional OrganizationDefines for tunable ceiling value.- Return type:
- classmethod fusion_center(defines=None)[source]
Fusion Center preset: centrality + temporal, medium ceiling.
- Parameters:
defines (
OrganizationDefines|None) – Optional OrganizationDefines for tunable ceiling value.- Return type:
- classmethod fbi(defines=None)[source]
FBI preset: all capabilities, FBI-level ceiling.
- Parameters:
defines (
OrganizationDefines|None) – Optional OrganizationDefines for tunable ceiling value.- Return type:
- class babylon.models.entities.organization.Organization(**data)[source]
Bases:
BaseModelBase organization entity for the Babylon simulation.
All four subtypes (StateApparatus, Business, PoliticalFaction, CivilSocietyOrg) inherit these 15 fields. Frozen and immutable.
- Parameters:
org_type (OrgType)
class_character (ClassCharacter)
cohesion (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
cadre_level (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
budget (Annotated[float, Ge(ge=0.0), AfterValidator(func=~babylon.utils.math.quantize)])
legal_standing (LegalStanding)
consciousness_tendency (ConsciousnessTendency)
headquarters_id (str | None)
heat (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
is_institution (bool)
institutional_persistence (Annotated[float | None, Ge(ge=0.0), Le(le=1.0)])
- id
Unique organization identifier.
- name
Human-readable name.
- org_type
Discriminator for subtype dispatch.
- class_character
Which class this org serves.
- cohesion
Internal unity and coordination [0, 1].
- cadre_level
Leadership quality [0, 1].
- budget
Available resources [0, inf).
- legal_standing
Legal status of the organization.
- consciousness_tendency
Ideological tendency pushed on communities.
- territory_ids
Territories where org operates.
- headquarters_id
Primary location (must be in territory_ids).
- heat
State attention level [0, 1].
- is_institution
Has crystallized into institution.
- institutional_persistence
Resistance to dissolution (institutions only).
- member_node_ids
Individual key figures and cadre.
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- id: str
- name: str
- org_type: OrgType
- class_character: ClassCharacter
- cohesion: Probability
- cadre_level: Probability
- budget: Currency
- legal_standing: LegalStanding
- consciousness_tendency: ConsciousnessTendency
- territory_ids: list[str]
- headquarters_id: str | None
- heat: Probability
- is_institution: bool
- institutional_persistence: float | None
- member_node_ids: list[str]
- class babylon.models.entities.organization.StateApparatus(**data)[source]
Bases:
OrganizationState apparatus organization (Feature 031).
Wields state violence and surveillance. Default legal standing is SOVEREIGN.
- Parameters:
org_type (Literal[OrgType.STATE_APPARATUS])
class_character (ClassCharacter)
cohesion (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
cadre_level (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
budget (Annotated[float, Ge(ge=0.0), AfterValidator(func=~babylon.utils.math.quantize)])
legal_standing (LegalStanding)
consciousness_tendency (ConsciousnessTendency)
headquarters_id (str | None)
heat (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
is_institution (bool)
institutional_persistence (Annotated[float | None, Ge(ge=0.0), Le(le=1.0)])
jurisdiction (JurisdictionLevel)
violence_capacity (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
surveillance_capacity (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
intel_methodology (IntelMethodology)
factional_alignment (StateFaction)
- jurisdiction
Scope of authority.
- violence_capacity
Capacity for coercive force [0, 1].
- surveillance_capacity
Capacity for surveillance [0, 1].
- legal_authority
Specific authorities wielded.
- intel_methodology
Intelligence capabilities (Sparrow-grounded).
- org_type: Literal[OrgType.STATE_APPARATUS]
- legal_standing: LegalStanding
- jurisdiction: JurisdictionLevel
- violence_capacity: Probability
- surveillance_capacity: Probability
- legal_authority: list[str]
- intel_methodology: IntelMethodology
- factional_alignment: StateFaction
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- id: str
- name: str
- class_character: ClassCharacter
- cohesion: Probability
- cadre_level: Probability
- budget: Currency
- consciousness_tendency: ConsciousnessTendency
- territory_ids: list[str]
- headquarters_id: str | None
- heat: Probability
- is_institution: bool
- institutional_persistence: float | None
- member_node_ids: list[str]
- class babylon.models.entities.organization.Business(**data)[source]
Bases:
OrganizationBusiness organization (Feature 031).
Accumulates capital and employs labor.
- Parameters:
org_type (Literal[OrgType.BUSINESS])
class_character (ClassCharacter)
cohesion (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
cadre_level (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
budget (Annotated[float, Ge(ge=0.0), AfterValidator(func=~babylon.utils.math.quantize)])
legal_standing (LegalStanding)
consciousness_tendency (ConsciousnessTendency)
headquarters_id (str | None)
heat (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
is_institution (bool)
institutional_persistence (Annotated[float | None, Ge(ge=0.0), Le(le=1.0)])
naics_2digit (str | None)
surplus_extraction_rate (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
revenue (Annotated[float, Ge(ge=0.0), AfterValidator(func=~babylon.utils.math.quantize)])
constant_capital (Annotated[float, Ge(ge=0.0), AfterValidator(func=~babylon.utils.math.quantize)])
variable_capital (Annotated[float, Ge(ge=0.0), AfterValidator(func=~babylon.utils.math.quantize)])
surplus_value (Annotated[float, Ge(ge=0.0), AfterValidator(func=~babylon.utils.math.quantize)])
- sector
NAICS sector description.
- employment_count
Number of employees.
- surplus_extraction_rate
Rate of surplus value extraction [0, 1].
- revenue
Annual revenue [0, inf).
- org_type: Literal[OrgType.BUSINESS]
- sector: str
- naics_2digit: str | None
- employment_count: int
- surplus_extraction_rate: Coefficient
- revenue: Currency
- constant_capital: Currency
- variable_capital: Currency
- surplus_value: Currency
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- id: str
- name: str
- class_character: ClassCharacter
- cohesion: Probability
- cadre_level: Probability
- budget: Currency
- legal_standing: LegalStanding
- consciousness_tendency: ConsciousnessTendency
- territory_ids: list[str]
- headquarters_id: str | None
- heat: Probability
- is_institution: bool
- institutional_persistence: float | None
- member_node_ids: list[str]
- class babylon.models.entities.organization.PoliticalFaction(**data)[source]
Bases:
OrganizationPolitical faction organization (Feature 031).
Contests political power. The player’s faction is marked with
is_player.- Parameters:
org_type (Literal[OrgType.POLITICAL_FACTION])
class_character (ClassCharacter)
cohesion (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
cadre_level (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
budget (Annotated[float, Ge(ge=0.0), AfterValidator(func=~babylon.utils.math.quantize)])
legal_standing (LegalStanding)
consciousness_tendency (ConsciousnessTendency)
headquarters_id (str | None)
heat (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
is_institution (bool)
institutional_persistence (Annotated[float | None, Ge(ge=0.0), Le(le=1.0)])
is_player (bool)
relationship_to_player (str)
- ideology
Ideological label (e.g., “Marxism-Leninism”).
- is_player
Whether this is the player’s faction.
- relationship_to_player
Relationship state.
- org_type: Literal[OrgType.POLITICAL_FACTION]
- ideology: str
- is_player: bool
- relationship_to_player: str
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- id: str
- name: str
- class_character: ClassCharacter
- cohesion: Probability
- cadre_level: Probability
- budget: Currency
- legal_standing: LegalStanding
- consciousness_tendency: ConsciousnessTendency
- territory_ids: list[str]
- headquarters_id: str | None
- heat: Probability
- is_institution: bool
- institutional_persistence: float | None
- member_node_ids: list[str]
- class babylon.models.entities.organization.CivilSocietyOrg(**data)[source]
Bases:
OrganizationCivil society organization (Feature 031).
Non-state, non-business collective providing community services.
legitimacydoubles as the credibility factor in the consciousness effect formula.- Parameters:
org_type (Literal[OrgType.CIVIL_SOCIETY])
class_character (ClassCharacter)
cohesion (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
cadre_level (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
budget (Annotated[float, Ge(ge=0.0), AfterValidator(func=~babylon.utils.math.quantize)])
legal_standing (LegalStanding)
consciousness_tendency (ConsciousnessTendency)
headquarters_id (str | None)
heat (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
is_institution (bool)
institutional_persistence (Annotated[float | None, Ge(ge=0.0), Le(le=1.0)])
service_type (ServiceType)
legitimacy (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
- service_type
Domain of service provision.
- legitimacy
Community trust/credibility [0, 1].
- org_type: Literal[OrgType.CIVIL_SOCIETY]
- service_type: ServiceType
- legitimacy: Probability
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- id: str
- name: str
- class_character: ClassCharacter
- cohesion: Probability
- cadre_level: Probability
- budget: Currency
- legal_standing: LegalStanding
- consciousness_tendency: ConsciousnessTendency
- territory_ids: list[str]
- headquarters_id: str | None
- heat: Probability
- is_institution: bool
- institutional_persistence: float | None
- member_node_ids: list[str]
- babylon.models.entities.organization.OrganizationType
Discriminated union dispatching on
org_typeto the correct subtype.alias of
Annotated[StateApparatus|Business|PoliticalFaction|CivilSocietyOrg, FieldInfo(annotation=NoneType, required=True, discriminator=’org_type’)]
- class babylon.models.entities.organization.KeyFigure(**data)[source]
Bases:
BaseModelIndividual node within organizational topology (Feature 031).
Stored as a separate graph node (
_node_type="key_figure"). COMMAND edges connect KeyFigure nodes within the same organization.- Parameters:
structural_importance (Annotated[float, Ge(ge=0.0), Le(le=1.0), AfterValidator(func=~babylon.utils.math.quantize)])
is_singleton (bool)
- id
Unique key figure identifier.
- name
Name.
- organization_id
Parent organization.
- role
Position title/function.
- structural_importance
Topological criticality [0, 1].
- is_singleton
No structural equivalent (Sparrow).
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- id: str
- name: str
- organization_id: str
- role: str
- structural_importance: Probability
- is_singleton: bool