Modeling Mitochondria Voltage depending on the Sodium/Potassium Pumps results in Algebraic loops Error.
1 回表示 (過去 30 日間)
古いコメントを表示
Hello All,
I am having this error in my code.
--> Error reported from ODE Compilation:
Initial assignment rules and repeated assignment rules cannot create explicit or implicit algebraic loops (for example, 'x = y' and 'y = x'). Implicit references to compartments occur when referencing a species in concentration. The following rules introduce algebraic loops into the model:
The equation is to calculate the mitocondria voltage based on the chemical pumps and electrodefusion. however, the reaction rates for these pumps depend on the miltocondria voltage. As a result, my code has algebraic loop problem. How should I work around this issue?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1660241/image.png)
0 件のコメント
採用された回答
Arthur Goldsipe
2024 年 4 月 4 日
Can you share your model? That would allow me to offer more specific advice. (If you're not comfortable posting it publicly, please feel free to reach out to me directly.)
The error message normally lists the rules that are involved in algebraic rules. That information might give you a little more insight into where the loops are occurring. But ultimately, we will probably need your modeling expertise to figure out how to break the algebraic loop.
Here's a concrete example. Let's say you have these repeated assignment rules in the error message:
a = b + 1
b = c + 1
c = a + N
These rules create an algebraic loop for a, b, and c. Depending on the value of N, there may be no valid solution to equations. Or there may be an infinite number of solutions to the system. So you need to figure out HOW these values are supposed to be uniquely determined. For example, maybe you intended for c(t) = a(t=0) + N(t). One way to fix the model would be to create a separate parameter a0 that where you hard-code the value of a at t=0. Then, update the final repeated assignment rule to
c = a0 + N
That way, SimBiology determines that (at each time) c must be calcuated first, then b (from c), and a (from b).
-Arthur
その他の回答 (0 件)
コミュニティ
その他の回答 SimBiology コミュニティ
参考
カテゴリ
Help Center および File Exchange で Extend Modeling Environment についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!