I have two agent ids from two different ranks (lets say (1,0,1) and (1,0,2)) and I want to add an edge between these two agents.
I tried to use DirectedSharedNetwork.add_edge() and SharedNetwork.graph.add_edge() but for doing that I must have the Agent with the id of (1,0,1) and (1,0,2). Also, I just want to add this edge once therefore I don't know should I use condition such as self.rank==0 or not. To encapsulate, how can I add edge between these two agents from different ranks just for once.