diff --git a/firm.py b/firm.py index e7d97c8..9ba553f 100644 --- a/firm.py +++ b/firm.py @@ -246,6 +246,15 @@ class FirmAgent(ap.Agent): select_customer = \ self.model.nprandom.choice(lst_firm_connect) self.accept_request(select_customer, product) + else: + for down_firm in lst_firm: + down_firm.dct_cand_alt_supp_up_prod_disrupted[ + product].remove(self) + + print( + f"{self.name} denied {product.code} request " + f"from {down_firm.name} for lack of capacity" + ) def accept_request(self, down_firm, product): # para product is the product that self is selling