Can I set simbiology repeat assignment rule state to active or inactive using variants?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jim Bosley
am 29 Mär. 2018
Beantwortet: Arthur Goldsipe
am 30 Mär. 2018
Using the paradigm similar to that in Dr. Goldspie's insulindemo example, I'm using two rules to set a variable parameter. Let's call the parameter "state_used". In the model, an ODE is used to calculate the species "ODE_state". And I have a function of time calculated to generate "forced_state". One rule sets "state_used" to "ODE_state". The other sets "state_used" to "forced_state". By setting one (and only one) or the other, I can have the model generate the state values, or I can force the state values. For all calculations, the model uses "state_used".
Can I have a variant set a repeat assignment rule to active or inactive?
Or, must I use a MATLAB script to "set" the .Active property to 0 or 1?
An alternate approach would be to have a single assignment rule "ODE_switch" such that
state_used = ODE_switch*ODE_state + (1-ODE_switch)*forced_state
in which case the ODE_switch parameter could be set via variants.
Thanks.
0 Kommentare
Akzeptierte Antwort
Arthur Goldsipe
am 30 Mär. 2018
You cannot currently use variants to set the Active property of a Rule (or any other object). I agree this is an obvious extension to variants, and we've heard about similar use cases before. Until SimBiology gets such functionality, I recommend either of the alternatives you've already mentioned: setting Active via a script or recasting the rule into something that can be controlled via a variant.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Extend Modeling Environment finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!