def dpower(self): print "Power" X, ok = QtGui.QInputDialog.getText(self, 'Input Dialog', 'Enter value of base') if ok: print X else: return Y, ok = QtGui.QInputDialog.getText(self, 'Input Dialog', 'Enter vaue of exponent') if ok: print Y else: return outputFileName, chemicalList = power.execute(X, Y) print 'Result File ' + outputFileName + ' Created' timeOfSimulation, ok = QtGui.QInputDialog.getText( self, 'Input Dialog', 'Enter Time Of Simulation') if ok: print timeOfSimulation else: return sim = XMLParser.getSimulator(outputFileName) sim.simulate(int(timeOfSimulation), getHistoryFileName(outputFileName)) sim.plot(chemicalList)
def dlogarithm(self): print "Ceiling of logarithm" X, ok = QtGui.QInputDialog.getText( self, 'Input Dialog', 'Enter value you want to take ceiling logarithm of') if ok: print X else: return outputFileName, chemicalList = logarithm.execute(X) print 'Result File ' + outputFileName + ' Created' timeOfSimulation, ok = QtGui.QInputDialog.getText( self, 'Input Dialog', 'Enter Time Of Simulation') if ok: print timeOfSimulation else: return sim = XMLParser.getSimulator(outputFileName) sim.simulate(int(timeOfSimulation), getHistoryFileName(outputFileName)) sim.plot(chemicalList)
def dincrementation(self): print "Increment" X, ok = QtGui.QInputDialog.getText( self, 'Input Dialog', 'Enter value you want to increment 1 to') if ok: print X else: return outputFileName, chemicalList = increment.execute(X) print 'Result File ' + outputFileName + ' Created' timeOfSimulation, ok = QtGui.QInputDialog.getText( self, 'Input Dialog', 'Enter Time Of Simulation') if ok: print timeOfSimulation else: return sim = XMLParser.getSimulator(outputFileName) sim.simulate(int(timeOfSimulation), getHistoryFileName(outputFileName)) sim.plot(chemicalList)
def dmultiplication(self): print "Multiplication" X, ok = QtGui.QInputDialog.getText( self, 'Input Dialog', 'Enter first value you want to multiply') if ok: print X else: return Y, ok = QtGui.QInputDialog.getText( self, 'Input Dialog', 'Enter second value you want to multiply') if ok: print Y else: return outputFileName, chemicalList = multiply1.execute(X, Y) print 'Result File ' + outputFileName + ' Created' timeOfSimulation, ok = QtGui.QInputDialog.getText( self, 'Input Dialog', 'Enter Time Of Simulation') if ok: print timeOfSimulation else: return sim = XMLParser.getSimulator(outputFileName) sim.simulate(int(timeOfSimulation), getHistoryFileName(outputFileName)) sim.plot(chemicalList)
def plotResults(xmlFile,chemicalList,timeOfSimulation): historyFile = getHistoryFileName(xmlFile) sim = XMLParser.getSimulator(xmlFile) sim.simulate(timeOfSimulation,historyFile) sim.plot(chemicalList)