def do1b(address): # to debug, having the map of the agent agL = [] for ag in address.modelSwarm.agentList: agL.append(ag.number) agL.sort() # print "\noActions before drawGraph agents", agL # print "oActions before drawGraph nodes", common.g.nodes() # basic action to visualize the networkX output gvf.openClearNetworkXdisplay() gvf.drawGraph()
def do1b(address): if common.cycle == 1: # setting Figure for the net if not common.IPython or common.graphicStatus == "PythonViaTerminal": # the or is about ipython running in a terminal f = gvf.plt.figure(num=2) mngr1 = gvf.plt.get_current_fig_manager() # NB, after figure() mngr1.window.wm_geometry("+650+0") mngr1.set_window_title("Links Entrepreneurs - Workers") # having the map of the agent agL = [] for ag in address.modelSwarm.agentList: agL.append(ag.number) agL.sort() # print "\noActions before drawGraph agents", agL # print "oActions before drawGraph nodes", common.g.nodes() # basic action to visualize the networkX output gvf.openClearNetworkXdisplay() gvf.drawGraph()