4 status (Normal / Affected / Disrupted / Removed)
This commit is contained in:
parent
6f99d9978e
commit
3e87cffa63
8
model.py
8
model.py
|
@ -289,8 +289,8 @@ class Model(ap.Model):
|
||||||
[firm.code == di_supp_node['Firm_Code']
|
[firm.code == di_supp_node['Firm_Code']
|
||||||
for firm in self.a_lst_total_firms])[0]
|
for firm in self.a_lst_total_firms])[0]
|
||||||
lst_cand = self.model.a_lst_total_firms.select([
|
lst_cand = self.model.a_lst_total_firms.select([
|
||||||
di_supp_prod in firm.a_lst_product
|
di_supp_prod in firm.a_lst_product and
|
||||||
and di_supp_prod not in firm.a_lst_product_disrupted
|
di_supp_prod not in firm.a_lst_product_disrupted
|
||||||
for firm in self.model.a_lst_total_firms
|
for firm in self.model.a_lst_total_firms
|
||||||
])
|
])
|
||||||
n2n_betweenness = \
|
n2n_betweenness = \
|
||||||
|
@ -311,8 +311,8 @@ class Model(ap.Model):
|
||||||
for product in self.a_lst_total_products])[0]
|
for product in self.a_lst_total_products])[0]
|
||||||
# find a dfferent firm can produce the same product
|
# find a dfferent firm can produce the same product
|
||||||
lst_cand = self.model.a_lst_total_firms.select([
|
lst_cand = self.model.a_lst_total_firms.select([
|
||||||
di_supp_prod in firm.a_lst_product
|
di_supp_prod in firm.a_lst_product and
|
||||||
and di_supp_prod not in firm.a_lst_product_disrupted
|
di_supp_prod not in firm.a_lst_product_disrupted
|
||||||
and firm.code != di_supp_node['Firm_Code']
|
and firm.code != di_supp_node['Firm_Code']
|
||||||
for firm in self.model.a_lst_total_firms
|
for firm in self.model.a_lst_total_firms
|
||||||
])
|
])
|
||||||
|
|
Loading…
Reference in New Issue