Exemplo n.º 1
0
# -*- coding: utf-8 -*-
"""

Created by libsedmlscript v0.0.1
"""

from sed_roadrunner import model, task, plot

#----------------------------------------------

model1 = model("models/oscli.xml")
elements = ['time', 'S1', 'S2', 'J0_v0']
task1 = {}
for element in elements:
    task1[element] = [model1[element]]
for x in range(0, 100):
    if (x >= 40) and (x < 60):
        model1.J0_v0 = 0.1
    else:
        model1.J0_v0 = 8
    model1.onestep(0.1)
    for element in elements:
        task1[element].append(model1[element])
plot(task1, "time")
Exemplo n.º 2
0
# -*- coding: utf-8 -*-
"""

Created by libsedmlscript v0.0.1
"""

from sed_roadrunner import model, task, plot

#----------------------------------------------

model1 = model("models/BIOMD0000000021.xml")
model2 = model1.copy()
model2.V_mT = 0.28
model2.V_dT = 4.8
task1 = model1.uniform(0, 380, 1000)
task2 = model2.uniform(0, 380, 1000)
p1 = plot(task1, "time", '[Mt]', "task1 [Mt]")
p1.addPlot(task2, "time", "[Mt]", "task2 [Mt]")
p1.set_ylabel("Concentration")
p2 = plot(task1, "[Cn]", "[Mt]", "task1")
p2.addPlot(task2, "[Cn]", "[Mt]", "task2")
p2.set_ylabel("[Mt]")
Exemplo n.º 3
0
# -*- coding: utf-8 -*-
"""

Created by libsedmlscript v0.0.1
"""

from sed_roadrunner import model, task, plot

#----------------------------------------------

model1 = model("models/BorisEJB.xml")
model1.outputVariables = ["time", "MAPK", "MAPK_P", "MAPK_PP", "MKK_P", "MKKK", "MKKK_P"]
p1 = plot()
for x in range(10):
   mod = model1.copy()
   onesim = mod.uniform(0, 4000, stochastic = True, seed = 1003 * (x + 1))
   output = {}
   for element in onesim:
      out = element
      if out != "time":
         out = element + "_" + str(x + 1)
      output[out] = onesim[element]
   p1.addPlot(output, "time")
p1.show()