Simbiology - Copying "quantities used by this rule"

1 view (last 30 days)
Hi everyone,
I'm currently working on a script to move a reaction with all related rules and parameters between two models of the same system but with different reaction kinetics. For the "root" parameters and related rules it was easy enough to use strcat, strcmp, and find to locate the index and then copyobj to move it between models. However, some of the rules are complex and involve many other parameters.
In the GUI, these show up at the bottom of the rule as "Quantities used by this rule." However, I can't find a convenient way to select for them in the script. I've started on a solution which parses the rule expression and then compares it to a list of names extracted from the various model objects and then copying the identified parameters, but I don't have much experience with that kind of programming and it's going slow and I suspect clunky and prone to mistakes I don't even know about yet. Before I put my time into fixing it I thought I'd ask if anyone can suggest a better way.
tl;dr - Given a rule index, I want to select/find index of "quantities used by this rule" and then copy those objects to a different model.
Thanks for reading and thinking about it. Double thanks for any suggestions.
-Adam

Accepted Answer

Arthur Goldsipe
Arthur Goldsipe on 5 Jan 2016
Unfortunately, SimBiology does not have a publicly documented way to access the quantities used by a rule from a MATLAB function. I will contact you directly to see if we can develop a suitable workaround.
  1 Comment
Adam Lambert
Adam Lambert on 6 Jan 2016
Thank you. I did not see this response and submitted a service request this morning. When you responded to my last question it emailed me. Did you try to send an email?

Sign in to comment.

More Answers (0)

Communities

More Answers in the  SimBiology Community

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!