agentsociety.cityagent.nbsagent¶
Module Contents¶
Classes¶
Configuration for 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.AgentParamsConfiguration for NBSAgent.
- 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.NBSAgentBaseNational 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
- 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:
Real GDP calculation
Labor statistics aggregation
Price level monitoring
Citizen welfare metrics collection
Economic indicator updates