Saving a model after UnitConversion in SimBiology
15 views (last 30 days)
Show older comments
Hi,
I was wondering if it was possible to save (and export to SBML) a model after UnitConversion? I cannot directly export to SBML a model that requires UnitConversion prior to simulation (conversion works fine, but simulations obviously do not). Can the converted model be manipulated though?
Thanks.
0 Comments
Accepted Answer
Arthur Goldsipe
on 27 Jan 2017
Based on your reply, I now understand that you'd like to update a model in SimBiology, so that you can simulate it correctly with UnitConversion disabled. This will allow you to export the model to SBML so that you can also simulate it correctly in a tool that does not support unit conversion.
You should be able to automate much of the conversion process. However, the exact details will depend on your model and how you want to make the units consistent. At a high level, you will need to convert all species, compartments, and parameters to consistent units and update their values accordingly. The function sbioconvertunits can be quite helpful in this process. For example, you can update all species in model m1 so that units and values are in mole/liter with the code sbioconvertunits(m1.Species, 'mole/liter').
Good luck,
-Arthur
More Answers (1)
Arthur Goldsipe
on 27 Jan 2017
Hi,
I'd like to make sure I understand your question. Tell me if this is accurate: When you simulate your model in SimBiology, you must use UnitConversion to get the correct answer. You also want to export this model to SBML. You want to make sure that the SBML file will be correct.
If you'd like to know what features of SimBiology can be exported to SBML, then read this documentation. With regard to unit conversion, SimBiology will include the units in the SBML file. If you import the SBML file into SimBiology and enable UnitConversion, you should get the same unit conversion behavior as you did before exporting the model.
That said, if you need to use that SBML file with another tool, you will need to make sure that the tool understands how to perform the necessary unit conversions. If you need to use the model with a tool that does not support unit conversion, you will probably need to SimBiology model so that it works correctly with UnitConversion disabled. Specifically, you need to make sure that all math expressions have consistent units.
If you add a comment and don't get a prompt reply, contact me directly. I don't get notified when there are updates to a question.
Good luck!
-Arthur
2 Comments
Arthur Goldsipe
on 27 Jan 2017
Ah, now that I understand your question more clearly, I'll post another answer that more clearly addresses it.
See Also
Categories
Find more on Scan Parameter Ranges in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!