agentsociety.cityagent.nbsagent

Module Contents

Classes

NBSAgentConfig

Configuration for NBSAgent.

NBSAgent

National Bureau of Statistics Agent simulating economic data collection and analysis.

Data

API

agentsociety.cityagent.nbsagent.__all__

[‘NBSAgent’]

class agentsociety.cityagent.nbsagent.NBSAgentConfig

Bases: agentsociety.agent.AgentParams

Configuration for NBSAgent.

time_diff: int

‘Field(…)’

num_labor_hours: int

‘Field(…)’

productivity_per_labor: float

‘Field(…)’

class agentsociety.cityagent.nbsagent.NBSAgent(id: int, name: str, toolbox: agentsociety.agent.AgentToolbox, memory: agentsociety.memory.Memory, agent_params: Optional[agentsociety.cityagent.nbsagent.NBSAgentConfig] = None, blocks: Optional[list[agentsociety.agent.block.Block]] = None)

Bases: agentsociety.agent.NBSAgentBase

National Bureau of Statistics Agent simulating economic data collection and analysis.

Inherits from InstitutionAgent to manage economic indicators and interactions with other agents in a simulated environment. Handles monthly economic metrics calculations including GDP, labor statistics, prices, and citizen welfare indicators.

Initialization

Initialize NBSAgent with dependencies and configuration.

  • Args:

    • name (str): The name or identifier of the agent.

    • toolbox (AgentToolbox): The toolbox of the agent.

    • memory (Memory): The memory of the agent.

  • Description:

    • Initializes the NBSAgent with the provided parameters and sets up necessary internal states.

ParamsType

None

description: str = <Multiline-String>
async reset()

Reset the NBSAgent.

async month_trigger()

Check if a monthly cycle should be triggered based on simulation time.

Returns: True if monthly interval has passed since last trigger, False otherwise

async forward()

Execute monthly economic data collection and update cycle.

Performs:

  1. Real GDP calculation

  2. Labor statistics aggregation

  3. Price level monitoring

  4. Citizen welfare metrics collection

  5. Economic indicator updates