agentsociety.cityagent.firmagent¶
Module Contents¶
Classes¶
Configuration for FirmAgent. |
|
Agent representing a firm in an economic simulation. |
Data¶
API¶
- agentsociety.cityagent.firmagent.__all__¶
[‘FirmAgent’]
- class agentsociety.cityagent.firmagent.FirmAgentConfig¶
Bases:
agentsociety.agent.AgentParamsConfiguration for FirmAgent.
- class agentsociety.cityagent.firmagent.FirmAgent(id: int, name: str, toolbox: agentsociety.agent.AgentToolbox, memory: agentsociety.memory.Memory, agent_params: Optional[agentsociety.cityagent.firmagent.FirmAgentConfig] = None, blocks: Optional[list[agentsociety.agent.Block]] = None)¶
Bases:
agentsociety.agent.FirmAgentBaseAgent representing a firm in an economic simulation.
Manages economic activities including price adjustments, wage policies, inventory control, and employee skill development. Inherits from InstitutionAgent and extends its economic behaviors.
Initialization
Initialize a FirmAgent with essential components for economic simulation.
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 firm agent with the provided parameters and sets up necessary internal states.
- ParamsType¶
None
- async reset()¶
Reset the FirmAgent.
- async month_trigger()¶
Check if monthly adjustment should be triggered.
Compares current simulation time with last trigger time. Returns: True if time_diff has passed since last trigger, False otherwise
- async forward()¶
Execute monthly economic adjustments.
Performs:
Employee skill adjustments based on market conditions
Price adjustments based on inventory/demand balance
Economic metrics reset (demand/sales tracking)