Borrar filtros
Borrar filtros

Modeling Mitochondria Voltage depending on the Sodium/Potassium Pumps results in Algebraic loops Error.

3 visualizaciones (últimos 30 días)
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?

Respuesta aceptada

Arthur Goldsipe
Arthur Goldsipe el 4 de Abr. de 2024
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

Más respuestas (0)

Comunidades de usuarios

Más respuestas en  SimBiology Community

Categorías

Más información sobre Extend Modeling Environment en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by