필터 지우기
필터 지우기

Non negative values for species in Simbiology

조회 수: 3 (최근 30일)
Kieran
Kieran 2013년 6월 7일
During my simulations, I find that I get negative values for species that simply cannot be negative (such as mRNA concentrations). Is there a way to not allow this to occur?
It's slightly troubling as my equation rates should go to zero as the species approaches zero...

채택된 답변

Arthur Goldsipe
Arthur Goldsipe 2013년 6월 7일
Hi Kieran,
I'm just going to paste an answer to a similar question from a MATLAB newsgroup post (with thanks to Pramod for the original answer). You can also find a similar discussion about negative values when solving ODEs in the section titled "Advice on controlling unphysical negative values" of the documentation on the CVODE solver from the SUNDIALS suite.
-----
There is no way to constrain your metabolite/species values to positive only. However, if the concentration of a species is negative within absolute tolerance of zero, it should be interpreted as zero. If the concentration is significantly negative, then the dynamics in your model may not be physical (i.e. the dynamics in the system is driving a particular species to be negative)
I am assuming that you are able to simulate your model without any error and are concerned why some states that should not be negative from the dynamics, show up negative.
To elaborate, SimBiology uses two kinds of tolerances: RelativeTolerance and AbsoluteTolerance. When the solver is integrating the states of the model it ensures that the magnitude of error is below: max (abs(y(i))*RelativeTolerance, AbsoluteTolerance) for each state y(i). In your case it seems that the negative values are within this tolerance and can be interpreted as zero.
You change your tolerances as follows. For example if m1 is your model then:
m1.getconfigset.SolverOptions.RelativeTolerance = 1E-4
m1.getconfigset.SolverOptions.AbsoluteTolerance = 1E-7

추가 답변 (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