reorder exp table + diff_new_conn
This commit is contained in:
9
firm.py
9
firm.py
@@ -198,14 +198,7 @@ class FirmAgent(ap.Agent):
|
||||
self.accept_request(select_customer, product)
|
||||
|
||||
def accept_request(self, down_firm, product):
|
||||
lst_firm_size = [
|
||||
firm.revenue_log for firm in self.model.a_lst_total_firms
|
||||
if product in firm.a_lst_product
|
||||
and product not in firm.a_lst_product_removed
|
||||
]
|
||||
prod_accept = self.revenue_log / sum(lst_firm_size)
|
||||
# damp prod
|
||||
prod_accept = prod_accept ** self.flt_diff_new_conn
|
||||
prod_accept = self.flt_diff_new_conn
|
||||
if self.model.nprandom.choice([True, False],
|
||||
p=[prod_accept, 1 - prod_accept]):
|
||||
self.firm_network.graph.add_edges_from([
|
||||
|
||||
Reference in New Issue
Block a user