What is wrong with the 'max' function in Simbiology?
Show older comments
Hi, I am having issues with correctly defining a rule (repeated assignment) for a block (parameter). The rule follows:
[Dynamic Glucagon Secr] = kGSRd*max((-[Plasma Glu]/Vg),0)
This is the only warning that I get:
"Cannot perform dimensional analysis for rule 'Dynamic Glucagon Secr rule' because of the function 'max' in the rule. Because UnitConversion is on,
correct simulation results will depend on this expression being dimensionally correct. Additionally, SimBiology simulates the model in a unit system
determined at runtime. The units are determined by the units used in the model and the model's configset. Unless the inputs and outputs to the function
are dimensionless, results may change due to configset option changes, changes to the model, or version changes in SimBiology. It is recommended that
input and output arguments to functions be dimensionless to ensure correct results."
Why can't I use the 'max' function? And are there any good alternatives?
4 Comments
tash7827
on 8 Aug 2016
tash7827
on 8 Aug 2016
Ingrid Tigges
on 8 Aug 2016
I have not checked this in SimBiology myself but have you thought of defining a variable with the same units as [Plasma Glu]/Vg ? Does it work then? How are the variables in the expression (-[Plasma Glu]/Vg) defined? Is Vg a positive constant and Plasma Glu is the concentration in plasma? If this is true, shouldn't the expression not be always negative?
tash7827
on 8 Aug 2016
Accepted Answer
More Answers (0)
Communities
More Answers in the SimBiology Community
Categories
Find more on Extend Modeling Environment 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!