Пример #1
0
	def showSteps(self, event):
		a=self.askParam([{'Name':"First step", "Value":0}, {'Name':"Last step", "Value":self.stored_controls.shape[0]-1}])
		if a:
			for si in range(a[0], a[1]+1):
				self.resetSim()
				c=self.stored_controls[si,:]
				print si
				q=controls.testStep(self.sim, c, self.graph.redrawSims)
				print q
Пример #2
0
	def stepTest(self, event):
		fn=os.environ.get("FIBR_TEST_FILE")
		if fn:
			z=file(fn).read()
		else:
			try:	
				tp=os.path.split(__file__)[0]
				tp=os.path.join(tp,'teststep.txt')
				z=file(tp).read()
			except:
				a=self.askParam([{'Name':'File', 'Type':str, 'Browser':FileBrowse}])
				if not a:
					return
				tp=a[0]
				z=file(tp).read()
			os.environ["FIBR_TEST_FILE"]=tp
		z=z.split("##")[0]
		z=z.split()
		z=[z[i] for i in range(1, len(z), 2)]
		z=array(map(float, z))
		q=controls.testStep(self.sim, z, self.graph.redrawSims)
		print q
Пример #3
0
	def randTest(self, event):
		z=controls.randomStep()
		print z
		q=controls.testStep(self.sim, z, self.graph.redrawSims)
		print q