def doT1pT2p(self): print Community_Coordinate nPnt=1000 nLink=40 nT1=40 nT2=20 tests="" s=Simulator(nPnt) s.genPoints() s.genRandomLinks(nLink*nPnt) f2 = open('doT1pT2p2.txt', 'w') for i in range(0,101): for j in range(0,i+1): nSteps=self.MutiTimesNoGen(s,1,nT1,nT2,0.01*i,0.01*j) print str(i)+"\t"+ str(j) +"\t"+str(nSteps) f2.write(str(i)+"\t"+ str(j) +"\t"+str(nSteps)+"\n") tests=tests+str(nSteps)+"\t" for j in range(i,101): tests=tests+"0\t" tests=tests+("\n") f = open('doT1pT2p.txt', 'w') f.write(tests) return
def doT1pT2p(self): nPnt = 1000 nLink = 40 nT1 = 40 nT2 = 20 tests = "" s = Simulator(nPnt) s.genPoints() s.genRandomLinks(nLink * nPnt) f2 = open('doT1pT2p2.txt', 'w') for i in range(0, 101): for j in range(0, i + 1): nSteps = self.MutiTimesNoGen(s, 1, nT1, nT2, 0.01 * i, 0.01 * j) print str(i) + "\t" + str(j) + "\t" + str(nSteps) f2.write(str(i) + "\t" + str(j) + "\t" + str(nSteps) + "\n") tests = tests + str(nSteps) + "\t" for j in range(i, 101): tests = tests + "0\t" tests = tests + ("\n") f = open('doT1pT2p.txt', 'w') f.write(tests) return
def doT2Number(self): tests = [] s = Simulator(1000, 40, 1) s.genPoints() s.genRandomLinks(40) for i in range(10, 31): nSteps = self.MutiTimesNoGen(s, 2, 30, i, 0.5, 0.2) print str(i) + "\t" + str(nSteps) tests.append(nSteps) print tests return
def doT2Number(self): tests=[] s=Simulator(1000,40,1) s.genPoints() s.genRandomLinks(40) for i in range(10,31): nSteps=self.MutiTimesNoGen(s,2,30,i,0.5,0.2) print str(i) +"\t"+str(nSteps) tests.append(nSteps) print tests return
def doT1P(self): tests = [] s = Simulator(1000) s.genPoints() #s.genLinks(10*1000) s.genRandomLinks(10 * 1000) #s.setPointType(nOrigins, nLink1, nLink2, p1, p2) for i in range(20, 101): nSteps = self.MutiTimesNoGen(s, 1, 30, 10, 0.01 * i, 0.2) print str(i * 0.01) + "\t" + str(nSteps) tests.append(nSteps) print tests return
def doT1P(self): tests=[] s=Simulator(1000) s.genPoints() #s.genLinks(10*1000) s.genRandomLinks(10*1000) #s.setPointType(nOrigins, nLink1, nLink2, p1, p2) for i in range(20,101): nSteps=self.MutiTimesNoGen(s,1,30,10,0.01*i,0.2) print str(i*0.01) +"\t"+str(nSteps) tests.append(nSteps) print tests return
def doT1nT2n(self): nPnt=1000 nLink=40 tests="" s=Simulator(nPnt) s.genPoints() s.genRandomLinks(nLink*nPnt) f2= open('doT1nT2n2.txt', 'w') for i in range(0,100): for j in range(0,i+1): nSteps=self.MutiTimesNoGen(s,1,i,j,0.5,0.2) print str(i)+"\t"+ str(j) +"\t"+str(nSteps) f2.write(str(i)+"\t"+ str(j) +"\t"+str(nSteps)+"\n") tests=tests+str(nSteps)+"\t" for j in range(i,101): tests=tests+"0\t" tests=tests+("\n") f = open('doT1nT2n.txt', 'w') f.write(tests) return