-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
amici.import_utils.SBMLexception #2651
Comments
Hi @PHvanLent, after modifying the example a bit, I was able to reproduce the issue. It is fixed in #2652. Thanks for reporting. Reproducer
import libsbml
import numpy as np
import amici.sbml_utils
import amici.splines
sbml_doc = libsbml.SBMLDocument()
sbml_model = sbml_doc.createModel()
p = sbml_model.createParameter()
p.setId("ECglucose")
p.setConstant(False)
domain=np.array([0.0, 5.0, 10.0, 15.0, 20.0, 30.0, 60.0, 90.0, 150.0, 180.0, 220.0, 250.0, 300.0, 350.0, 400.0])
drange=np.array([0.09436668, 0.20660086, 0.32938346, 0.39271404, 0.46033645, 0.43051466,
0.38017434, 0.31141232, 0.22630089, 0.18609768, 0.14751637, 0.12343035,
0.10829366, 0.09658453, 0.09436668])
spline = amici.splines.CubicHermiteSpline(
sbml_id="ECglucose",
evaluate_at=amici.sbml_utils.amici_time_symbol,
nodes=domain,
values_at_nodes=drange,)
spline.add_to_sbml_model(sbml_model)
sbml_importer = amici.SbmlImporter(sbml_model)
observables = amici.assignmentRules2observables(
sbml_importer.sbml, # the libsbml model object
filter_function=lambda variable: variable.getId() == "ECglucose")
sbml_importer.sbml2amici("gh2651", observables=observables) EDIT: After #2652 is merged, you can install the latest unreleased version with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi AMICI developers,
I am trying to compile a model using
amici.assignmentRules2observables
with a spline interpolation on some observable.When I try to load this and run
I receive the error
amici.import_utils.SBMLException: AMICI can not parse piecewise/event trigger functions with argument lt(time, 5).
Do you have an idea what I can do to solve this?
Best,
Paul
The text was updated successfully, but these errors were encountered: