remove firm that denied request from candidate list

This commit is contained in:
2023-05-15 13:37:05 +08:00
parent aac2607284
commit 7e8980d0c6
15 changed files with 82 additions and 53 deletions

View File

@@ -14,10 +14,10 @@ class ProductAgent(ap.Agent):
return ap.AgentList(
self.model,
[ap.AgentIter(self.model, node).to_list()[0] for node in nodes])
def a_predecessors(self):
nodes = self.product_network.graph.predecessors(
self.product_network.positions[self])
return ap.AgentList(
self.model,
[ap.AgentIter(self.model, node).to_list()[0] for node in nodes])
nodes = self.product_network.graph.predecessors(
self.product_network.positions[self])
return ap.AgentList(
self.model,
[ap.AgentIter(self.model, node).to_list()[0] for node in nodes])