필터 지우기
필터 지우기

What does this message mean, "CVODES returned -4..." ?

조회 수: 2 (최근 30일)
Wei Wang
Wei Wang 2020년 5월 3일
댓글: Wei Wang 2020년 5월 7일
Hi, all
When I use SimBiology Analyzer, I get this message:
This would happen when I use a customized function like:
function [F]=calculateF(Drug_1,CD_1,Kc,DrugMW,CDMW)
%Drug,CD in unit of mg/mL, Kc in unit of L/mmol
Drug=Drug_1*1000/DrugMW;
CD=CD_1*1000/CDMW;
F=(-(Kc*(CD-Drug)+1)+((Kc*(CD-Drug)+1)^2+4*Kc*Drug)^(1/2))/(2*Kc*Drug);
end
This function is to calculate the free fraction of dissolved drug. This function works when I use MATLAB (not in SimBiology).
What does this message mean? I don't know what "h" is.

채택된 답변

Rick Paxson
Rick Paxson 2020년 5월 3일
Hello,
First let me comment on the message you are seeing. 'h' is the time step the ODE solver, in this case CVODES, is attempting to take, and failing. It fails because it has reached a lower bound (5.99618e-17) and has not been able to satisfy error tolerances. This typically happens when a solution if blowing up and could indicate a problem with the model formulation or its initial conditions.
Things you could try to debug the problem:
  1. Change the solver and / or loosen the solver tolerances and try to run the model again.
  2. If you are using release 19b, download the SimBiology Debugger from here. It is easy to use and will help you figure out what is happening.
Hope this helps.
  댓글 수: 7
Florian Augustin
Florian Augustin 2020년 5월 6일
편집: Florian Augustin 2020년 5월 6일
Hi,
To find out how the intial value is set within the model itself (e.g. by rules) you can inspect the component CDMolecularWeight in the debugger by selecting it as a custom component in the top bar of the app:
Then click visualize and click on "more details". This should give you a list of rules/reactions that determine the value of CDMolecularWeight. Note, that in the current version of the debugger, doses and variants are not visualized in this table/graph (although the reported values of components take doses and variants into account). Maybe this gives a hint why the value of CDMolecularWeight is 0.
You can uncheck response and expression plots for more real estate for the model component dependency graph.
-Florian
Wei Wang
Wei Wang 2020년 5월 7일
Hi, Florian,
I find where the problem is. Yesterday I did not save the model after I changed the value of CDMolecularWeight from 0 to 1, so I received the result in Debugger despite I had cleared and reloaded the model. Today I retry it and find the problem disappears, then I realize I made it wrong.
Thanks for your help.
Wang Wei

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  SimBiology Community

카테고리

Help CenterFile Exchange에서 Scan Parameter Ranges에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by