Conservation laws in Simbiology
이전 댓글 표시
Is there any form of including explicitly conservation laws in simbiology models?
답변 (1개)
Arthur Goldsipe
2015년 6월 8일
0 개 추천
Hi Debora,
I can (and will) tell you a way you can explicitly enforce conservation laws, but I think it's first worth asking why you want to do that. If it's because your simulation results don't obey a conservation law you expect, then you may have a larger problem. The first question to ask is whether the difference is acceptable. Some rounding errors are the result of numerically solving the ODEs. If you need more accurate answers, then you may need to tighten the ODE solver tolerances. But note that sometimes you never get exactly the results you expect, due to machine precision (for example, .3 - .1 - .2 is not quite 0).
If you just want to make sure that you've correctly written your model, then you can use the sbioconsmoiety function to identify conservation laws.
If you still think you need to enforce conservation laws you can use a repeated assignment. For example, if your model had a single reaction "x -> y", you could alternatively formulate the model as "x -> null" with a repeated assignment of the form "y = x0 + y0 - x". In both cases, "x + y" would be conserved (excepting the numerical issues I mentioned earlier).
If that doesn't clear things up or you have additional constraints, then I recommend posting a new question to MATLAB Answers with more details. (People will be much more likely to see and answer a brand new question, rather than adding more answers to this one.)
-Arthur
커뮤니티
더 많은 답변 보기: SimBiology Community
카테고리
도움말 센터 및 File Exchange에서 Extend Modeling Environment에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!