IIabm/firm.py

18 lines
551 B
Python

import agentpy as ap
class FirmAgent(ap.Agent):
def setup(self, code, name, type_region, revenue_log, list_product,
capacity):
self.firm_network = self.model.firm_network
self.code = code
self.name = name
self.type_region = type_region
self.revenue_log = revenue_log
self.list_product = list_product
self.capacity = capacity
self.dct_product_is_disrupted = dict.fromkeys(list_product, False)
self.dct_product_is_removed = dict.fromkeys(list_product, False)