MATLAB Answers

Question about using an Exponential within a rule using Simbiology

2 views (last 30 days)
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?


Sign in to comment.

Accepted Answer

Wei Wang
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


Show 1 older comment
Wei Wang
Wei Wang on 9 Jun 2020
Hi, Brett,
In fact, I concern whether you can run the program. I also have many self-defined functions built in my model and when I run the tool SimBiology-ModelDebugger, I will get this set of warning:
There are nearly 20 similar warnings, but simulation or fit program still can run. So I think you may ignore this problem.
Best regards,
Wang Wei
Arthur Goldsipe
Arthur Goldsipe on 9 Jun 2020
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).

Sign in to comment.

More Answers (0)



More Answers in the  SimBiology Community

Community Treasure Hunt

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

Start Hunting!

Translated by