Пример #1
0
import rrPython
import os
import csv

os.chdir("C:\\RoadRunner\\bin")

function = "getResultNumCols"
rrPython.loadSBMLFromFile("C:\\RoadRunner\\Models\\feedback.xml")
rrPython.simulate()

try:
    cols = rrPython.getResultNumCols()
    if str(cols) is not False:
        result = "True"
    else:
        result = "False"
except:
    result = "False"


PythonTestResults = open("C:\\RoadRunner\\PythonTestResults.csv", "a")
writer = csv.writer(PythonTestResults)
writevar = function + "=" + result
writer.writerow([writevar])
PythonTestResults.close()
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
Пример #3
0
import rrPython
import os
import csv
os.chdir('C:\\RoadRunner\\bin')

function = 'getMatrixNumRows'
rrPython.loadSBMLFromFile('C:\\RoadRunner\\Models\\feedback.xml')
rrPython.simulate()

try:
    rows = rrPython.getMatrixNumRows()
    if str(rows) is not False:
        result = 'True'
    else:
        result = 'False'
except:
    result = 'False'

PythonTestResults = open('C:\\RoadRunner\\PythonTestResults.csv', 'a')
writer = csv.writer(PythonTestResults)
writevar = function + '=' + result
writer.writerow([writevar])
PythonTestResults.close()
Пример #4
0
import rrPython
import os
rrPython.enableLogging()
rrPython.setTempFolder('C:\\RRTemp')
os.chdir('C:\\RoadRunner\\bin')

result = rrPython.loadSBMLFromFile('C:\\RoadRunner\\Models\\feedback.xml')
print result

simulation = rrPython.simulate()
print simulation

#insert known results, compare

PythonTestResults = open('C:\\RoadRunner\\PythonTestResults.csv','a')
writer = csv.writer(PythonTestResults)
writevar = function + '=' + result
writer.writerow([writevar])
PythonTestResults.close()
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 os

rrPython.enableLogging()
rrPython.setTempFolder('C:\\RRTemp')
os.chdir('C:\\RoadRunner\\bin')

result = rrPython.loadSBMLFromFile('C:\\RoadRunner\\Models\\feedback.xml')
print result

simulation = rrPython.simulate()
print simulation

#insert known results, compare

PythonTestResults = open('C:\\RoadRunner\\PythonTestResults.csv', 'a')
writer = csv.writer(PythonTestResults)
writevar = function + '=' + result
writer.writerow([writevar])
PythonTestResults.close()