"""
####################################################################################################
tellurium 2.0.2
-+++++++++++++++++- Python Environment for Modeling and Simulating Biological Systems
.+++++++++++++++.
.+++++++++++++. Homepage: http://tellurium.analogmachine.org/
-//++++++++++++/. -:/-` Documentation: https://tellurium.readthedocs.io/en/latest/index.html
.----:+++++++/.++ .++++/ Forum: https://groups.google.com/forum/#!forum/tellurium-discuss
:+++++: .+:` .--++ Bug reports: https://github.com/sys-bio/tellurium/issues
-+++- ./+:-://. Repository: https://github.com/sys-bio/tellurium
.+. `...`
SED-ML simulation experiments: http://www.sed-ml.org/
sedmlDoc: L1V3
inputType: 'SEDML_FILE'
workingDir: '/tmp/tmp28bgsq9i'
saveOutputs: 'True'
outputDir: './__tellurium__'
plottingEngine: '<MatplotlibEngine>'
Linux-4.10.0-35-generic-x86_64-with-Ubuntu-16.04-xenial
python 3.6.2 (default, Jul 20 2017, 08:43:29)
[GCC 5.4.1 20170519]
####################################################################################################
"""
import tellurium as te
from roadrunner import Config
from tellurium.sedml.mathml import *
# from tellurium.sedml.tesedml import process_trace, terminate_trace, fix_endpoints
import numpy as np
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d
try:
import tesedml as libsedml
except ImportError:
import libsedml
import pandas
import os.path
Config.LOADSBMLOPTIONS_RECOMPILE = True
workingDir = r'/tmp/tmp28bgsq9i'
# --------------------------------------------------------
# Models
# --------------------------------------------------------
# Model <model1>
model1 = te.loadSBMLModel(os.path.join(workingDir, 'BorisEJB.xml'))
# --------------------------------------------------------
# Tasks
# --------------------------------------------------------
# Task <task0>
# not part of any DataGenerator: task0
# Task <task1>
task1 = []
__range__current = [1.0, 5.0, 10.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0]
for __k__current, __value__current in enumerate(__range__current):
if __k__current == 0:
model1.reset()
task2 = []
__range__current1 = np.linspace(start=1.0, stop=40.0, num=101)
for __k__current1, __value__current1 in enumerate(__range__current1):
if __k__current1 == 0:
model1.reset()
# Task: <task0>
task0 = [None]
model1.setSteadyStateSolver('nleq')
if model1.conservedMoietyAnalysis == False: model1.conservedMoietyAnalysis = True
model1['J1_KK2'] = __value__current
model1['J4_KK5'] = __value__current1
model1.steadyStateSelections = ['J1_KK2', 'J4_KK5', '[MKK]', '[MKK_PP]', '[MKK_P]']
model1.simulate()
task0[0] = model1.steadyStateNamedArray()
task2.extend(task0)
task1.extend(task2)
# Task <task2>
# not part of any DataGenerator: task2
####################################################################################################
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-1-a11f3de60387> in <module>()
23 dgs = tellurium.executeCombineArchive(f, printPython=False, outputDir=outputDir, saveOutputs=True)
24
---> 25 dgs = tellurium.executeCombineArchive("./omex/L1V3_parameter-scan-2d.omex", printPython=True, outputDir=outputDir, saveOutputs=True)
~/git/tellurium/tellurium/sedml/tesedml.py in executeCombineArchive(omexPath, workingDir, printPython, createOutputs, saveOutputs, outputDir, plottingEngine)
353 print(code)
354
--> 355 results[sedmlFile] = factory.executePython()
356
357 return results
~/git/tellurium/tellurium/sedml/tesedml.py in executePython(self)
509 for dg in self.doc.getListOfDataGenerators():
510 dg_id = dg.getId()
--> 511 dg_data[dg_id] = symbols[dg_id]
512 result['dataGenerators'] = dg_data
513 return result
KeyError: 'J4_KK5_1'