示例#1
0
 def initialize(self):
     global g, daynum, virus
     daynum = 0
     g = nx.Graph()
     virus = ed.virus()
     g = ed.createNodes(self.n, self.d1, self.d2, self.crowd_num, virus)
     g = ed.createEdges(g, daynum, self.density, virus)
示例#2
0
 def initialize(self):
     global g, daynum, virus
     global num  # the number of patients in hospitals
     daynum = 0
     virus = ed.virus()
     g = ed.createNodes(self.n, self.d1, self.d2, self.crowd_num, virus)
     g = ed.createEdges(g, daynum, self.density, virus)
     num = 0
示例#3
0
 def initialize(self):
     global g, daynum, virus
     global num
     daynum = 0
     virus = ed.virus()
     g = ed.createNodes(self.n, self.d1, self.d2, self.crowd_num, virus)
     g = ed.createEdges(g, daynum, self.density, virus)
     num = 0