experiment design

This commit is contained in:
2023-05-15 16:19:05 +08:00
parent 5d42d74639
commit a5f278c4cb
12 changed files with 37 additions and 13 deletions

View File

@@ -220,6 +220,10 @@ class Model(ap.Model):
lost_percent = n_up_product_removed / len(
product.a_predecessors())
lst_size = self.a_lst_total_firms.revenue_log
lst_size = [firm.revenue_log for firm in self.a_lst_total_firms
if product in firm.a_lst_product
and product not in firm.a_lst_product_removed
]
std_size = (firm.revenue_log - min(lst_size) +
1) / (max(lst_size) - min(lst_size) + 1)
prod_remove = 1 - std_size * (1 - lost_percent)