def setGetTimeStart(testId): print string.ljust("Check " + testId, rpadding), errorFlag = False value = random.random() * 10 rrPython.setTimeStart(value) if expectApproximately(rrPython.getTimeStart(), value, 1E-6) == False: errorFlag = True print passMsg(errorFlag)
def setGetTimeStart(testId): print string.ljust ("Check " + testId, rpadding), errorFlag = False value = random.random ()*10 rrPython.setTimeStart (value) if expectApproximately (rrPython.getTimeStart (), value, 1E-6) == False: errorFlag = True print passMsg (errorFlag)
import rrPython import os modelPath = ('C:\\roadRunner\\models\\feedback.xml') sbml = rrPython.loadSBMLFromFile(modelPath) rrPython.setTimeStart(0.0) rrPython.setTimeEnd(3.0) rrPython.setNumPoints(20) rrPython.setSteadyStateSelectionList("time S1 S2 S3 S4") results = rrPython.simulate() print results
import rrPython import timeit import cmd modelPath = raw_input('Model location: (C:\\RoadRunner\\Models\\feedback.xml, etc.)') rrPython.loadSBMLFromFile(modelPath) simulations = raw_input('Number of simulations:') start_Time = raw_input('Start time:') start_Time = float(start_Time) end_Time = raw_input('End time:') end_Time = float(end_Time) number_of_points = raw_input('Number of points:') number_of_points = int(number_of_points) simulations = int(simulations) rrPython.setTimeStart(start_Time) rrPython.setTimeEnd(end_Time) rrPython.setNumPoints(number_of_points) t = timeit.Timer('rrPython.simulate()','import rrPython') totalTime = t.timeit(number = simulations) meanTime = totalTime/simulations print 'Average simulation time: ' + str(meanTime) + ' seconds'
import os import rrPython print 'RoadRunner Build Date: ' + rrPython.getCopyright() startTime = 0 endTime = 5 numPoints = 50 selList="time,S1,S2" result = rrPython.loadSBMLFromFile("..\\Models\\test_1.xml") rrPython.setTimeStart(startTime) rrPython.setTimeEnd(endTime) rrPython.setNumPoints(numPoints) rrPython.setTimeCourseSelectionList(selList) k = rrPython.simulate() print k print "done"