Question about using an Exponential within a rule using Simbiology
2 views (last 30 days)
Show older comments
Brett Fleisher
on 8 Jun 2020
Commented: Brett Fleisher
on 11 Jun 2020
Hello All,
I am trying to estimate a parameter using the change in drug concentraiton (Concentraiton), m, b. I use the the following rule:
Rule_6 = exp(m*log(Concentraiton)+b)
When I run the equation, I get the following error:
Cannot perform dimensional analysis for rule 'rule_6' because of the function 'exp' 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.
Variables m and b are dimensionless as is the parameter I am estimating. I divided Concentraiton by Concentraiton0, both as mg/L, to get a dimensionless value. Do you have any advice for estimating the variable while still keeping the UnitConversion on?
Thanks
0 Comments
Accepted Answer
Wei Wang
on 9 Jun 2020
Hi, Brett,
As what you mentioned, I think the your rule is "Rule_6=exp(m*log(Concentration/Concentration0)+b)". And I think you are using this equation to calculate something X, X=exp(m*log(Concentration/Concentration0)+b), so that X should be demensionless in this from. If X is with demension, you can also creat a parameter X0 with value 1 in the same unit, and change the equation to "X=exp(m*log(Concentration/Concentration0)+b)*X0".
I hope this is helpfull.
Best regards,
Wang Wei
4 Comments
Arthur Goldsipe
on 9 Jun 2020
Hi,
Wang Wei is correct. Once you have ensured that you have correctly configured your rule, you can safely ignore this message. Since SimBiology can't validate the consistency of the rule, it warns you every time about this. But it's a warning (that you may or may not have a probelm) not an error (which is what occurs when there is definitely a problem).
-Arthur
More Answers (0)
Communities
More Answers in the SimBiology Community
See Also
Categories
Find more on Biotech and Pharmaceutical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!